nLab canonical form

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

Constructivism, Realizability, Computability

Contents

Idea

Systems of formal logic, such as type theory, try to transform expressions into a canonical form which then serves as the end result of the given computation or deduction. A formal system is said to enjoy canonicity if every expression reduces to canonical form.

More precisely, in type theory, a term belonging to some type is said to be of canonical form if it is explicitly built up using the constructors of that type. A canonical form is in particular a normal form (one not admitting any reductions), but the converse need not hold.

For example, the terms of type \mathbb{N} (a natural numbers type) of canonical form are the numerals

S(S(S((0)))). S(S(S(\cdots (0)\cdots ))).

A type theory is said to enjoy canonicity if every closed term (i.e. a term in the empty context) computes to a canonical form. This is held to be an important meta-theoretic property of type theory, especially considered as a programming language or as a computational foundation for mathematics. It is related to normalization, which says that every open term can also be reduced to a “normal form” of some kind.

Canonicity vs axioms

Adding axioms to type theory, such as the principle of excluded middle or the usual version of the univalence axiom, can destroy canonicity. The axioms result in “stuck terms” which are not of canonical form, yet neither can they be “computed” any further.

For instance, if we assume the law of excluded middle, then we can build a term case(LEM(Goldbach),0,1):case(LEM(Goldbach),0,1) \colon \mathbb{N} which is 00 or 11 according as the Goldbach conjecture is true or false. Clearly this term doesn’t “compute”, but neither is it of canonical form (a numeral).

Similarly, using the univalence axiom, we can obtain a term p:(2=2)p : (\mathbf{2}=\mathbf{2}) corresponding to the automorphism of the type 2\mathbf{2} which switches 0 20_\mathbf{2} and 1 21_\mathbf{2}. Then the term transport(p,0 2)transport(p,0_\mathbf{2}) also has type 2\mathbf{2}, but doesn’t “compute” because the computer gets “stuck” on the univalence term.

It is conjectured that univalence, unlike excluded middle, can be given a “computational” interpretation while preserving canonicity. Some partial progress towards this can be found in (Licata 2011).

See also

References

Discussion of canonicity in homotopy type theory with univalence is discussed in

Last revised on April 20, 2024 at 19:05:54. See the history of this page for a list of all contributions to it.