The type of cardinals is Card:=‖𝖲𝖾𝗍‖0; a cardinal is therefore a set remembered only up to mere equivalence. The cardinality of a set 𝐴 is its class |𝐴|:Card. Arithmetic is defined by induction on 0-truncation: |𝐴|+|𝐵|:=|𝐴+𝐵|,|𝐴|⋅|𝐵|:=|𝐴×𝐵|,|𝐴||𝐵|:=|𝐵→𝐴|. To define addition, fix 𝐴 and eliminate the truncation in the second argument. For a representative 𝐵, set |𝐴|+|𝐵|:=|𝐴+𝐵|. The codomain Card is a set, so the result is independent of the representative. Eliminate the first truncation in the same way. Products and exponentials are well defined by the same two eliminations, using 𝐴×𝐵 and 𝐵→𝐴.
Proof. Every asserted equality is a mere proposition, so truncation induction reduces it to representatives. The additive laws are induced by the equivalences (𝐴+𝐵)+𝐶≃𝐴+(𝐵+𝐶),𝐴+𝐵≃𝐵+𝐴,𝟎+𝐴≃𝐴. The multiplicative laws are induced by (𝐴×𝐵)×𝐶≃𝐴×(𝐵×𝐶),𝐴×𝐵≃𝐵×𝐴,𝟏×𝐴≃𝐴,𝟎×𝐴≃𝟎. Distributivity is induced by 𝐴×(𝐵+𝐶)≃(𝐴×𝐵)+(𝐴×𝐶),(𝐵+𝐶)×𝐴≃(𝐵×𝐴)+(𝐶×𝐴). Univalence turns each equivalence into the required cardinal equality. Finally, the displayed exponentiation laws are induced respectively by (𝟎→𝐴)≃𝟏,(𝟏→𝐴)≃𝐴,(𝐵+𝐶→𝐴)≃(𝐵→𝐴)×(𝐶→𝐴),𝐶→(𝐴×𝐵)≃(𝐶→𝐴)×(𝐶→𝐵),𝐵×𝐶→𝐴≃𝐶→(𝐵→𝐴). ◻
Proof. Let 𝑓:𝐴→(𝐴→𝟐) and define 𝑔(𝑎):=¬𝑓(𝑎)(𝑎), with ¬ the Boolean negation. A surjection would merely provide 𝑎0 with 𝑓(𝑎0)=𝑔; applying both sides to 𝑎0 gives 𝑓(𝑎0)(𝑎0)=¬𝑓(𝑎0)(𝑎0), contradicting 𝗍𝗍≠𝖿𝖿 (theorem 29.14) after case analysis on 𝑓(𝑎0)(𝑎0). Since 𝟎 is a mere proposition, mere existence suffices for the contradiction. ◻
Assuming the law of excluded middle for mere propositions, for sets 𝐴,𝐵 there is a map inj(𝐴,𝐵)→inj(𝐵,𝐴)→(𝐴≅𝐵); hence, assuming LEM, ≤ on Card is a partial order.
Proof. Let 𝑓:𝐴→𝐵 and 𝑔:𝐵→𝐴 be injections. Define subsets of 𝐴 by 𝐶0:=𝐴∖im(𝑔),𝑞𝑞𝑢𝑎𝑑𝐶𝑛+1:=𝑔(𝑓(𝐶𝑛)),𝑞𝑞𝑢𝑎𝑑𝐶:=⋃𝑛:ℕ𝐶𝑛. Membership in each subset is a mere proposition, and LEM decides membership in 𝐶. If 𝑎∈𝐶, put ℎ(𝑎):=𝑓(𝑎). If 𝑎∉𝐶, then 𝑎∉𝐶0, so there is a unique 𝑏:𝐵 with 𝑔(𝑏)=𝑎; put ℎ(𝑎):=𝑏.
Suppose ℎ(𝑎)=ℎ(𝑎′). If 𝑎,𝑎′∈𝐶, injectivity of 𝑓 gives 𝑎=𝑎′. If neither lies in 𝐶, applying 𝑔 to the equality gives 𝑎=𝑎′. In the remaining case, say 𝑎∈𝐶𝑛 and 𝑎′∉𝐶, the equality 𝑓(𝑎)=ℎ(𝑎′) gives 𝑎′=𝑔(𝑓(𝑎))∈𝐶𝑛+1, a contradiction. Thus ℎ is injective.
For surjectivity, take 𝑏:𝐵. If 𝑔(𝑏)∉𝐶, the unique inverse clause gives ℎ(𝑔(𝑏))=𝑏. If 𝑔(𝑏)∈𝐶, then 𝑔(𝑏)∉𝐶0 and its membership witness has successor form: 𝑔(𝑏)=𝑔(𝑓(𝑎)) for some 𝑎∈𝐶𝑛. Injectivity of 𝑔 gives 𝑏=𝑓(𝑎)=ℎ(𝑎). Hence ℎ:𝐴≅𝐵.
Reflexivity and transitivity of cardinal inequality come from identity and composition of injections. Given both |𝐴|≤|𝐵| and |𝐵|≤|𝐴|, eliminate the two propositional truncations into the proposition |𝐴|=|𝐵|, apply the construction above, and use univalence. Thus ≤ is antisymmetric. ◻
Let 𝐴 be a set with a mere relation <:𝐴→𝐴→Prop. The family 𝖺𝖼𝖼:𝐴→U is inductively generated by the single rule
Γ⊢𝑎:𝐴Γ⊢ℎ:∏𝑏:𝐴(𝑏<𝑎)→𝖺𝖼𝖼(𝑏)
Γ⊢𝖺𝖼𝖼<(𝑎,ℎ):𝖺𝖼𝖼(𝑎)
Acc-Intro
with the corresponding induction principle for an indexed inductive family (cf. chapter 28). An inhabitant of 𝖺𝖼𝖼(𝑎) is an accessibility witness: it contains accessibility witnesses for every predecessor of 𝑎. The relation < is well-founded if ∏𝑎:𝐴𝖺𝖼𝖼(𝑎).
Proof. Fix 𝑎 and an accessibility witness 𝑢:𝖺𝖼𝖼(𝑎). Induct on 𝑢 with motive 𝑃(𝑎,𝑢):=∏𝑣:𝖺𝖼𝖼(𝑎)𝑢=𝑣. In the constructor case 𝑢=𝖺𝖼𝖼<(𝑎,ℎ1), take 𝑣=𝖺𝖼𝖼<(𝑎,ℎ2). For every 𝑏:𝐴 and 𝑟:𝑏<𝑎, the induction hypothesis at ℎ1(𝑏,𝑟) gives ℎ1(𝑏,𝑟)=ℎ2(𝑏,𝑟). Function extensionality first in 𝑟 and then in 𝑏 gives ℎ1=ℎ2. Congruence of 𝖺𝖼𝖼<(𝑎,−) therefore gives 𝑢=𝑣. Hence every two witnesses of 𝖺𝖼𝖼(𝑎) are equal. A dependent product of mere propositions is a mere proposition, so well-foundedness is one as well. ◻
A well-founded mere relation < on a set 𝐴 is extensional if ∏𝑎:𝐴∏𝑏:𝐴(∏𝑐:𝐴(𝑐<𝑎)↔(𝑐<𝑏))→(𝑎=𝑏). An ordinal is a set with an extensional, well-founded, transitive mere relation; Ord denotes the type of ordinals in U.
Proof. By univalence and the machinery of theorem 74.44 it suffices to show that the only automorphism 𝑓 of an extensional well-founded (𝐴,<) is the identity. By well-founded induction suppose 𝑓(𝑎′)=𝑎′ for all 𝑎′<𝑎. For 𝑐<𝑎 we get 𝑓(𝑐)=𝑐, so 𝑐<𝑓(𝑎) (as 𝑓 preserves <). Conversely, if 𝑐<𝑓(𝑎), preservation by 𝑓−1 gives 𝑓−1(𝑐)<𝑎. The induction hypothesis gives 𝑓−1(𝑐)=𝑐, hence 𝑐<𝑎. Thus 𝑎 and 𝑓(𝑎) have the same predecessors, so extensionality gives 𝑓(𝑎)=𝑎. ◻
For ordinals (𝐴,<), (𝐵,<), a simulation is a map 𝑓:𝐴→𝐵 such that (i) 𝑎<𝑎′ implies 𝑓(𝑎)<𝑓(𝑎′), and (ii) whenever 𝑏<𝑓(𝑎) there merely exists 𝑎′<𝑎 with 𝑓(𝑎′)=𝑏. We write 𝐴≤𝐵 for the mere proposition that one exists, and 𝐴<𝐵 if some simulation identifies 𝐴 with an initial segment {𝑏′:𝐵∣𝑏′<𝑏} of 𝐵.
A simulation between two ordinals is injective, and any two simulations 𝑓,𝑔:𝐴→𝐵 are equal. If simulations exist in both directions, they form an isomorphism of the underlying extensional well-founded relations.
Proof. Fix a simulation 𝑓:𝐴→𝐵. Prove by well-founded induction on 𝑎:𝐴 the strengthened motive 𝑃(𝑎):=∏𝑎′:𝐴(𝑓(𝑎)=𝑓(𝑎′))→(𝑎=𝑎′). Suppose 𝑓(𝑎)=𝑓(𝑎′). If 𝑐<𝑎, then 𝑓(𝑐)<𝑓(𝑎′); the initial-segment clause at 𝑎′ gives, under propositional truncation, 𝑐′<𝑎′ with 𝑓(𝑐′)=𝑓(𝑐). The target 𝑐=𝑐′ is a mere proposition, so eliminate the truncation and apply the induction hypothesis 𝑃(𝑐) to obtain it. Conversely, if 𝑐′<𝑎′, the same clause at 𝑎 gives 𝑐<𝑎 with 𝑓(𝑐)=𝑓(𝑐′), and 𝑃(𝑐) again gives 𝑐=𝑐′. Thus 𝑎 and 𝑎′ have the same predecessors. Extensionality of 𝐴 gives 𝑎=𝑎′, completing the induction and proving that 𝑓 is injective.
For uniqueness, induct on 𝑎:𝐴. If 𝑏<𝑓(𝑎), the initial-segment clause gives 𝑎′<𝑎 with 𝑓(𝑎′)=𝑏. The induction hypothesis gives 𝑓(𝑎′)=𝑔(𝑎′), so 𝑏<𝑔(𝑎). The converse is symmetric. Extensionality of 𝐵 yields 𝑓(𝑎)=𝑔(𝑎), and function extensionality gives 𝑓=𝑔.
Given 𝑓:𝐴→𝐵 and 𝑔:𝐵→𝐴, both 𝑔∘𝑓 and id𝐴 are simulations; uniqueness in 𝐴 gives 𝑔∘𝑓=id𝐴. Both 𝑓∘𝑔 and id𝐵 are simulations, so uniqueness in 𝐵 gives 𝑓∘𝑔=id𝐵. Hence 𝑓 and 𝑔 are inverse isomorphisms preserving the relations. ◻
Transitivity. Suppose 𝐴<𝐵 is represented by a simulation identifying 𝐴 with 𝐵↓𝑏, and 𝐵<𝐶 by one identifying 𝐵 with 𝐶↓𝑐. Their composite identifies 𝐴 with 𝐶↓𝑓(𝑏), where 𝑓(𝑏)<𝑐; hence 𝐴<𝐶.
Extensionality. Suppose 𝑋<𝐴 if and only if 𝑋<𝐵 for every small ordinal 𝑋. For each 𝑎:𝐴, the relation 𝐴↓𝑎<𝐴 gives a unique 𝑏:𝐵 such that 𝐴↓𝑎=𝐵↓𝑏. Uniqueness follows from extensionality of 𝐵, so propositional elimination defines 𝑓(𝑎):=𝑏. If 𝑎′<𝑎, then 𝐴↓𝑎′<𝐴↓𝑎; transporting across the displayed equalities gives 𝑓(𝑎′)<𝑓(𝑎). Conversely, every 𝑏′<𝑓(𝑎) determines the predecessor ordinal 𝐵↓𝑏′<𝐵↓𝑓(𝑎) and therefore a unique 𝑎′<𝑎 with 𝑓(𝑎′)=𝑏′. Thus 𝑓:𝐴→𝐵 is a simulation. The symmetric construction gives a simulation 𝐵→𝐴, so lemma 210.12 and the structure identity principle give 𝐴=𝐵.
Well-foundedness. Fix 𝐴 and prove 𝖺𝖼𝖼(𝐴↓𝑎) by well-founded induction on 𝑎:𝐴. The proposition 𝑋<𝐴↓𝑎 is, by definition, the truncation of a pair 𝑢:(𝐴↓𝑎) and a relation isomorphism 𝑋≅(𝐴↓𝑎)↓𝑢. Write 𝑢=(𝑎′,𝑟), where 𝑟:𝑎′<𝑎. There is a relation isomorphism (𝐴↓𝑎)↓(𝑎′,𝑟)≅𝐴↓𝑎′ whose forward map sends ((𝑏,𝑠),𝑡) to (𝑏,𝑡) and whose inverse sends (𝑏,𝑡) to ((𝑏,𝗍𝗋𝖺𝗇𝗌(𝑡,𝑟)),𝑡). The structure identity principle therefore gives 𝑋=𝐴↓𝑎′. Because accessibility is a mere proposition, we may eliminate the truncation; the induction hypothesis at 𝑎′<𝑎 then gives 𝖺𝖼𝖼(𝑋). Hence Acc-Intro gives 𝖺𝖼𝖼(𝐴↓𝑎).
Finally, an element of 𝑋<𝐴 is exactly a truncated pair of 𝑎:𝐴 and a relation isomorphism 𝑋≅𝐴↓𝑎. Eliminate it into the proposition 𝖺𝖼𝖼(𝑋) and use the result just proved. One more use of Acc-Intro gives 𝖺𝖼𝖼(𝐴). Thus the relation on OrdU is well founded. Its carrier belongs to the next universe by construction. ◻
No Burali–Forti contradiction follows. The type OrdU belongs to the next universe, and the assignment 𝐴↦{𝐵∣𝐵<𝐴} does not lower that universe level.
★★★ For each equivalence used in lemma 74.49, write its inverse and verify both composites. Then show that ≤ is compatible with + and ⋅, and that exponentiation is monotone in its base: 𝛼≤𝛽 implies 𝛼𝛾≤𝛽𝛾.
★★☆ Let 𝑒:𝐴→(𝐴→𝟐) be arbitrary and define 𝑑(𝑎):=𝗇𝗈𝗍(𝑒(𝑎)(𝑎)). Prove that no 𝑎:𝐴 satisfies 𝑒(𝑎)=𝑑, and conclude that no map 𝐴→(𝐴→𝟐) is surjective. State precisely where function congruence and Boolean separation enter the argument, and explain why excluded middle is not used.
★★★Practical project.finite-cardinal-evaluator Implement in Agda or Kappa a finite evaluator for cardinal expressions built from 0, 1, natural-number constants, sum, product, and exponentiation. Check a sum, distributivity, (𝑎𝑏)𝑐=𝑎𝑏𝑐, and the finite Cantor inequality 𝑛<2𝑛 on named inputs. Mutation test: replace the sum clause by its left operand; the sum or distributivity acceptance test must then fail. The program tests finite representatives only and must not claim to decide equality of arbitrary cardinals.
The set-level and ordinal developments follow Chapter 10 of the HoTT Book [Uni13]. In particular, ordinals are sets with extensional, well-founded, transitive relations, and the type of small ordinals is itself an ordinal one universe higher. None of the cardinal or ordinal constructions depends on the optional real-number completion.