research39 min studyLesson 999 in Mathematics

Universes, univalence, and homotopy type theory

Control universe levels, interpret type equality by equivalence, and separate axiomatic transport from cubical computation.

On this page

What you’ll understand

  • Track the universe levels of types, families, and type equivalences.
  • Use the univalence axiom and its propositional transport consequence precisely.
  • Explain why computational univalence needs rules beyond adding an opaque axiom to ordinary intensional type theory.

Universes let mathematical types themselves become objects of a larger type. Their identity types then ask when two types should count as the same. Univalence answers using equivalences, giving a foundation in which transport can express invariance under appropriate changes of presentation. This answer has both logical and computational versions. We will keep universe levels explicit, construct a nontrivial universe loop from Boolean negation, and distinguish its propositional transport law from executable cubical rules.

A hierarchy prevents a universe from containing itself

In the predicative hierarchy used here, each universe belongs to a strictly larger universe. A small family has a specified domain level and fiber level; forming its dependent sum or product normally uses the maximum of those levels. One may choose a cumulative formulation, allowing a small type to be regarded at higher levels, but that is an explicit rule of the theory. It does not turn a universe into an element of itself.

The collection of small types is larger than an individual small type. Likewise, collecting all small mere propositions can raise a universe level, even though each proposition is individually small. Resizing principles can change such bookkeeping, but they are additional assumptions and are not automatic consequences of calling a type a proposition. A formal statement about all types must therefore say which universe it quantifies over instead of hiding an unrestricted self-containing collection behind informal notation.

Ui:Ui+1,A:Ui, B:A→Uj ⟹ ∑a:AB(a), ∏a:AB(a):Umax⁡(i,j).\mathcal U_i:\mathcal U_{i+1},\qquad A:\mathcal U_i,\ B:A\to\mathcal U_j\ \Longrightarrow\ \sum_{a:A}B(a),\ \prod_{a:A}B(a):\mathcal U_{\max(i,j)}.
These are the chosen predicative formation levels; neither type-in-type nor resizing is being assumed.↔ Scroll wide equations horizontally.

Univalence compares identity with equivalence

Path induction always sends an identity between two types to an equivalence: transport along reflexivity is the identity equivalence, and the construction extends to all paths. Univalence asserts that this canonical map is itself an equivalence. Its inverse assigns a universe path to an equivalence. For general types, equivalence means a map with contractible fibers or an equivalent standard formulation, not merely a bijection between visible points that ignores higher identity information.

A consequence is that transporting an element along the path associated to an equivalence agrees propositionally with applying the equivalence. This agreement follows from the inverse laws for the canonical map and can be used as an internal equality proof. Univalence also entails function extensionality in the standard setting of the cited book. It does not say that every path is judgmentally reflexivity, or that arbitrary equivalences become syntactically identical terms in a checker.

idtoequiv⁡:(A=B)→(A≃B),isEquiv⁡(idtoequiv⁡),transport⁡X↦X(ua⁡(e),a)=e(a).\operatorname{idtoequiv}:(A=B)\to(A\simeq B),\qquad \operatorname{isEquiv}(\operatorname{idtoequiv}),\qquad \operatorname{transport}_{X\mapsto X}(\operatorname{ua}(e),a)=e(a).
The last equality is the propositional transport consequence of univalence; no new judgmental reduction rule has been declared here.↔ Scroll wide equations horizontally.

Cubical rules add computational structure rather than a slogan

Ordinary intensional type theory can postulate a constant expressing univalence. With no corresponding reduction equations, a transport term involving that constant may remain stuck even when its expected result is propositionally known. This need not refute logical consistency; it means the original operational rules do not supply the desired computation. One must distinguish semantic justification of an axiom, internal proof consequences, and a normalization algorithm for extended syntax.

Cohen, Coquand, Huber, and Mörtberg instead give a cubical calculus with interval names, composition, and glueing operations in which univalence is provable with computational content. Huber's separate canonicity theorem establishes the stated numeral result for that particular calculus. These are precise developments, not a license to attach the same theorems to every language called homotopy type theory. Adding further higher inductive types, rewrite rules, or axioms calls for the corresponding computational and consistency analysis.

