---
name: "CognitiveCaseDiagrams"
description: "Expertise in compositional approaches to linguistic case for cognitive modeling: case as categorical structure, typological alignment as functors, DisCoCat/DisCoCirc diagrams, links to Distributional Active Inference, and protocol-level analysis of prompt injection as functorial type violations."
tags: ["active-inference", "category-theory", "linguistic-case", "compositional-semantics", "discocat", "discocirc", "distributional-semantics", "cognitive-modeling", "cognitive-security", "prompt-injection", "typology"]
---

# Compositional Approaches to Linguistic Case for Cognitive Modeling

**Daniel Ari Friedman** (2026) · Active Inference Journal · category theory · linguistics

## Instructions

Use this skill when working on **linguistic case**, **compositional semantics**, **category-theoretic models of grammar**, **DisCoCat / DisCoCirc**, **cross-linguistic alignment**, **Distributional Active Inference**, or **cognitive-security analyses of multi-agent LLM protocols** (typed roles, wiring, prompt injection as type violations).

When applying this skill:

1. Treat **case systems** as categorical objects/morphisms; treat **alignment types** as **functors** between case categories—preserve structure when comparing languages.
2. Use **string diagrams** as the shared notation for grammatical composition, semantic composition, and (where the manuscript specifies) inference-relevant structure.
3. Separate **in-principle** static analysis (under an enforced interaction grammar) from **empirical** LLM behavior on unconstrained APIs.

## Key Concepts

- **Case as fulcrum** — grammatical case links who did what to whom with relational structure and updating under evidence.
- **Case categories** — objects as case roles, morphisms as grammatical relations; alignment patterns as structure-preserving functors.
- **DisCoCat / DisCoCirc** — compact-closed string diagrams for compositional meaning and discourse-relevant composition.
- **Enrichment and quantification** — [0,1]-weighted hom-values and bridges to distributional proximity and measurement-oriented semantics.
- **Distributional Active Inference** — manuscript-level connection for quantitative, falsifiable cognitive predictions (e.g. ERP-oriented hypotheses).
- **Prompt injection (protocol view)** — ill-typed promotion of roles in a fixed category of licensed morphisms when multi-turn interactions are modeled categorically.

## Methods & Techniques

- Categorical modeling of morphosyntax and typological invariants.
- Functorial comparison of alignment systems across languages.
- Compositional distributional semantics via monoidal / compact-closed structure.
- Topos- and enrichment-flavored bridges between layers (as developed in the paper).
- Software-grounded validation: open repository with tests and generated figures — https://github.com/docxology/cognitive_case_diagrams

## Key Findings

- Cross-linguistic typology reframed as **structure-preserving maps** between case categories—not only a taxonomic list.
- A unified diagrammatic stance ties grammar, distributional reporting, and updating narratives that matter for cognitive modeling.
- Cognitive security: when agent protocols are explicitly typed, certain injection patterns align with **functorial type violations**, becoming a specification and enforcement target.

## Prerequisites

- Introductory **category theory** (categories, functors, natural transformations; comfort with diagrams helps).
- Basic **linguistic typology** (case, alignment, ergativity vs. nominative–accusative).
- Familiarity with **Active Inference** or predictive processing at a conceptual level helps for the DAI-linked sections.

## 🎯 Consulting & Tutoring

[Daniel Ari Friedman, PhD](https://danielarifriedman.com/) is available for AI Research Consulting and Tutoring related to this skill.

## Related Skills

See [BIBLIOGRAPHY.md](../../pages/BIBLIOGRAPHY.md) for the complete publication catalog.

**Code and manuscript archive**: https://github.com/docxology/cognitive_case_diagrams · https://doi.org/10.5281/zenodo.19695260
