Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logiccategory theorytype theory
trueterminal object/(-2)-truncated objecth-level 0-type/unit type
falseinitial objectempty type
proposition(-1)-truncated objecth-proposition, mere proposition
proofgeneralized elementprogram
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
logical conjunctionproductproduct type
disjunctioncoproduct ((-1)-truncation of)sum type (bracket type of)
implicationinternal homfunction type
negationinternal hom into initial objectfunction type into empty type
universal quantificationdependent productdependent product type
existential quantificationdependent sum ((-1)-truncation of)dependent sum type (bracket type of)
equivalencepath space objectidentity type/path type
equivalence classquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
completely presented setdiscrete object/0-truncated objecth-level 2-type/preset/h-set
setinternal 0-groupoidBishop set/setoid
universeobject classifiertype of types
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels




A dependently typed functional programming language with applications to certified programming. It is also used as a proof assistant.

Besides Coq, Agda is one of the languages in which homotopy type theory has been implemented (Brunerie). Agda can be compiled to Haskell, Epic or Javascript.

Cubical Agda

Cubical Agda is a version of Agda (turned on by the flag --cubical) that implements a type theory similar to CCHM (De Morgan) cubical type theory.

Its main difference from CCHM is that instead of an exotype of “cofibrant propositions” it uses the interval itself, replacing cofibrant propositions by statements of the form r1r \equiv 1 for some dimension expression rr. This change does not prevent the construction of a model for the theory in De Morgan cubical sets, although it doesn’t technically fall under the Orton-Pitts axioms since II is not a subobject of Ω\Omega, and no one has checked whether this model can be strengthened to a Quillen model category.

More problematically, to support identity types a la Swan (which are distinct from both cubical “path types” and Martin-Lof “identity types” – the latter sometimes called “jdentity types” to emphasize their definition relative to the J-eliminator) the type of cofibrant propositions must support a dominance. Cubical Agda thus assumes that II supports a dominance, but this is not true in De Morgan cubical sets. So the semantics of the entirety of Cubical Agda, with Swan identity types, is unclear. (For this reason, the Cubical Agda library generally avoids using Swan identity types, although Cubical Agda supports them.)

Ordinary Martin-Lof jdentity types should, in principle, also be definable in Cubical Agda as an indexed inductive family, with computational behavior as usual for any inductive types in cubical type theory. As of March 2021, however, there is a bug in Cubical Agda that prevents jdentity types from computing correctly.

proof assistants:

based on plain type theory/set theory:

based on dependent type theory/homotopy type theory:

For monoidal category theory:

For higher category theory:

projects for formalization of mathematics with proof assistants:

Historical projects that died out:


General information on Agda is at

A tutorial for use of Agda as an implementation of homotopy type theory is at

and specifically of Cubical Agda as an implementation of cubical type theory:

The HoTT-Agda library is at

category: software

Last revised on March 18, 2021 at 21:03:35. See the history of this page for a list of all contributions to it.