[Paper Review] For Generalised Algebraic Theories, Two Sorts Are Enough
The paper proves that any generalised algebraic theory (GAT) can be reduced to a two-sort GAT and establishes a strict coreflection between their models, enabling two-sortification and QIIT implementations.
Generalised algebraic theories (GATs) allow multiple sorts indexed over each other. For example, the theories of categories or Martin-L{ö}f type theories form GATs. Categories have two sorts, objects and morphisms, and the latter are double-indexed over the former. Martin-L{ö}f type theory has four sorts: contexts, substitutions, types and terms. For example, types are indexed over contexts, and terms are indexed over both contexts and types. In this paper we show that any GAT can be reduced to a GAT with only two sorts, and there is a section-retraction correspondence (formally, a strict coreflection) between models of the original and the reduced GAT. In particular, any model of the original GAT can be turned into a model of the reduced (two-sorted) GAT and back, and this roundtrip is the identity. The reduced GAT is simpler than the original GAT in the following aspects: it does not have sort equalities; it does not have interleaved sorts and operations; if the original GAT did not have interleaved sorts and operations, then the reduced GAT won't have operations interleaved between different sorts. In a type-theoretic metatheory, the initial algebra of a GAT is called a quotient inductive-inductive type (QIIT). Our reduction provides a way to implement QIITs with sort equalities or interleaved constructors which are not allowed by Cubical Agda. An instance of our reduction is the well-known method of reducing mutual inductive types to a single indexed family. Our approach is semantic in that it does not rely on a syntactic description of GATs, but instead, on Uemura's bi-initial characterisation of the category of (finite) GATs in the 2-category of finitely complete categories with a chosen exponentiable morphism.
Motivation & Objective
- Motivate and formalize the problem of reducing GATs with multiple sorts to a two-sort framework.
- Define a bi-initial, CartExp-structure for the category of finite GATs to enable a semantic translation.
- Construct a two-sort translation (two-sortification) that maps any GAT to a two-sorted GAT over the Fam theory of families.
- Show that the translation yields a strict coreflection between models of the original and reduced GATs.
- Demonstrate that the reduction preserves initial models and extends to infinite GATs via bi-initiality properties.
Proposed method
- Define two-sortification as a bi-initial CartExp-functor from FinGat to FinGat/Fam.
- Equip FinGat/Fam with a CartExp-structure by selecting an exponentiable morphism corresponding to Fam.
- Construct a coreflector morphism from the translated GAT back to the original GAT.
- Define the model functor that assigns to a GAT its category of models and show it preserves pushforwards along exponentiable morphisms.
- Prove that the two-sortification is fully faithful and that a strict coreflection exists between model categories.
Experimental results
Research questions
- RQ1Can any GAT be reduced to a two-sorted GAT without loss of essential structure?
- RQ2Does a strict coreflection exist between the category of models of a GAT and its two-sortification?
- RQ3How does two-sortification interact with initial models and quotient inductive-inductive types (QIITs) in type-theoretic metatheory?
- RQ4Can the reduction be extended to infinite GATs via bi-initiality?
Key findings
- There exists a bi-initial CartExp-functor implementing two-sortification from FinGat to FinGat/Fam.
- The translated theory is a two-sorted GAT of Fam, eliminating sort equations and interleaved operators when present.
- There is a coreflector morphism from the translated GAT to the original, yielding a strict coreflection on model categories.
- The model functor sends the coreflector’s image to a left adjoint, establishing a strict roundtrip equality between original and reduced GAT models.
- Every finite GAT has an initial model, and the two-sortification is fully faithful on models.
- The framework extends to infinite GATs via the bi-initiality concept, preserving the translation's properties.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.