# Compositional Approaches to Linguistic Case for Cognitive Modeling

**Daniel Ari Friedman** (2026) · *Active Inference Journal* · Version v1

[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.19695260-blue)](https://doi.org/10.5281/zenodo.19695260)

---

<!-- Schema.org structured data for search engines -->
<!--
{"@context":"https://schema.org","@type":"ScholarlyArticle","headline":"Compositional Approaches to Linguistic Case for Cognitive Modeling","abstract":"Category-theoretic treatment of linguistic case as a bridge between grammatical structure, distributional semantics, and belief updating; DisCoCat/DisCoCirc diagrams, alignment typology as functors, links to Distributional Active Inference and cognitive security (prompt injection as type violation).","keywords":["Active Inference","linguistic case","category theory","DisCoCat","DisCoCirc","distributional semantics","cognitive modeling","cognitive security","prompt injection"],"author":[{"@type":"Person","name":"Daniel Ari Friedman","url":"https://danielarifriedman.com/","affiliation":[{"@type":"Organization","name":"Active Inference Institute"},{"@type":"Organization","name":"COGSEC"},{"@type":"Organization","name":"College of the Redwoods"}]}]}
-->

## Abstract

> Commutative diagrams are treated as cognitively privileged representations: they jointly encode relational (algebraic) structure, the distributional semantics by which language reports on situations, and the inference process by which beliefs update under new evidence—with **linguistic case** (“who did what to whom”) as the natural hinge across these layers. The paper formalizes case systems as categories, represents cross-linguistic alignment patterns (nominative–accusative, ergative–absolutive, tripartite, active–stative, fluid-S) as structure-preserving functors, and develops **DisCoCat** / **DisCoCirc** string-diagram compositional semantics, enriched categorical hooks to quantitative similarity, and connections to **Distributional Active Inference** (including falsifiable ERP-oriented predictions) and **POVM**-style scaling for multi-agent discourse. A cognitive-security thread models multi-turn agent protocols as typed morphism categories so that **prompt injection** aligns, in principle, with ill-typed role promotion—an engineering target when interaction grammars are enforced, not an automatic property of LLM APIs. Executable code, tests, figures, and the manuscript live in the open repository archived on Zenodo.

## Keywords

`Active Inference` · `linguistic case` · `category theory` · `DisCoCat` · `DisCoCirc` · `distributional semantics` · `topos` · `cognitive modeling` · `cognitive security` · `prompt injection`

## Key Contributions

- Case systems as categories; grammatical relations as morphisms; alignment typology as functors between case categories.
- Compositional semantics via compact-closed string diagrams (DisCoCat / DisCoCirc) with an enriched-categorical route to quantitative distributional proximity.
- Bridge from typology and type-logical structure through distributional semantics to Active Inference–style prediction (including neurophysiological hypotheses).
- Protocol-level view of multi-agent LLM interactions: typed roles and wiring; prompt injection analyzed as functorial type violations when a fixed interaction grammar is enforced.

## Methods & Artifacts

- Theoretical development with category theory, compositional semantics, and links to Distributional Active Inference.
- Open-source Python implementation: tests, coverage reporting, and programmatic figures — [https://github.com/docxology/cognitive_case_diagrams](https://github.com/docxology/cognitive_case_diagrams)
- Archived manuscript (v1): [https://doi.org/10.5281/zenodo.19695260](https://doi.org/10.5281/zenodo.19695260) · Zenodo record [https://zenodo.org/records/19695260](https://zenodo.org/records/19695260)

## 🎯 Consulting & Tutoring

**Available for AI Research Consulting and Tutoring.** [Contact Daniel Ari Friedman, PhD](https://danielarifriedman.com/) for collaboration on Active Inference, compositional semantics, and cognitive security.

## Citation

```bibtex
@article{2026_CognitiveCaseDiagrams,
  author = {Daniel Ari Friedman},
  title = {{Compositional Approaches to Linguistic Case for Cognitive Modeling}},
  journal = {Active Inference Journal},
  year = {2026},
  version = {v1},
  doi = {10.5281/zenodo.19695260},
  url = {https://doi.org/10.5281/zenodo.19695260},
  note = {Software: \url{https://github.com/docxology/cognitive_case_diagrams}},
}
```

## File Inventory

- `AGENTS.md`
- `cognitive_case_diagrams_v1_DAF_04-23-2026.pdf`
- `README.md`
- `SKILL.md`
