Polynomial functors in π-clans for the semantics of type theory
The category of contexts of a model of Martin-Löf type theory with Unit-, Σ- and Π-types need not be locally Cartesian closed. Natural-model-style algebraic semantics usually assume LCC structure, but such a category is necessarily a π-clan.
The authors develop polynomial functors in π-clans using partial right adjoints. They define elementary models, which reformulate categories with families, and algebraic models, which reformulate natural models using these polynomial functors. They then construct translations between the two notions. Many definitions and theorems are formalized in Lean as part of the HoTTLean project, building on Mathlib and the Lean Poly library.
Algebraic semantics of MLTT is shown to be inter-translatable with elementary semantics without assuming LCC structure, which confirms that the algebraic definition models the type formers correctly. The Lean formalization includes the translations and the proof that groupoids form a π-clan, and HoTTLean uses it to support its groupoid model.
