For now, we use agda v2.6.2.
For the cubical library, we have a submodule. To clone, use
git clone --recurse-submodules
See related links on my homepage.
In Mat, we define MATs (multisorted algebraic theories).
Mat.Signaturedefines the "signature" of a MAT presentation, which is just a set of sorts.Mat.Free.Presentationdefines the presentation of a free MAT, which is a sort-indexed container, and the corresponding functorTerm1.Mat.Free.Termdefines the free monadTermF.Mat.Free.Modeldefines the isomorphic categoriescatModel1of algebras forTerm1andcatModelFof Eilenberg-Moore algebras forTermF.Mat.Presentationdefines the presentation of a MAT, which is a free MAT equipped with an equational theory.Mat.Termdefines the monadTermQ.Mat.Modeldefines the isomorphic categoriescatModel1Eqof algebras forTerm1that respect the equational theory,catModelFEqof Eilenberg-Moore algebras forTermFthat respect the equational theory,catModelof Eilenberg-Moore algebras forTermQ.
In Cmat, we define CMATs (contextual multisorted algebraic theories), as well as a few translations:
-
The settling translation translates CMATs to MATs. It comes in two flavours:
- The cold translation, which translates a free CMAT to a MAT with no substitution operations other than substitution composition,
- The hot translation, which translates a free CMAT to a MAT with substitution operations. It extends to a translation from non-free CMATs to MATs.
Both flavours have the same signature, and are indexed by a CMAT foundation, which determines what are the contexts of the resulting language.
-
The levitating translation is actually a special case of the settling translations, which is indexed by a mode
m0. To levitate a CMAT is to settle it on the foundation whose contexts at modemare really junctors fromm0tom.
Different parts are added in different places. The following table gives a bit of an overview. It should be read as follows:
-
The bold lines are titles,
-
Under every bold line we list the operations added there,
-
Operations from the left and from above (and from the upper-left) are also inherited,
-
"Custom" stands for operations custom to the specific theory at hand.
Custom CMAT Cold Hot Signature cmatsigmatsigSettledmatsigSettledOperations fcmatfmatColdfmatHotCustom id-jhomidsubgensub=gensub=comp-jhomcompsubtmsubwhiskerLmixWhiskerLwhiskerRmixWhiskerREquations matColdmatHottmsub-inctxcompsub-lunitcompsub-runittmsub-runitcompsub-assoctmsub-assocMixed whiskering except 1 law Equational theory cmatmatHotEqCustom Whiskering 1 mixed wh law
The setup is as follows:
-
Cmat.Signaturedefines- the signature of a CMAT presentation, consisting of:
- a category of modes and junctors
- custom right-hand-sides (to which we add the native RHSs for substitutions and junctor morphisms)
- CMAT foundations, consisting of:
- a covariant presheaf of contexts over the category of modes and junctors.
- The translation is called settled in general,
- The translation is called levitated if the presheaf of contexts is representable, meaning that junctors from the representing mode
m0serve as contexts.
- a covariant presheaf of contexts over the category of modes and junctors.
- the common MAT signature
matsigSettledof the cold/hot translation.
- the signature of a CMAT presentation, consisting of:
-
Cmat.Free.Presentationdefines the presentation of a free CMAT, which is almost a RHS-indexed container, only we get to specify a junctor for every argument of every operator. It also defines the settling translation, indexed by a "temperature" (hot/cold):- The general settling translation:
fmatSettled,matSettled - The cold translation:
fmatCold,matCold - The hot translation:
fmatHot,matHot
- The general settling translation:
TBD