The Homotopical Semantics Trilogy
A complete mathematical framework for understanding, detecting, and preventing LLM hallucination through algebraic topology, dependent type theory, and homotopy type theory.
“Hallucination is not a bug — it’s a theorem.”
Research Papers
Three papers forming a logically tight trilogy — Part I diagnoses, Part II prescribes, Part III unifies.
The Logical Architecture
Each paper builds on the previous, revealing an emergent structure only visible when all three are read together.
Topological Detection
Hallucination is structurally inevitable in any system mapping semantic space to a contractible codomain. Five failure modes ↔ five topological invariants.
Type-Theoretic Generation
Replace statistical sampling with type inhabitation. Five generation principles jointly guarantee hallucination-free output via proof search.
HoTT Synthesis
Detection and generation form an adjoint pair. The semantic monad T = Detect∘Generate proves the Completeness Theorem — every hallucination is caught.


