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
basic constructions:
strong axioms
further
Disambiguation: For axiom K as a principle of modal logic, see axiom K (modal logic)
In dependent type theory, axiom K refers to a couple of different axioms and rules applicable to individual types to turn them into h-sets, type families to turn them into families of sets (and in particular, universes to turn them into internal types of sets), as well as the type theory as a whole to turn it into an actual set-level type theory, where all types are h-sets. Under certain conditions, axiom K for universes is incompatible with the univalence axiom, and axiom K for the whole type theory is incompatible with the existence of a univalent universe.
Heuristically, the axiom asserts that for each element $a:A$, every identification of the identity type $\mathrm{Id}_A(a, a)$ is typally equal to the canonical reflexivity identification $refl_A(a):\mathrm{Id}_A(a, a)$. This is equivalent to saying that for every element $a:A$, reflexivity $\mathrm{refl}_A(a)$ is the center of contraction of the loop space type of $a$.
There are multiple notions of axiom K: for individual types, for type families and Tarski universes, and for the type theory itself.
The following definition is adapted from theorem 7.2.1 of the HoTT book. Given a type $A$, axiom K is the axiom that for all elements $a:A$ and identifications $p:\mathrm{Id}_A(a, a)$, there is an identification $K(a, p):\mathrm{Id}_{\mathrm{Id}_A(a, a)}(p, refl_A(a))$. This is the same as stating that there is a dependent function
Axiom K implies that $A$ is an h-set, and can be used in the definition of an h-set.
Axiom K for type families $(A, B)$ says that given a type $A$ with a type family $B(a)$ indexed by elements $a:A$, the typal axiom K holds for the dependent type $B(a)$ of every element of the index type $a:A$. This is the same as stating that there is a dependent function
This definition of axiom K could be used in the definition of family of sets. Since this definition applies to type families, this should probably be called the familial axiom K to distinguish it from the axiom K above.
Since every Tarski universe consists of a type $U$ of encodings and a type family $T$ representing the actual small types indexed by the type $U$, with addition structure representing the closure of $U$ under all type formers, the familial axiom K definition works for Tarski universes as well, and this could equivalently be called the Tarski universe axiom K.
In the same manner that uniqueness of identity proofs could be expressed as a rule instead of an axiom, Axiom K could also be rewritten as a rule instead of an axiom, by making the hypotheses of the axioms into premises of the rule. This makes axiom K applicable not only to universes, but to the entire type theory. In addition, one could use, in addition to typal equality, either judgmental equality or propositional equality, resulting in judgmental axiom K and propositional axiom K, with the original axiom K called typal axiom K
In this manner, axiom K then becomes the rules:
Axiom K is a axiom of set truncation, and turns the type theory into a set-level type theory. Judgmental axiom K holds in XTT, where it follows from the judgmental UIP rule, which in turn follows from boundary separation.
This should probably be called the K rule rather than axiom K, since it is no longer an axiom.
There is also a notion of axiom K for heterogeneous identity types, which is given by the following rule:
Judgmental axiom K for heterogeneous identity types:
Propositional axiom K for heterogeneous identity types:
Typal axiom K for heterogeneous identity types:
and likewise for dependent heterogeneous identity types:
Judgmental axiom K for dependent heterogeneous identity types:
Propositional axiom K for dependent heterogeneous identity types:
Typal axiom K for dependent heterogeneous identity types:
In this section we assume that the universe is a Tarski universe. The K rule is inconsistent with having a univalent type with a type family $(A, B)$ with at least one term $a:A$ where the dependent type $B(a)$ is provably not a proposition
because by univalence, $A$ is then provably not a set, which contradicts the K rule. In particular, having a univalent universe $(U, T)$ in the type theory is inconsistent with the K rule.
The familial axiom K applied to Tarski universes implies that for all $A:U$ the type $T(A)$ is a set. This means the type reflection of the internal equivalences $T(A \simeq_U B)$ is an h-set, and the univalence axiom then implies that $U$ is an h-groupoid. If $U$ has h-sets which can be proven not to be an h-proposition, such as the booleans type, then $U$ is provably not an h-set.
However, unlike the case for the K rule, the familial axiom K and the univalence axiom for universes are inconsistent with each other only if the Tarski universe $U$ has objects which can be proven not to be an h-set, such as internal univalent Tarski universes $V:U$ where the type $T(V)$ has terms $A:T(V)$ such that $T_V(A)$ is an h-set which is not an h-proposition, such as the booleans type. As a result, $T(V)$ can be proven to not be a set, causing axiom K for $U$ to be inconsistent with the existence of $V:U$ and univalence.
Unlike its logical equivalent axiom UIP, axiom K can be endowed with computational behavior: $K(A,x,P,d,refl_A x)$ computes to $d$. This gives a way to specify a computational set-level 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 January 25, 2023 at 18:19:26. See the history of this page for a list of all contributions to it.