SOGAT braindump
Naïm Camille Favier @ncf@types.pl
Content warning: SOGAT braindump
I am thinking about the way that SOGATs talk about themselves. I have not checked the following very carefully so take with a grain of salt. Also probably don't read this if you're not already familiar with (SO)GATs; see here for recommended reading.
Let DTT ("basic dependent type theory", example 4.6.1 in Uemura's thesis) be the following SOGAT:
- ⊢ Ty sort
- A : Ty ⊢ Tm(A) representable sort
Models of DTT are CwFs/natural models, and theories over DTT are GATs (in the sense of Cartmell, i.e. with sort equations).
Let DTT⁺ be the following SOGAT extension of DTT with a subsort of representable types:
- ⊢ Ty⁺ sort
- A : Ty⁺ ⊢ inc(A) : Ty
- Ty is closed under Π-types with arities in Ty⁺
- Ty is closed under Eq (extensional equality types)
- Ty is closed under Σ/1 (I don't think this is actually required(?))
Models of DTT⁺ are (Σ, Π_rep, Eq)-CwFs in the sense of Bocquet, and theories over DTT⁺ are SOGATs (again with sort equations)! Given a SOGAT T seen as a theory over DTT⁺, the extension DTT⁺[T] is a SOGAT whose contexts are theories over T. (Recall the definitions of contexts and environments over a SOGAT from Uemura's thesis; here I am deliberately not being very careful about well-ordered/finitary requirements, and identifying environments with theories.)
In particular, DTT⁺ can be seen as a theory over itself, so we can consider the SOGAT DTT⁺[DTT⁺]. This is a SOGAT whose contexts are theories over DTT⁺, hence SOGATs. In other words, the SOGAT DTT⁺[DTT⁺] is nothing more than ToS⁺, the theory of SOGAT signatures from Kaposi & Xie. (And DTT⁺[DTT] is ToS.) (Actually this is not exactly true: compared to DTT⁺[DTT], ToS collapses the map tm : Tm ty → Ty⁺ (where uppercase means outer and lowercase means inner) away into an identity; this gives the same syntax because this map is admissibly invertible: there are no other representable sorts in the inner layer. ToS(⁺) also removes some stuff from the inner layer that is not needed for specifying types.)
I wonder if this DTT⁺[T] operation can be seen as a kind of second-order two-sortification of T (well, three-sortification I guess)...