natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
This entry is about the axiom K in type theory. For axiom K of modal logic, see axiom K (modal logic).
In type theory, the axiom K is an axiom that when added to intensional type theory turns it into extensional type theory — or more precisely, what is called here “propositionally extensional type theory”. In the language of homotopy type theory, this means that all types are h-sets, accordingly axiom K is incompatible with the univalence axiom.
Heuristically, the axiom asserts that each term of each identity type (of equivalences of a term ) is propositionally equal to the canonical reflexivity equality proof .
See also at set-level type theory.
Axiom K can also be called loop induction or self-identification induction in parallel to path induction.
If one doesn’t have type universes in the type theory, then axiom K has to be expressed as an inference rule, and thus is called the K-rule:
The associated judgmental computation rule for the -rule is
One can, instead of using elements and self identifications , use a function from the circle type to express axiom K:
This states that the function type is a positive copy of , and is equivalent to the other formulation of axiom K through the recursion principle of the circle type.
If one doesn’t have type universes in the type theory, then axiom K has to be expressed as an inference rule:
The associated judgmental computation rule for the above rule is
The negative analogue of axiom K is the axiom of -localization, which states that
is an equivalence of types or a definitional isomorphism.
Suppose that every type is definitionally -local.
Then is a positive copy of : given any type , and any type family indexed by loops in , and given any dependent function which says that for all elements , there is an element of the type defined by substituting the constant loop of into , , one can construct a dependent function such that for all , .
is defined to be
and by the computation rules of loop types as negative copies, one has that for all ,
and so by definition of and the judgmental congruence rules for substitution, one has
Suppose that for all types , is a positive copy of through the function
Then Streicher’s axiom K is true: given a type and given a type family indexed by and , and a dependent function , one can construct a dependent function
such that for all ,
By the induction principle of positive copies on the type family indexed by , we can construct a dependent function
such that for all ,
since by definition of constant function and reflexivity, one has
We define
since by circle recursion one has a path such that
One has the following analogies between localization at a specific type and the type theoretic letter rule that it proves:
localization rule | type theoretic letter rule |
---|---|
-localization | J-rule |
-localization | K-rule |
Unlike its logical equivalent axiom UIP, axiom K can be endowed with computational behavior: computes to . This gives a way to specify a computational propositionally extensional type theory.
This sort of computational axiom K can also be implemented with, and is sufficient to imply, a general scheme of function definition by pattern-matching. This is implemented in the proof assistant Agda. (The flag --without-K
alters Agda’s pattern-matching scheme to a weaker version appropriate for intensional type theory, including homotopy type theory.)
The axiom K was introduced in
For a review and discussion of the implementation in Coq, see
Discussion in the context of homotopy type theory is in
around theorem 7.2.1
Last revised on June 21, 2024 at 13:19:29. See the history of this page for a list of all contributions to it.