opaque univalence axiom ≠ cubical composition and glueing rules.\text{opaque univalence axiom}\ \ne\ \text{cubical composition and glueing rules}.
The distinction concerns specified syntax and computation, rather than denying the internal propositional consequences of the axiom.↔ Scroll wide equations horizontally.

Boolean negation gives a nontrivial universe loop

Use the two-element type Bool in a small universe. Show negation is an equivalence, form its univalence path, and determine the transport of false. Explain why this path cannot equal reflexivity.

  1. Negation exchanges false and true, so applying it twice returns the original input in both constructor cases. This gives an inverse and proves that negation is an equivalence of Bool with itself.

  2. Univalence assigns this equivalence a path p from Bool to Bool in the universe. The propositional transport law identifies transport of false along p with negation of false, hence with true.

  3. If p were equal to the reflexivity path, applying transport to that path equality would identify the transported false with false. Combined with the preceding equality, this would make true equal to false, contradicting the distinct Boolean constructors. Thus this universe loop is not reflexivity.

p=ua⁡(neg⁡),transport⁡X↦X(p,false)=true,p≠refl⁡Bool.p=\operatorname{ua}(\operatorname{neg}),\qquad \operatorname{transport}_{X\mapsto X}(p,\mathrm{false})=\mathrm{true},\qquad p\ne\operatorname{refl}_{\mathrm{Bool}}.
A nontrivial loop in a universe is compatible with Bool itself being a set: these are identities in different types.↔ Scroll wide equations horizontally.
The result

Negation determines a nontrivial path Bool=Bool whose transport sends false to true propositionally; axiomatic univalence alone does not make that transport a judgmental reduction.

Explore the model

Interactive lab

Interactive lab · modular

Inspect a finite equivalence and its inverse

Pause and Reset, then set modulus to 3 and additive step to 1. Predict residues 0, 1, 2, 0 across three Steps, modeling repeated application of the cyclic permutation. For a fresh comparison Reset and set modulus to 3 and step to 2, the inverse orbit 0, 2, 1, 0. Check the inverse composition on each of the three elements on paper. The model displays a finite permutation, not a universe path, univalence proof, or cubical transport. Edits retain the clock; Reset and set both controls each run.

Inspect a finite equivalence and its inverseAddition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Current readings: Residue r0: 0; Orbit period · m/gcd(m,a): 12; Distinct residues visited: 1 of 12. All parameters are adjustable with the labeled controls below.Repeated addition modulo 12: the current residue is 0, and the orbit period is 12.01234567891011+ 5mod 12An additive orbitn = 0rₙ = 0Period = 12Cycle starts at 0:0 → 5 → 10 → 3 →8 → 1 → 6 → 11 →4 → 9 → 2 → 7 → 0Exact residues · two additions per second
Additive orbitCurrent residue / next edge
Residue r0
0
Orbit period · m/gcd(m,a)
12
Distinct residues visited
1 of 12
t = 0 s

Addition modulo m starts at zero: rₙ = na mod m. Playback advances two additions per second. The orbit has period m/gcd(m,a), including period one for a = 0. This is not a cryptographic security test or a primality algorithm. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forFinite inverse calculations can certify an equivalence, while its interpretation as a type path uses a separate foundational principle.

Check your understanding

What does adding univalence as an opaque axiom to ordinary intensional type theory guarantee about transport along ua(e)?

Try it yourself

On Fin(3), let e add one modulo three. Give its inverse and the image of two, then state the transport conclusion supplied by univalence and which equality status is being asserted.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Compute the two cyclic tables and compose them before interpreting the equivalence as a path.

Compare with the solution

The map e sends zero to one, one to two, and two to zero. Its inverse adds two modulo three, sending zero to two, one to zero, and two to one. Both compositions return every original element. Univalence therefore supplies a path from Fin(3) to itself, and transport of two along that path is propositionally equal to zero. In the axiomatic intensional presentation no judgmental computation of the transport term has been promised. Applying the cyclic map three times is propositionally the identity by the finite case check.

Take it with you

  • Universe levels and resizing assumptions belong in the statement.
  • Univalence identifies type paths with equivalences and supplies propositional transport behavior.
  • Cubical computation and its metatheorems require an explicitly specified calculus.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.