This paper develops a structural framework for understanding inference by contrasting ℓ¹- and ℓ²-based reasoning systems. Rather than treating inference as probabilistic token prediction, it models inference steps as composable morphisms between reasoning states embedded in a directed acyclic graph (DAG) or causal poset. Within this framework, the validity of inference is defined by commutativity: multiple reasoning paths between the same states must agree. Non-commutativity induces a measurable structural inconsistency, captured by the ℓ¹ coboundary norm. A key result establishes that any failure of commutativity implies a strictly positive lower bound on ℓ¹ defect, providing a deterministic signal of inconsistency. The paper introduces: A categorical model of inference as morphisms over reasoning statesA formal definition of hallucination as failure to embed into a global constraint structureA defect-based criterion for reasoning validity using the ℓ¹ coboundary normA branching reasoning graph interpretation with cohomological obstruction trackingAn explicit contrast between ℓ¹ (sparse, localized inconsistency) and ℓ² (diffusive, averaged inconsistency) regimes Inference dynamics are further interpreted as a monotone descent process over structural defect, with iterative repair mechanisms acting to reduce inconsistency or identify irreducible obstructions. The framework is supported by an implementation in a graph-based inference engine, including ℓ¹ projection, median-based updates, and linear programming formulations for computing irreducible defect. These tools enable explicit detection, localization, and analysis of inconsistencies in structured reasoning systems. This work provides a formal bridge between categorical reasoning, graph-based inference, and practical AI verification, offering a deterministic alternative to purely probabilistic interpretations of inference and hallucination.
JEREMY H. CARROLL (Sun,) studied this question.