nLab cubical type theory

Redirected from "cubical type theories".
Contents

Context

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

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
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

semantics

Contents

Idea

Cubical type theory is a flavor of dependent type theory in which maps out of an interval primitive is used to define cubical path types, rather than the inductive family of Martin-Löf identity types as in Martin-Löf type theory. Cubical type theory additionally differs from Martin-Löf type theory in that function extensionality is a theorem in cubical type theory, rather than an axiom as is the case in Martin-Löf type theory.

Similarly to Martin-Löf type theory, cubical type theory comes in extensional and intensional flavours as well. One could also add an equality reflection rule for path types to make the cubical type theory definitionally extensional.

Univalent cubical type theory models the \infty -groupoid-structure implied by Martin-Löf identity types on constructive cubical sets (whence the name) thus making it a form of homotopy type theory.

Syntax

The interval and face formulas

We begin with a dependent type theory which has rules for dependent product types, dependent sum types, the empty type, unit type, booleans type, and natural numbers type.

Cubical type theory adds to dependent type theory an interval primitive II, whose elements are called “dimensions” as well as face formulas FF, which behave like propositions in a propositional logic. Both come with the following judgments for dimension variables and face formulae:

ΓctxΓ,i:IctxΓctxΓϕ:FΓ,ϕctx\frac{\Gamma \; ctx}{\Gamma, i:I \; ctx} \qquad \frac{\Gamma \; ctx \quad \Gamma \vdash \phi:F}{\Gamma, \phi \; ctx}

Similarly to types, dimension variables and face formulas come with their own substitution rules, weakening rules, and hypothesis rules?.

In addition, there are rules for forming the endpoints of the interval:

ΓΓ0:IΓΓ1:I\frac{\Gamma}{\Gamma \vdash 0:I} \qquad \frac{\Gamma}{\Gamma \vdash 1:I}

Equality of dimensions in the interval is a face formula:

Γr:IΓs:IΓr=s:F\frac{\Gamma \vdash r:I \quad \Gamma \vdash s:I}{\Gamma \vdash r = s:F}

and face formulas are closed under disjunction

Γϕ:FΓψ:FΓϕψ:F\frac{\Gamma \vdash \phi:F \quad \Gamma \vdash \psi:F}{\Gamma \vdash \phi \vee \psi:F}

Since face formulae behave like propositions, it should be possible to judge them to be true. Thus, we have the following rules:

ΓϕtrueΓϕψtrueΓψtrueΓϕψtrueΓϕψtrueΓ,ϕχtrueΓ,ψχtrueΓχtrue\frac{\Gamma \vdash \phi \; true}{\Gamma \vdash \phi \vee \psi \; true} \qquad \frac{\Gamma \vdash \psi \; true}{\Gamma \vdash \phi \vee \psi \; true} \qquad \frac{\Gamma \vdash \phi \vee \psi \; true \quad \Gamma, \phi \vdash \chi \; true \quad \Gamma, \psi \vdash \chi \; true}{\Gamma \vdash \chi \; true}

The interval primitive II has more points than 00 and 11, so it is not the case that the sequent

r:Ir=0r=1truer:I \vdash r = 0 \vee r = 1 \;\mathrm{true}

holds. Thus, there is a boundary formula

δ(r)r=0r=1\delta(r) \coloneqq r = 0 \vee r = 1

Canonicity in cubical type theory

In contrast to Martin-Löf type theory, there exist cubical type theories, such as XTT, in which UIP is not just an axiom but a theorem. Similarily, there exist cubical type theories in which univalence is not just an axiom but a theorem. As a result, in those cubical type theories, canonicity still holds. This is useful for computational purposes, and for the use of cubical type theory in proof assistants.

However, it is equally valid to add an axiom to a cubical type theory that says all type universe satisfy UIP or univalence, so canonicity is not required to hold in all cubical type theories.

Univalent cubical type theories

The first constructive account of the univalence axiom was given in (Coquand 13, Bezem-Coquand-Huber 17), called the “BCH-model”.

The BCH model, unfortunately, has some problems that appear to make it unsuitable for general HoTT. In particular, it is not known how to model higher inductive types. The problem is that the BCH model is based on presheaves on the ‘symmetric monoidal cube category’, which is basically the free PROP generated by an interval. In particular, the base category’s maps are generated by face maps and permutative renamings of dimension variables (this is where the ‘symmetric monoidal’ part comes in). For somewhat technical reasons, this doesn’t work out when you want to define the elimination rules for higher inductive types (like for the circle).

To account for HITs, you seem to need diagonals in the base category. There is more than one choice in addition as to what other morphisms to add.

Both models validate univalence (like the BCH model) and can be used to model a variety of HITs as well as supporting a syntactic type theory based on ‘dimension variables’. However, while it is possible to interpret the Martin-Löf identity type in all of these models, it is only equivalent to, not definitionally isomorphic to, the native cubical path-types in the model. Thus, the latter support the Martin-Lof eliminator, but only with a typal computation rule.

Models

Cubical type theory can be modeled in a number of varieties of cubical sets, for example in a type-theoretic model structure.

References

Introductory lecture notes:

Exposition in view of synthetic homotopy theory:

  • Anders Mörtberg, Loïc Pujet, Cubical synthetic homotopy theory, CPP 2020: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs January 2020, pp. 158–171, doi:10.1145/3372885.3373825, (pdf)

Original articles on the BCH model:

On the CCHM model and type theory:

On the cartesian cubical model and type theory:

On comparing the models:

Discussion of implementation in the proof assistant Cubical Agda:

On normalization for cubical type theory:

On XTT:

Last revised on September 20, 2024 at 14:50:12. See the history of this page for a list of all contributions to it.