Nuprl-Style Computational Type Theory and Realizability
Let 𝑒:=(𝜆𝑥.𝑥+1)(1+1). The program carries no type annotation. Lazy evaluation nevertheless fires the outer function, computes 1+1, and then computes 2+1, yielding the canonical integer 3. The exact contractions are frozen immediately below. The question “is 𝑒 a natural number?” is therefore not answered by inspecting an intrinsic typing derivation. It is answered by specifying which closed computations count as natural numbers and which of them count as the same natural number. This reversal—computation first, typehood second—is the point of computational type theory.
Programs precede types
The object language has one syntactic class. Integers, functions, pairs, types, and proofs are all untyped terms; typehood is a semantic property of a closed term.
Fix a library L and the pinned NuprlInCoq source. The printed fragment uses closed well-formed nominal terms modulo alpha-equivalence and the artifact’s lazy deterministic computation. Its canonical values include 𝑧,𝜆𝑥.𝑒,(𝑒1,𝑒2),𝖺𝗑𝗂𝗈𝗆,𝖨𝗇𝗍,∏𝑥:𝐴𝐵,∑𝑥:𝐴𝐵,𝖤𝗊𝐴(𝑎,𝑏),{𝑥:𝐴∣𝐵},U𝑖, where 𝑧∈ℤ. The selected root contractions are (𝜆𝑥.𝑏)𝑎𝐶−𝛽⇝0𝑏[𝑎/𝑥],𝗌𝗉𝗋𝖾𝖺𝖽((𝑎,𝑏);𝑥,𝑦.𝑐)𝐶−𝑠𝑝𝑟𝑒𝑎𝑑⇝0𝑐[𝑎/𝑥,𝑏/𝑦],𝑧1+𝑧2𝐶−𝑎𝑑𝑑⇝0𝑧1+ℤ𝑧2,𝑧1−𝑧2𝐶−𝑠𝑢𝑏⇝0𝑧1−ℤ𝑧2,𝑧1mod𝑧2𝐶−𝑟𝑒𝑚⇝0srem(𝑧1,𝑧2)(𝑧2≠0),𝖫𝖾ℤ(𝑧1,𝑧2)𝐶−𝑙𝑒−𝑦𝑒𝑠⇝0𝖤𝗊𝖨𝗇𝗍(0,0)(𝑧1≤𝑧2),𝖫𝖾ℤ(𝑧1,𝑧2)𝐶−𝑙𝑒−𝑛𝑜⇝0𝖤𝗊𝖨𝗇𝗍(0,1)(𝑧2<𝑧1). Here srem is the pinned signed remainder; the only number-theoretic property used below is srem(𝑧,𝑑)=0 exactly when nonzero 𝑑 divides 𝑧. Application, pair elimination, integer arithmetic—including subtraction and the integer-remainder program, written 𝑎mod𝑏—and integer tests are noncanonical terms. Evaluation of a closed term 𝑎 to a canonical value 𝑣 is written 𝑎⇓𝑣; evaluation reduces only a principal argument needed to expose the required root contraction. The library parameter is suppressed in these judgments because every one uses the same L.
Write 𝑎⟶L𝑎′ for the compatible closure of the frozen root contractions under every program context, including contexts below a binder. Write 𝑎⟶∗L𝑎′ for its reflexive-transitive closure, and write 𝑎≡L𝑎′ for the reflexive, symmetric, transitive closure of ⟶L. This computational conversion includes beta, spread, and integer contractions. It is a congruence by construction; in particular, 𝑓≡L𝑔 implies 𝑓𝑢≡L𝑔𝑢.
The principal type system contains integers, dependent functions, dependent pairs, equality types, the universe hierarchy, and set types. The source contains further constructors, including partial types and W-types, but they are not premises of the printed core. Most importantly, although per/per.v defines a candidate quotient relation, its close inductive explicitly has no quotient constructor. Quotients are therefore absent from this system card and are reconstructed in section 91.7.
The artifact’s default build copies util/universe-type.v to util/universe.v, per/universe2_prop.v to per/universe2.v, and per/choice-prop.v to per/choice.v. The latter declares the metatheoretic axiom FunctionalChoice_on. This assumption chooses a family of PER witnesses from propositional existentials. It is an assumption of the pinned default build, not an internal Nuprl choice principle and not a theorem of Coq.
Put Ω:=(𝜆𝑥.𝑥𝑥)(𝜆𝑥.𝑥𝑥). Root contraction reproduces Ω, so it has no canonical value. Nevertheless, (𝜆𝑥.7)Ω𝛽⟶7⇓7. The evaluator does not inspect Ω because the function body does not inspect 𝑥. A call-by-value meaning explanation would reject this calculation and would define different function PERs.
★☆☆ Let 𝑝:=((𝜆𝑥.0)Ω,1+2). State whether 𝑝 is a canonical value before either component is evaluated. Then evaluate the two eliminations 𝗌𝗉𝗋𝖾𝖺𝖽(𝑝;𝑥,𝑦.𝑥) and 𝗌𝗉𝗋𝖾𝖺𝖽(𝑝;𝑥,𝑦.𝑦). Mark every point at which laziness avoids a reduction.
Integer membership needs both convergence and an equality criterion. Merely collecting terms that evaluate to integers would not say whether two programs denote the same integer.
A partial equivalence relation (PER) on closed programs is a binary predicate 𝑅(𝑎,𝑏) that is symmetric and transitive. Its domain is dom(𝑅):={𝑎∣𝑅(𝑎,𝑎)}. Reflexivity is required only on the domain: if 𝑅(𝑎,𝑏), then symmetry and transitivity give 𝑅(𝑎,𝑎) and 𝑅(𝑏,𝑏).
Define 𝑅ℤ(𝑎,𝑏)⟺∃𝑧∈ℤ.𝑎⇓𝑧∧𝑏⇓𝑧. Determinism of evaluation proves symmetry and transitivity. The program 𝑒 from the opening belongs to its domain because 𝑒⇓3. The program Ω does not: no integer 𝑧 satisfies Ω⇓𝑧.
★☆☆ On the integers define 𝑆(𝑚,𝑛) by |𝑚−𝑛|=1. Prove that 𝑆 is symmetric but not transitive. Then define 𝑇(𝑚,𝑛) by “𝑚 and 𝑛 have the same parity” and prove that 𝑇 is a PER. Compute both domains.
The dependent constructors require a family of PERs. Suppose 𝑅𝐴 is the PER assigned to 𝐴. A PER family over 𝑅𝐴 assigns a PER 𝑅𝑎,𝑎′𝐵 whenever 𝑅𝐴(𝑎,𝑎′); this is semantic data, not an intrinsically typed family.
The family is functional when it is invariant over an 𝑅𝐴-equivalence class: if 𝑅𝐴(𝑎,𝑎′),𝑅𝐴(𝑏,𝑏′),𝑅𝐴(𝑎,𝑏), then 𝑅𝑎,𝑎′𝐵 and 𝑅𝑏,𝑏′𝐵 are logically equivalent binary relations. Thus the assigned fiber PER depends only on the related domain class, not on its representatives or on evidence for their relatedness.
Let 𝑅𝐴 be a PER and let 𝑅𝑎,𝑎′𝐵 be a functional PER family over it. Write Inh(𝑅) for ∃𝑢.𝑅(𝑢,𝑢). The member equalities of the selected canonical types are the following predicates: 𝑅Π(𝑓,𝑔)⟺∀𝑎,𝑎′.𝑅𝐴(𝑎,𝑎′)⇒𝑅𝑎,𝑎′𝐵(𝑓𝑎,𝑔𝑎′),𝑅Σ(𝑝,𝑞)⟺∃𝑎,𝑎′,𝑏,𝑏′.𝑝⇓(𝑎,𝑏)∧𝑞⇓(𝑎′,𝑏′)∧𝑅𝐴(𝑎,𝑎′)∧𝑅𝑎,𝑎′𝐵(𝑏,𝑏′),𝑅𝖤𝗊𝐴(𝑎,𝑏)(𝑝,𝑞)⟺𝑝⇓𝖺𝗑𝗂𝗈𝗆∧𝑞⇓𝖺𝗑𝗂𝗈𝗆∧𝑅𝐴(𝑎,𝑏),𝑅𝖲𝖾𝗍(𝑡,𝑢)⟺𝑅𝐴(𝑡,𝑢)∧Inh(𝑅𝑡,𝑢𝐵). Equation (91.2) is extensional: neither 𝑓 nor 𝑔 must evaluate to a lambda. Equation (91.3) does require pair values. The equality type is empty when 𝑅𝐴(𝑎,𝑏) fails and otherwise has the single canonical witness 𝖺𝗑𝗂𝗈𝗆. A set member is the same program as its ambient member; inhabitance of the predicate is checked but no proof is paired with the program.
The last clause distinguishes a set type from a dependent pair. If 𝑛∈ℤ satisfies a predicate 𝑃, then 𝑛 itself is a member of {𝑥:𝖨𝗇𝗍∣𝑃(𝑥)}; (𝑛,𝑝) is instead a member of a dependent pair type.
A candidate type systemC is a collection of triples C(𝐴,𝐵,𝑅), read “𝐴 and 𝐵 are equal types with member PER 𝑅.” Relations that are logically equivalent are identified. The closure operator adds the integer triple, the following four type-equality generators, and evaluation saturation, which closes type assignment under evaluation of both endpoints: if 𝐴⇓𝐴0, 𝐵⇓𝐵0, and C(𝐴0,𝐵0,𝑅), then C(𝐴,𝐵,𝑅). Its dependent clauses require equal domains and a functional family of equal codomains. The least closed system is the intersection of all systems closed under these clauses. Equivalently, it is the inductively generated least fixed point of the monotone closure operator. We use closure induction: a property of all triples follows by checking evaluation saturation and every displayed generator, assuming the property for their recursive premises. A dependent generator has one premise for every related input, so its generated proof tree may be infinitely branching. We call any such well-founded generated tree a closure derivation; it need not be a finite proof tree.
The generators are exact. First, C(𝖨𝗇𝗍,𝖨𝗇𝗍,𝑅ℤ). For the remaining four, grouped in three clauses, suppose C(𝐴,𝐴′,𝑅𝐴).
If every 𝑅𝐴(𝑎,𝑎′) determines C(𝐵[𝑎/𝑥],𝐵′[𝑎′/𝑥],𝑅𝑎,𝑎′𝐵), and equal choices of related inputs determine logically equivalent fiber PERs as in definition 91.5, add C(∏𝑥:𝐴𝐵,∏𝑥:𝐴′𝐵′,𝑅Π)andC(∑𝑥:𝐴𝐵,∑𝑥:𝐴′𝐵′,𝑅Σ), with the relations of equation 91.2, equation 91.3.
If 𝑅𝐴(𝑎,𝑎′) and 𝑅𝐴(𝑏,𝑏′), add C(𝖤𝗊𝐴(𝑎,𝑏),𝖤𝗊𝐴′(𝑎′,𝑏′),𝑅𝖤𝗊𝐴(𝑎,𝑏)). If 𝑅𝐴(𝑎,𝑏), invert 𝑅𝐴(𝑎,𝑎′) to obtain 𝑅𝐴(𝑎′,𝑎). Compose this edge with 𝑅𝐴(𝑎,𝑏), then compose the result with 𝑅𝐴(𝑏,𝑏′). The result is 𝑅𝐴(𝑎′,𝑏′). Reversing the three edges proves the converse. Hence 𝑅𝐴(𝑎,𝑏) holds if and only if 𝑅𝐴(𝑎′,𝑏′), and the endpoint test is independent of which equal side is used.
If every 𝑅𝐴(𝑡,𝑢) determines C(𝐵[𝑡/𝑥],𝐵′[𝑢/𝑥],𝑅𝑡,𝑢𝐵), with the same functionality condition of definition 91.5 on fiber PERs, add C({𝑥:𝐴∣𝐵},{𝑥:𝐴′∣𝐵′},𝑅𝖲𝖾𝗍).
Canonical constructor tags are disjoint, and each displayed type constructor is injective in its syntactic arguments. These no-confusion facts are part of the closure presentation; they prevent two different generators from assigning unrelated PERs to the same canonical type pair.
Let C0 be the least closure with no universe generator. Given C𝑖, define the universe PER by 𝑅U𝑖(𝐴,𝐵)⟺∃𝑅.C𝑖(𝐴,𝐵,𝑅), and let C𝑖+1 be the least closure extending C𝑖 and containing the generator C𝑖+1(U𝑖,U𝑖,𝑅U𝑖). Thus U𝑖 classifies the types built at lower stratum 𝑖, and U𝑖 is itself a member of U𝑖+1. At 𝑖=0 the generator reads C1(U0,U0,𝑅U0), displaying the first universe classified by the artifact’s hierarchy. Since C𝑖+1 extends C𝑖, every type equality and member equality persists at higher strata. Displaying only the first level does not remove the functional-choice assumption recorded in convention 91.1.
The least closure is forced by monotonicity. If a constructor is removed, the intersection construction still exists but no longer assigns a meaning to that constructor. In particular, a definition of a quotient-shaped predicate elsewhere in the source does not put quotient types in the closure.
For every 𝑖, if C𝑖(𝐴,𝐵,𝑅), then 𝑅 is a PER. Moreover, with relations identified up to logical equivalence, C𝑖(𝐴,𝐵,𝑅)⟹C𝑖(𝐵,𝐴,𝑅),C𝑖(𝐴,𝐵,𝑅)∧C𝑖(𝐵,𝐷,𝑅)⟹C𝑖(𝐴,𝐷,𝑅),C𝑖(𝐴,𝐵,𝑅)∧C𝑖(𝐴,𝐵,𝑆)⟹∀𝑎,𝑏.(𝑅(𝑎,𝑏)⟺𝑆(𝑎,𝑏)). The last implication is called unique valuation: fixed type endpoints determine their member PER up to logical equivalence.
Proof. Proceed simultaneously by stratum. Within one stratum prove four separate statements by induction on closure derivations: assigned relations are PERs, type equality is symmetric, composable type equalities are transitive, and two derivations with the same endpoints assign logically equivalent relations. Evaluation saturation uses determinism: the endpoints have unique canonical heads. Constructor no-confusion then selects the same generator, and constructor injectivity aligns its premises.
For integers, symmetry and transitivity are the corresponding properties of (91.1). For functions, suppose 𝑅Π(𝑓,𝑔) and 𝑅Π(𝑔,ℎ). The PER laws applied to 𝑅𝐴(𝑎,𝑐) give 𝑅𝐴(𝑐,𝑐). By the first hypothesis at (𝑎,𝑐), 𝑅𝑎,𝑐𝐵(𝑓𝑎,𝑔𝑐), and by the second at (𝑐,𝑐), 𝑅𝑐,𝑐𝐵(𝑔𝑐,ℎ𝑐). Definition 91.5 identifies these fiber PERs; their transitivity gives 𝑅𝑎,𝑐𝐵(𝑓𝑎,ℎ𝑐). For symmetry, take 𝑅𝐴(𝑎,𝑎′). Symmetry of the domain relation gives 𝑅𝐴(𝑎′,𝑎), so the original function relation at (𝑎′,𝑎), followed by symmetry in 𝑅𝑎′,𝑎𝐵, gives 𝑅𝑎′,𝑎𝐵(𝑔𝑎,𝑓𝑎′). A second use of functional family invariance transports this fact from 𝑅𝑎′,𝑎𝐵 to 𝑅𝑎,𝑎′𝐵, as required for 𝑅Π(𝑔,𝑓).
For dependent pairs, the two hypotheses evaluate their common middle program to two pair values. By determinism, those values are the same pair. Transitivity of 𝑅𝐴, definition 91.5, and transitivity of the fiber PER then relate the outer components. Symmetry reverses the two evaluations and uses symmetry in both component PERs.
For an equality type, the assigned relation is empty when 𝑅𝐴(𝑎,𝑏) fails. When it holds, every related term evaluates to 𝖺𝗑𝗂𝗈𝗆, so symmetry and transitivity follow from determinism. For a set type, transitivity of 𝑅𝐴 relates the endpoints. Definition 91.5 identifies the predicate PERs at the three related inputs, so a witness of the middle predicate transports to a witness at the composite endpoints. The same identification proves symmetry.
For symmetry of type equality, reverse the domain premise and every functional fiber premise, then rebuild the same generator. For transitivity, canonicalize the common middle type. No-confusion forces the two derivations to have the same constructor tag; apply type transitivity recursively to the domain and fibers and rebuild that generator. For unique valuation, no-confusion and injectivity again align the two derivations. By the induction hypotheses, their domain and fiber PERs are logically equivalent, so the defining formulas equation 91.2, equation 91.3, equation 91.4, equation 91.5 are logically equivalent. This proves the three type-system properties rather than inferring them from the element-PER proof.
Finally, (91.6) uses all four induction hypotheses one stratum lower. Symmetry of C𝑖 gives symmetry of 𝑅U𝑖. For transitivity, choose C𝑖(𝐴,𝐵,𝑅) and C𝑖(𝐵,𝐷,𝑆). Symmetry followed by type transitivity gives both C𝑖(𝐵,𝐵,𝑅) and C𝑖(𝐵,𝐵,𝑆). Unique valuation at the common endpoints (𝐵,𝐵) identifies 𝑅 and 𝑆; only after this identification does type transitivity compose the two original closure triples to C𝑖(𝐴,𝐷,𝑅). Thus 𝑅U𝑖 is a PER. The same unique valuation argument makes the relation selected by any universe witness independent of that witness, and constructor no-confusion handles the universe generator. These cases exhaust the generators of definition 91.7. ◻
The predicate 𝖢𝖺𝗇𝖢𝗈𝗇𝗏L(𝑣,𝑤) holds when 𝑣,𝑤 have the same canonical tag and corresponding stored programs are computationally convertible. Explicitly, integers must be the same integer; axiom and 𝖨𝗇𝗍 match themselves; universes have the same level; pairs match componentwise; and 𝖢𝖺𝗇𝖢𝗈𝗇𝗏L(𝜆𝑥.𝑏,𝜆𝑥.𝑏′)⟺𝑏≡L𝑏′,𝖢𝖺𝗇𝖢𝗈𝗇𝗏L(∏𝑥:𝐴𝐵,∏𝑥:𝐴′𝐵′)⟺𝐴≡L𝐴′∧𝐵≡L𝐵′,𝖢𝖺𝗇𝖢𝗈𝗇𝗏L(∑𝑥:𝐴𝐵,∑𝑥:𝐴′𝐵′)⟺𝐴≡L𝐴′∧𝐵≡L𝐵′,𝖢𝖺𝗇𝖢𝗈𝗇𝗏L(𝖤𝗊𝐴(𝑎,𝑏),𝖤𝗊𝐴′(𝑎′,𝑏′))⟺𝐴≡L𝐴′∧𝑎≡L𝑎′∧𝑏≡L𝑏′,𝖢𝖺𝗇𝖢𝗈𝗇𝗏L({𝑥:𝐴∣𝐵},{𝑥:𝐴′∣𝐵′})⟺𝐴≡L𝐴′∧𝐵≡L𝐵′. The bodies and fibers are compared as open programs with the displayed bound variable chosen fresh on both sides. This is legitimate because ⟶L was defined under binders.
Proof. We prove both directions simultaneously with a strengthened induction hypothesis. Let 𝑃(ℎ) and 𝑅(ℎ) be the two conclusions for every finite compatible reduction whose known evaluation derivation has height at most ℎ. Use strong induction on ℎ, and inside it induction on the length of the reduction. The strong form is essential: substitution may duplicate a redex, so the residual tail can contain more contractions than the incoming reduction, but its evaluation derivation is strictly shorter.
The required residual calculation is structural induction on the program with capture-avoiding renaming at binders: 𝑎⟶L𝑎′⟹𝑏[𝑎/𝑥]⟶∗L𝑏[𝑎′/𝑥],𝑏⟶L𝑏′⟹𝑏[𝑎/𝑥]⟶L𝑏′[𝑎/𝑥]. The first implication contains one residual for every free occurrence of 𝑥; if 𝑥 is absent it is reflexive. Iterating the two equations handles a finite reduction of either the body or the argument.
We use one further decomposition, proved by induction on the compatible contexts in the reduction trace. Relative to the next lazy rule, every step is either in its demanded principal argument, is that root rule, or is disjoint from the demanded position. Disjoint steps commute past the demand; after beta or spread their residuals are exactly those in (91.7), (91.8). Hence a finite trace factors into a trace on the demanded argument, at most one demanded root contraction, and a finite trace on the evaluation tail. This demand–residual decomposition also holds in reverse: reinsert the same root contraction and commute disjoint steps back across it. The proof uses no confluence claim; it is a case analysis on beta, spread, and the four displayed integer schemes.
Now inspect the known evaluation. If its source is canonical, no root rule applies. Every compatible step is below the same constructor, so the target is canonical and definition 91.9 holds for all stored components, including lambda bodies, dependent fibers, equality endpoints, and set predicates.
For an application, first apply 𝑃(ℎ′) or 𝑅(ℎ′), with ℎ′<ℎ, to the evaluation of its operator. The resulting lambda bodies are computationally convertible. The demand–residual decomposition and the two substitution equations make the beta tails 𝑏[𝑎/𝑥] and 𝑏′[𝑎′/𝑥] computationally convertible by a finite sequence in the required direction. The given evaluation of the first tail is a strict subderivation, so the strong hypothesis applies again and gives the same component-convertible observation. The spread case is identical with the two tail programs 𝑐[𝑎/𝑥,𝑏/𝑦] and 𝑐′[𝑎′/𝑥,𝑏′/𝑦]. This is why the proof does not claim that the tails are syntactically the same.
For an integer operation, apply the strong hypothesis successively to the demanded operands. Component conversion of integer observations is literal integer equality, so the same displayed arithmetic or comparison rule fires. A step in an undemanded program is carried into the shorter tail by the decomposition. A discarded beta argument gives the reflexive, zero-residual case. These cases exhaust the frozen program contexts and root contractions. They establish 𝑃(ℎ); reading the same decomposition from target to source and using 𝑅(ℎ′) on each strict evaluation subderivation establishes 𝑅(ℎ). Strong induction proves both conclusions. ◻
Let 𝑡,𝑢 be closed programs with 𝑡≡L𝑢. If 𝑡⇓𝑣, then there is a canonical value 𝑤 such that 𝑢⇓𝑤 and 𝑣≡L𝑤. Canonical outer tags are preserved. In particular, integer observations are the same integer, an axiom observation remains 𝖺𝗑𝗂𝗈𝗆, and a pair observation (𝑎,𝑏) is matched by a pair (𝑎0,𝑏0) with 𝑎≡L𝑎0 and 𝑏≡L𝑏0.
Proof of Lemma 91.11 — Coherence of frozen computation
Proof. Choose the finite zigzag of compatible contractions and reverse contractions that generates 𝑡≡L𝑢. Starting with 𝑡⇓𝑣, apply the preservation clause of lemma 91.10 at a forward edge and its reflection clause at a reverse edge. Induction on the zigzag length produces an observation at every vertex. The same induction preserves the canonical outer tag and composes the immediate component conversions. Congruence under every canonical constructor shows that component conversion implies conversion of the whole canonical programs. Its final vertex is 𝑢, which gives the required 𝑤. ◻
For every level 𝑖, closed programs 𝐴,𝐵,𝐴0,𝐵0,𝑎,𝑏,𝑎0,𝑏0, and binary relation 𝑅, closure assignment and every assigned member relation are stable under computational conversion: C𝑖(𝐴,𝐵,𝑅),𝐴≡L𝐴0,𝐵≡L𝐵0⟹C𝑖(𝐴0,𝐵0,𝑅),C𝑖(𝐴,𝐵,𝑅),𝑎≡L𝑎0,𝑏≡L𝑏0⟹(𝑅(𝑎,𝑏)⟺𝑅(𝑎0,𝑏0)).
Proof of Theorem 91.12 — Computational stability of closure and members
Proof. Proceed simultaneously by stratum, closure derivation, and generation of ≡L. It suffices to treat one compatible contraction; symmetry and transitivity then give arbitrary conversions. A contraction at a type root is removed or inserted by evaluation saturation. A contraction inside a canonical type constructor is handled by the induction hypothesis on the corresponding domain, endpoint, or fiber premise, after which the same generator rebuilds the closure triple. When a contraction exposes a canonical root, lemma 91.11 gives the matching observation. Constructor no-confusion ensures that no other root case occurs.
For the member relation, lemma 91.11 preserves the unique integer observed by (91.1). In the function case, congruence gives 𝑓𝑢≡L𝑓′𝑢 and 𝑔𝑢′≡L𝑔′𝑢′; the fiber induction hypothesis applied in (91.2) proves the equivalence. In the dependent-pair case, let 𝑝,𝑞,𝑝0,𝑞0 be closed programs satisfying 𝑅Σ(𝑝,𝑞), 𝑝≡L𝑝0, and 𝑞≡L𝑞0. Write the original observations as 𝑝⇓(𝑎,𝑏),𝑞⇓(𝑎′,𝑏′), with 𝑅𝐴(𝑎,𝑎′) and 𝑅𝑎,𝑎′𝐵(𝑏,𝑏′). Lemma 91.11 gives observations 𝑝0⇓(𝑎0,𝑏0) and 𝑞0⇓(𝑎′0,𝑏′0), where corresponding components are computationally convertible. Stability of 𝑅𝐴 gives 𝑅𝐴(𝑎0,𝑎′0). The PER laws first give 𝑅𝐴(𝑎,𝑎) and 𝑅𝐴(𝑎′,𝑎′); applying stability to one endpoint at a time then gives 𝑅𝐴(𝑎,𝑎0) and 𝑅𝐴(𝑎′,𝑎′0). Functionality of the family therefore identifies 𝑅𝑎,𝑎′𝐵 with 𝑅𝑎0,𝑎′0𝐵. Stability of that fiber relation transports 𝑅𝑎,𝑎′𝐵(𝑏,𝑏′) to 𝑅𝑎0,𝑎′0𝐵(𝑏0,𝑏′0). These are exactly the witnesses required by (91.3) for 𝑝0,𝑞0. In the equality case, the same lemma preserves evaluation to 𝖺𝗑𝗂𝗈𝗆. In the set case, apply the domain induction hypothesis to the ambient conjunct. If that conjunct holds, the PER laws give 𝑅𝐴(𝑡,𝑡) and 𝑅𝐴(𝑢,𝑢). The induction hypothesis for the ambient relation then gives 𝑅𝐴(𝑡,𝑡′) and 𝑅𝐴(𝑢,𝑢′) for converted representatives 𝑡′,𝑢′. Functionality identifies the two predicate-fiber PERs, so their inhabitance agrees. Finally, a universe member relation is a lower-stratum closure triple by (91.6); apply the closure-assignment half of the simultaneous induction one stratum lower. These are all generators of definition 91.7. ◻
Fix 𝑖. Suppose C𝑖(𝐾,𝐾′,𝑅) and the canonical types 𝐾,𝐾′ have the same outer constructor among Π, Σ, equality, and set. Then the derivation inverts to the corresponding generator of definition 91.7: its domain, endpoint, and functional-fiber premises hold, and 𝑅 is logically equivalent to the PER displayed for that generator in definition 91.6.
Moreover, if C𝑖(𝐴,𝐵,𝑅),C𝑖(𝐴,𝐴,𝑅𝐴),C𝑖(𝐵,𝐵,𝑅𝐵), then 𝑅, 𝑅𝐴, and 𝑅𝐵 are logically equivalent. Thus a member relation may be transported between the cross assignment for equal types and either endpoint’s self-assignment.
Proof of Corollary 91.13 — Canonical-form closure inversion and PER transport
Proof. Use closure induction on the well-founded generated derivation. An evaluation saturation step over canonical endpoints has, by determinism, the same canonical heads, so apply the induction hypothesis to its smaller premise. At the generating step, constructor no-confusion selects the unique matching generator and constructor injectivity recovers its arguments. Its premises and its defining PER clause are therefore exactly those in definition 91.7.
For transport, symmetry turns the cross derivation around without changing its assigned relation up to logical equivalence. Compose the two directions through 𝐵 and through 𝐴 to obtain self-endpoint derivations. Unique valuation at the identical endpoint pairs identifies their relations with 𝑅𝐴 and 𝑅𝐵, respectively. ◻
For closed programs, define the four judgments simultaneously by 𝖳𝗒𝖤𝗊𝑖(𝐴,𝐵)⟺∃𝑅.C𝑖(𝐴,𝐵,𝑅),𝖳𝗒𝑖(𝐴)⟺𝖳𝗒𝖤𝗊𝑖(𝐴,𝐴),𝖬𝖾𝗆𝖤𝗊𝑖(𝑎,𝑏;𝐴)⟺∃𝑅.C𝑖(𝐴,𝐴,𝑅)∧𝑅(𝑎,𝑏),𝖬𝖾𝗆𝑖(𝑎;𝐴)⟺𝖬𝖾𝗆𝖤𝗊𝑖(𝑎,𝑎;𝐴). The first equality compares types; the second compares members in a type. They are not one global equality relation. By theorem 91.8, equal types have the same member equality, but two unequal canonical type expressions may happen to assign extensionally the same PER. We say that 𝑎realizes𝐴 at level 𝑖 exactly when 𝖬𝖾𝗆𝑖(𝑎;𝐴). The assigned PER additionally identifies when two realizers count as the same member. This is PER-valued computational realizability for the frozen system card, not classical or Krivine realizability.
For every 𝑖 and closed programs 𝐴,𝐵, 𝖬𝖾𝗆𝖤𝗊𝑖+1(𝐴,𝐵;U𝑖)⟺𝖳𝗒𝖤𝗊𝑖(𝐴,𝐵). In particular, 𝖬𝖾𝗆1(𝖨𝗇𝗍;U0),𝖬𝖾𝗆𝑖+2(U𝑖;U𝑖+1). If 𝑗≥𝑖, then type equality and member equality at level 𝑖 persist at level 𝑗.
Proof of Proposition 91.15 — Universe classification and cumulative persistence
Proof. By definition 91.14, the left side of (91.9) says that some relation assigned to the self-pair (U𝑖,U𝑖) at level 𝑖+1 relates 𝐴 and 𝐵. Unique valuation in theorem 91.8 identifies that relation with 𝑅U𝑖. Unfolding (91.6) now gives 𝑅U𝑖(𝐴,𝐵)⟺∃𝑅.C𝑖(𝐴,𝐵,𝑅), which is exactly 𝖳𝗒𝖤𝗊𝑖(𝐴,𝐵).
The integer generator gives C0(𝖨𝗇𝗍,𝖨𝗇𝗍,𝑅ℤ), so the equivalence at 𝑖=0 puts 𝖨𝗇𝗍 in U0 at level 1. The universe generator gives C𝑖+1(U𝑖,U𝑖,𝑅U𝑖); applying the equivalence at 𝑖+1 puts U𝑖 in U𝑖+1 at level 𝑖+2. Finally, C𝑗 extends C𝑖 when 𝑗≥𝑖, so every witness for type or member equality at level 𝑖 is also a witness at level 𝑗. ◻
This proposition is the universe-introduction calculation for the displayed hierarchy. It does not postulate an elimination rule that reflects an arbitrary universe member into new syntax.
★☆☆ Using (91.4), prove that 𝖬𝖾𝗆𝑖(𝖺𝗑𝗂𝗈𝗆;𝖤𝗊𝖨𝗇𝗍(2+1,3)) and that 𝖤𝗊𝖨𝗇𝗍(2,3) has no member. State exactly where evaluation and exactly where integer equality are used.
Define the empty proposition 𝖥𝖺𝗅𝗌𝖾𝑐:=𝖤𝗊𝖨𝗇𝗍(0,1). The integer comparison program 𝖫𝖾ℤ(0,𝑛) evaluates to 𝖤𝗊𝖨𝗇𝗍(0,0) when 𝑛⇓𝑧 with 𝑧≥0, and to 𝖥𝖺𝗅𝗌𝖾𝑐 when 𝑧<0. Define ℕ:={𝑛:𝖨𝗇𝗍∣𝖫𝖾ℤ(0,𝑛)}. This is the set/refinement definition represented by mk_tnat in the pinned source.
Proof of Lemma 91.17 — The derived natural is a type
Proof. The integer generator assigns 𝑅ℤ to 𝖨𝗇𝗍. If 𝑅ℤ(𝑡,𝑢), both programs evaluate to one integer 𝑧. The two predicate programs 𝖫𝖾ℤ(0,𝑡) and 𝖫𝖾ℤ(0,𝑢) therefore evaluate to the same canonical equality type: 𝖤𝗊𝖨𝗇𝗍(0,0) when 𝑧≥0 and 𝖤𝗊𝖨𝗇𝗍(0,1) otherwise. The equality-type generator and evaluation saturation assign the same PER to those fibers. This verifies definition 91.5; the set generator applied to (91.10) derives 𝖳𝗒𝑖(ℕ). ◻
For every 𝑖 and closed programs 𝑎,𝑏, 𝖬𝖾𝗆𝑖(𝑎;ℕ)⟺∃𝑛∈ℤ.𝑛≥0∧𝑎⇓𝑛,𝖬𝖾𝗆𝖤𝗊𝑖(𝑎,𝑏;ℕ)⟺∃𝑛∈ℤ.𝑛≥0∧𝑎⇓𝑛∧𝑏⇓𝑛. Consequently every closed member of ℕ evaluates to a unique nonnegative integer.
Proof of Theorem 91.18 — Meaning and canonicity of derived naturals
Proof. By lemma 91.17, the set generator assigns a PER to ℕ. Unfold the set clause (91.5). Its first conjunct is the integer relation (91.1); it gives an integer 𝑛 to which the programs evaluate. Its second conjunct says that 𝖫𝖾ℤ(0,𝑛) is inhabited. By definition 91.16, this happens exactly when 𝑛≥0. This proves both directions of (91.12); the reflexive instance is (91.11). Determinism gives the uniqueness of 𝑛. ◻
For the opening program, the calculation 𝑒⇓3 and 3≥0 give 𝖬𝖾𝗆𝑖(𝑒;ℕ). The same raw program belongs both to 𝖨𝗇𝗍 and to ℕ; only the PER used to judge it has changed.
★☆☆ Use (91.11) to decide membership of −1, 0, (𝜆𝑥.𝑥)4, and Ω in ℕ. A yes-or-no answer without the relevant evaluation or failure of evaluation is incomplete.
A closed meaning does not yet justify the context 𝑥:𝐴⊢𝐵(𝑥). Substituting an arbitrary member for 𝑥 gives a closed type, but a dependent type must also ignore which representative of an equality class was chosen.
At level 𝑖, define pointwise functional contexts and equal substitutions simultaneously by telescope length. The empty telescope is pointwise functional, and its unique empty substitutions are equal. Write 𝜎≡Γ𝜏 for the equal-substitution relation generated at the stage for the telescope Γ. Having defined both notions for a pointwise functional Γ, declare Γ,𝑥:𝐴 pointwise functional exactly when ∀𝜎≡Γ𝜏.𝖳𝗒𝖤𝗊𝑖(𝐴[𝜎],𝐴[𝜏]). For such an extension, substitutions 𝜎[𝑥↦𝑎] and 𝜏[𝑥↦𝑏] are equal when 𝜎≡Γ𝜏 and 𝖬𝖾𝗆𝖤𝗊𝑖(𝑎,𝑏;𝐴[𝜎]). The use of 𝐴[𝜎] in the last display is legitimate because, by the preceding functionality clause, 𝖳𝗒𝖤𝗊𝑖(𝐴[𝜎],𝐴[𝜏]). This recursion is well founded because both clauses for an extension mention equal substitutions only for its shorter prefix.
Allen and the pinned artifact use “pointwise functional with respect to 𝜎” for the one-substitution condition that every 𝜏≡Γ𝜎 gives equal instantiated hypothesis types. The condition here quantifies that same requirement over every 𝜎. Throughout this chapter, Γ⊢𝑖 is defined only for contexts functional in this universal sense.
Proof of Lemma 91.20 — Endpoints of equal substitutions
Proof. Induct on Γ. For the empty telescope, its unique substitution is self-equal. For an extension, write the final components as 𝑎,𝑏. By the induction hypothesis, each prefix is self-equal. The cross-extension premise relates 𝑎,𝑏 in the PER assigned to the left type instance. PER symmetry and transitivity give self-relations for 𝑎 and 𝑏. By pointwise functionality, the left and right type instances are equal, and the transport clause of corollary 91.13 identifies their assigned PERs. Consequently the self-relation for 𝑎 extends the left prefix and the self-relation for 𝑏 extends the right prefix. ◻
For a functional context Γ, define Γ⊢𝑖𝑎=𝑏∈𝐴 if and only if, for all 𝜎≡Γ𝜏, 𝖳𝗒𝖤𝗊𝑖(𝐴[𝜎],𝐴[𝜏])and𝖬𝖾𝗆𝖤𝗊𝑖(𝑎[𝜎],𝑏[𝜏];𝐴[𝜎]). Membership Γ⊢𝑖𝑎∈𝐴 abbreviates the instance in which the second endpoint 𝑏 is 𝑎. Open type equality is the judgment Γ⊢𝑖𝐴=𝐵𝗍𝗒𝗉𝖾⟺∀𝜎≡Γ𝜏.𝖳𝗒𝖤𝗊𝑖(𝐴[𝜎],𝐵[𝜏]). Open typehood is its reflexive instance. The two substitutions in (91.14) are essential: one substitution would test only closed instances, not invariance under equal representatives.
Open inhabitance puts its witness quantifier inside the comparison of equal substitutions: Γ⊢𝑖𝐴𝗂𝗇𝗁𝖺𝖻𝗂𝗍𝖾𝖽⟺∀𝜎≡Γ𝜏.𝖳𝗒𝖤𝗊𝑖(𝐴[𝜎],𝐴[𝜏])∧∃𝑝.𝖬𝖾𝗆𝑖(𝑝;𝐴[𝜎]). The closed witness 𝑝 may depend on the pair (𝜎,𝜏). This judgment therefore asserts pointwise predicate inhabitance; it does not assert one uniform extract and does not store evidence in an ambient set member.
Let Γ:=𝑛:ℕ and 𝐵(𝑛):=𝖤𝗊𝖨𝗇𝗍(𝑛+0,𝑛). If 𝜎(𝑛) and 𝜏(𝑛) are equal in ℕ, then by (91.12), there is one nonnegative integer 𝑘 to which both evaluate. The two endpoint pairs are related in 𝑅ℤ: all four integer programs 𝜎(𝑛)+0,𝜏(𝑛)+0,𝜎(𝑛),𝜏(𝑛) evaluate to 𝑘. The equality-type generator therefore derives 𝖳𝗒𝖤𝗊𝑖(𝐵[𝜎],𝐵[𝜏]), and 𝑅ℤ(𝜎(𝑛)+0,𝜎(𝑛)) shows that 𝐵[𝜎] is inhabited by (91.4). Thus 𝐵 is functional, and 𝑛:ℕ⊢𝑖𝖺𝗑𝗂𝗈𝗆=𝖺𝗑𝗂𝗈𝗆∈𝐵(𝑛). If 𝐵(𝑛) instead inspected the source spelling of 𝑛, two programs evaluating to 𝑘 could select different result types; that family would fail functionality.
Restrict the pinned artifact to visible hypotheses 𝑥1:𝐴1,…,𝑥𝑛:𝐴𝑛 and a conclusion with extract 𝑎 and type 𝐴. Then the following are equivalent:
the sequent is true by the artifact’s list-of-terms definition sequent_true;
it is true by the artifact’s two-substitution definition VR_sequent_true.
Both items use the artifact’s global relations nuprl, tequality, and equality, built from its full close(univ) construction. This theorem does not identify them with any fixed indexed closure C𝑖.
Proof of Theorem 91.23 — Equivalence of the two pinned sequent meanings
Proof. This is the imported lemma sequent_true_eq_VR in the pinned per/sequents.v. Its proof is the chain 𝚜𝚎𝚚𝚞𝚎𝚗𝚝_𝚝𝚛𝚞𝚎_𝚎𝚚_𝙺𝙲,𝚜𝚎𝚚𝚞𝚎𝚗𝚝_𝚝𝚛𝚞𝚎_𝙺𝙲_𝚎𝚚_𝙰𝙽,𝙰𝙽_𝚜𝚎𝚚𝚞𝚎𝚗𝚝_𝚝𝚛𝚞𝚎_𝚎𝚚_𝚅𝚁. The intermediate KC and AN meanings account for the artifact’s full records, including coverage and the functionality condition on hypotheses. This is an external theorem of the pinned source, not a local induction on the fixed-level relation. Every relation in the chain is the global artifact relation; no quotient clause and no indexed C𝑖 is used. ◻
At a fixed level 𝑖, call two lists ⃗𝑡,⃗𝑢locally similar for Γ when their simultaneous substitutions 𝜎⃗𝑡,𝜎⃗𝑢 satisfy 𝜎⃗𝑡≡Γ𝜎⃗𝑢 by definition 91.19. The local list meaning of the single-extract sequent Γ⇒𝑎∈𝐴 requires, for every such pair, 𝖳𝗒𝖤𝗊𝑖(𝐴[𝜎⃗𝑡],𝐴[𝜎⃗𝑢])and𝖬𝖾𝗆𝖤𝗊𝑖(𝑎[𝜎⃗𝑡],𝑎[𝜎⃗𝑢];𝐴[𝜎⃗𝑡]). This is a local definition made from C𝑖, not a restriction of sequent_true.
For a pointwise functional Γ, the local list meaning of Γ⇒𝑎∈𝐴 is equivalent to Γ⊢𝑖𝑎=𝑎∈𝐴. Moreover, Γ⊢𝑖𝑎=𝑏∈𝐴 is equivalent to the local list meaning of the single-extract equality sequent with conclusion 𝖤𝗊𝐴(𝑎,𝑏) and extract 𝖺𝗑𝗂𝗈𝗆.
Proof of Proposition 91.25 — Local list and substitution correspondence
Proof. The first claim is a change of representation: lists and their simultaneous substitutions determine one another componentwise, and local similarity was defined to be ≡Γ. The two displayed conjuncts are therefore exactly (91.14).
For the binary claim, fix 𝜎≡Γ𝜏. By lemma 91.20, both endpoint substitutions are self-equal. Write 𝑅 for the PER assigned to the equal instances of 𝐴. The three indicated instances of binary open equality give 𝑅(𝑎[𝜎],𝑏[𝜎]),𝑅(𝑎[𝜎],𝑏[𝜏]),𝑅(𝑎[𝜏],𝑏[𝜏]) by using respectively (𝜎,𝜎), (𝜎,𝜏), and (𝜏,𝜏). Symmetry and transitivity give 𝑅(𝑎[𝜎],𝑎[𝜏]) and 𝑅(𝑏[𝜎],𝑏[𝜏]). The equality-former case of corollary 91.13, together with its transport clause, identifies these endpoint relations with the cross assignment used by the equality-type generator. Hence the two equality-type instances are equal, and the same-substitution first relation makes 𝖺𝗑𝗂𝗈𝗆 a member by (91.4).
Conversely, local truth gives 𝑅(𝑎[𝜎],𝑏[𝜎]). By the equality type conjunct and corollary 91.13, 𝑅(𝑏[𝜎],𝑏[𝜏]) holds after transport to the ambient assignment. Their transitive composite is 𝑅(𝑎[𝜎],𝑏[𝜏]), the member equality required by the binary open judgment. The ambient type equality is already a premise of the equality type generator. ◻
★★☆ Let 𝐴:=ℕ. Construct a two-element PER on raw representatives and a total meta-level assignment 𝐵 sending every closed raw representative to a closed type. Make every one-substitution instance a type but make 𝐵 fail pointwise functionality. Identify the pair of equal substitutions that reveals the failure. The assignment is a countermodel to the weakened test, not an object-language family admitted by the frozen fragment.
An inference rule is sound when its premises imply (91.14). The proof proceeds by taking two equal substitutions and calculating with the assigned PER. Rule names below are handles for these calculations; a matching name in the artifact is not itself a proof step.
Let Γ be functional. Assume every type and dependent family appearing in a conclusion below is well formed and functional under equal substitutions. Then the following rules are sound for the closed meanings of definition 91.6 and hence for the open meaning of definition 91.21:
Proof of Theorem 91.26 — Dependent function and pair rules
Proof. Fix 𝜎≡Γ𝜏 throughout. For C-Π-I, choose 𝑢,𝑢′ related in the self-assignment for 𝐴[𝜎]. Extend the substitutions by 𝑥↦𝑢 and 𝑥↦𝑢′. By the introduction premise, 𝑅𝑢,𝑢′𝐵(𝑏[𝜎,𝑢/𝑥],𝑏′[𝜏,𝑢′/𝑥]). Here the superscript denotes the fiber relation recovered by the Π-case of corollary 91.13; its transport clause moves the premise’s left-self assignment to that fiber relation. This is exactly the pointwise obligation in (91.2). The function generator applied to the functional domain and codomain families first establishes 𝖳𝗒𝖤𝗊𝑖((∏𝑥:𝐴𝐵)[𝜎],(∏𝑥:𝐴𝐵)[𝜏]). Beta contraction turns the applications of the two lambdas into the terms in the displayed fiber relation. By theorem 91.12, that relation therefore holds of the two applications, as required by (91.2).
For C-Π-E, invert the function premise with corollary 91.13. Its member conjunct is the function PER of (91.2). By the argument premise at (𝜎,𝜏), 𝑅𝐴(𝑎[𝜎],𝑎′[𝜏]), in the left domain assignment, so the function PER gives the required output relation after fiber transport. In the conclusion’s type-equality conjunct, the right endpoint still substitutes 𝑎, not 𝑎′. The required pair is exactly 𝖳𝗒𝖤𝗊𝑖(𝐵[𝑎/𝑥][𝜎],𝐵[𝑎/𝑥][𝜏]). Endpoint self-equality permits the argument-premise instance at (𝜏,𝜏), so 𝑅𝐴(𝑎[𝜏],𝑎′[𝜏]). Inverting this edge gives 𝑅𝐴(𝑎′[𝜏],𝑎[𝜏]); composing it after the cross edge 𝑅𝐴(𝑎[𝜎],𝑎′[𝜏]) gives 𝑅𝐴(𝑎[𝜎],𝑎[𝜏]). Hence 𝜎[𝑎[𝜎]/𝑥]≡Γ,𝑥:𝐴𝜏[𝑎[𝜏]/𝑥]. By functionality of 𝐵, the displayed type equality holds.
For C-Σ-I, the Sigma generator establishes the conclusion-type equality, and both pair terms are canonical without evaluating their components. By the first premise, 𝑅𝐴(𝑎[𝜎],𝑎′[𝜏]). The second premise is stated in the left substituted fiber; functionality and the transport clause of corollary 91.13 identify its assigned PER with 𝑅𝑎[𝜎],𝑎′[𝜏]𝐵. This is the final fiber conjunct of (91.3). For elimination, invert the Sigma member premise with corollary 91.13. Equation (91.3) then gives 𝑝[𝜎]⇓(𝑎,𝑏),𝑞[𝜏]⇓(𝑎′,𝑏′), with 𝑅𝐴(𝑎,𝑎′) and 𝑅𝑎,𝑎′𝐵(𝑏,𝑏′). Extend 𝜎,𝜏 by the two components and use the branch premise; the transport clause of corollary 91.13 aligns its member relation with the cross-assignment for 𝐶((𝑎,𝑏)) and 𝐶((𝑎′,𝑏′)). After the displayed evaluations expose the pair values, the root contractions are 𝗌𝗉𝗋𝖾𝖺𝖽((𝑎,𝑏);𝑥,𝑦.𝑐[𝜎])𝐶−𝑠𝑝𝑟𝑒𝑎𝑑⇝0𝑐[𝜎,𝑎/𝑥,𝑏/𝑦],𝗌𝗉𝗋𝖾𝖺𝖽((𝑎′,𝑏′);𝑥,𝑦.𝑐′[𝜏])𝐶−𝑠𝑝𝑟𝑒𝑎𝑑⇝0𝑐′[𝜏,𝑎′/𝑥,𝑏′/𝑦]. By theorem 91.12, the branch equality transports across these contractions to the two eliminator terms while they remain in the self-assignment for 𝐶((𝑎,𝑏)). The same theorem transports that closure assignment along 𝐶(𝑝)[𝜎]≡L𝐶((𝑎,𝑏)), and unique valuation identifies the resulting member relation with the self-assignment for 𝐶(𝑝)[𝜎]. For the conclusion’s type-equality conjunct, the Sigma premise at (𝜏,𝜏), together with its cross instance, symmetry, and transitivity, relates 𝑝[𝜎] to 𝑝[𝜏]. Functionality of the open family 𝐶 therefore gives the exact conclusion 𝖳𝗒𝖤𝗊𝑖(𝐶(𝑝)[𝜎],𝐶(𝑝)[𝜏]).
This computation premise is essential. If 𝑓𝑥 is a neutral program with no pair value, then 𝗌𝗉𝗋𝖾𝖺𝖽(𝑓𝑥;𝑦,𝑧.𝑦) has no spread contraction; the eliminator does not project through a neutral merely because its result type is a dependent pair. ◻
Assume, for each displayed rule, that every type and dependent family in its conclusion is well formed and functional under equal substitutions in the displayed context. Then the following rules are sound:
Γ⊢𝑖𝑎=𝑏∈𝐴
Γ⊢𝑖𝖺𝗑𝗂𝗈𝗆=𝖺𝗑𝗂𝗈𝗆∈𝖤𝗊𝐴(𝑎,𝑏)
C-Eq-I
Γ⊢𝑖𝑎=𝑎′∈𝐴Γ⊢𝑖𝑝=𝑝∈𝐵[𝑎/𝑥]
Γ⊢𝑖𝑎=𝑎′∈{𝑥:𝐴∣𝐵}
C-Set-I
Γ⊢𝑖𝑎=𝑎′∈{𝑥:𝐴∣𝐵}
Γ⊢𝑖𝑎=𝑎′∈𝐴
C-Set-E_1
Γ⊢𝑖𝑎=𝑎∈{𝑥:𝐴∣𝐵}
Γ⊢𝑖𝐵[𝑎/𝑥]𝗂𝗇𝗁𝖺𝖻𝗂𝗍𝖾𝖽
C-Set-E_2
The last conclusion means that some closed instance belongs to the predicate type at each pair of equal substitutions, in the sense of (91.16); it does not expose a proof term stored in 𝑎 or assert one witness uniform in the substitutions.
Proof. By the theorem’s well-formedness hypotheses, the ambient and predicate families are functional under equal substitutions. For C-Eq-I, by lemma 91.20 the two endpoint substitutions are self-equal. Use the premise at (𝜎,𝜎), (𝜎,𝜏), and (𝜏,𝜏). PER symmetry and transitivity give 𝑅𝐴(𝑎[𝜎],𝑎[𝜏]) and 𝑅𝐴(𝑏[𝜎],𝑏[𝜏]). The equality-type generator therefore derives the required type equality. The (𝜎,𝜎) instance gives the endpoint test 𝑅𝐴(𝑎[𝜎],𝑏[𝜎]), and the two occurrences of 𝖺𝗑𝗂𝗈𝗆 evaluate to themselves. These are precisely the three conjuncts of (91.4) for the left self-type.
For C-Set-I, the two premises are independent siblings. By the first, the ambient relation 𝑅𝐴(𝑎[𝜎],𝑎′[𝜏]) holds. By the second, there is a self-related predicate witness in the fiber over 𝑎[𝜎]. Functional family invariance and the transport clause of corollary 91.13 move that witness to the cross-fiber over 𝑎[𝜎],𝑎′[𝜏]. These are the two conjuncts of (91.5); the set generator establishes the conclusion-type equality.
For both eliminations, first apply the set case of corollary 91.13 to the premise’s member relation. Rule C-Set-E1 projects its ambient conjunct. For C-Set-E2, fix 𝜎≡Γ𝜏. The premise at this pair gives an inhabited cross-fiber over 𝑎[𝜎],𝑎[𝜏]. Its ambient conjunct and the PER laws also give the two self-relations. Functionality of 𝐵 and corollary 91.13 identify the cross-fiber PER with the self-fiber over 𝑎[𝜎]. Choose one self-related program from its inhabitance conjunct. Together with the conclusion-type equality obtained by functionality, this is exactly the (𝜎,𝜏) instance of (91.16). The choice is made after fixing the pair of substitutions, so no uniform proof program is inferred. ◻
Proof of Lemma 91.28 — Natural hypothesis and successor closure
Proof. For C-Hyp, any 𝜎[𝑛↦𝑎]≡Γ,𝑛:ℕ𝜏[𝑛↦𝑏] contains, by definition, the assumption 𝖬𝖾𝗆𝖤𝗊𝑖(𝑎,𝑏;ℕ[𝜎]). Since ℕ is closed, this is exactly the member conjunct required for the two instances of the variable 𝑛. By lemma 91.17, the type conjunct also holds.
For C-Nat-Suc, fix equal substitutions. By the premise and (91.12), there is one integer 𝑘≥0 to which 𝑎[𝜎] and 𝑏[𝜏] both evaluate. The integer-addition contractions establish 𝑎[𝜎]+1⇓𝑘+1,𝑏[𝜏]+1⇓𝑘+1. Since 𝑘+1≥0, (91.12) relates the successors in ℕ. Closed typehood establishes the type conjunct. ◻
For 𝑛:ℕ, put 𝖨𝗇𝖼(𝑛):={𝑚:ℕ∣𝖤𝗊ℕ(𝑚,𝑛+1)}. This is a set type: a member is the output integer itself, not an output paired with evidence. Define 𝗂𝗇𝖼:=𝜆𝑛.𝑛+1.
Proof of Theorem 91.30 — The successor program meets its set specification
Proof. By lemma 91.17, ℕ has its set PER. If 𝑎,𝑏 are equal naturals, addition preserves their common integer value. By the equality-type generator, the predicate 𝖤𝗊ℕ(𝑚,𝑎+1) is functional in equal 𝑚 and equal 𝑎. The set generator therefore derives equal types 𝖨𝗇𝖼(𝑎) and 𝖨𝗇𝖼(𝑏); the function generator establishes the required dependent-product typehood.
Take equal natural inputs 𝑎,𝑏. By (91.12), both evaluate to one 𝑘≥0. Integer addition gives 𝑎+1⇓𝑘+1 and 𝑏+1⇓𝑘+1, so the outputs are equal in ℕ. The equality proposition in the set predicate is inhabited because 𝑎+1 and 𝑏+1 both evaluate to 𝑘+1. Hence (91.5) relates the outputs in 𝖨𝗇𝖼(𝑎). Equation (91.2) relates 𝗂𝗇𝖼 to itself.
The same proof is visible as a derivation using the rules just established. First derive the ambient sibling premise for C-Set-I: D𝗇𝖺𝗍:=𝑋𝑛:ℕ⊢𝑖𝑛=𝑛∈ℕC−Hyp𝑛:ℕ⊢𝑖𝑛+1=𝑛+1∈ℕC−Nat−Suc. The predicate sibling is a separate application of equality introduction: D𝖾𝗊:=D𝗇𝖺𝗍𝑛:ℕ⊢𝑖𝖺𝗑𝗂𝗈𝗆=𝖺𝗑𝗂𝗈𝗆∈𝖤𝗊ℕ(𝑛+1,𝑛+1)C−Eq−I. Using them side by side gives D𝗇𝖺𝗍D𝖾𝗊𝑛:ℕ⊢𝑖𝑛+1=𝑛+1∈𝖨𝗇𝖼(𝑛)C−Set−I⋅⊢𝑖𝗂𝗇𝖼=𝗂𝗇𝖼∈∏𝑛:ℕ𝖨𝗇𝖼(𝑛)C−Π−I. For example, C-Π-E with the closed premise 2=2∈ℕ derives 𝗂𝗇𝖼2=𝗂𝗇𝖼2∈𝖨𝗇𝖼(2). Applying C-Set-E1 and C-Set-E2 to that conclusion recovers, respectively, natural membership of the output and inhabitance of its equality predicate. ◻
The set specification erases its evidence. A dependent pair keeps the evidence and therefore exposes the usual program extracted from an existence proof.
Let 𝖲𝗎𝖼𝖼𝖲𝗉𝖾𝖼:=∏𝑛:ℕ∑𝑚:ℕ𝖤𝗊ℕ(𝑚,𝑛+1). The program 𝑠:=𝜆𝑛.(𝑛+1,𝖺𝗑𝗂𝗈𝗆) satisfies 𝖬𝖾𝗆𝑖(𝑠;𝖲𝗎𝖼𝖼𝖲𝗉𝖾𝖼). Its application at 2 computes to the witness/evidence pair 𝑠2⇝0(2+1,𝖺𝗑𝗂𝗈𝗆). This pair is already a lazy canonical value. Projecting its witness performs the remaining computation: 𝗌𝗉𝗋𝖾𝖺𝖽(𝑠2;𝑥,𝑦.𝑥)𝛽𝑎𝑛𝑑𝑠𝑝𝑟𝑒𝑎𝑑⟶∗2+1𝐶−𝑎𝑑𝑑⟶3. Thus the extracted numerical result is 3 after elimination, not by reduction under the pair constructor.
Proof of Theorem 91.31 — Successor theorem and extracted program
Proof. By the natural typehood lemma, the equality-type generator, and then the dependent-pair generator, ∑𝑚:ℕ𝖤𝗊ℕ(𝑚,𝑛+1) is a functional family of types in equal 𝑛. The dependent-function generator therefore establishes 𝖳𝗒𝑖(𝖲𝗎𝖼𝖼𝖲𝗉𝖾𝖼).
Take 𝑎,𝑏 equal in ℕ. They evaluate to the same 𝑘≥0. The first components 𝑎+1,𝑏+1 therefore evaluate to 𝑘+1 and are equal in ℕ. The second components both evaluate to 𝖺𝗑𝗂𝗈𝗆, and the endpoint equality needed by (91.4) is the equality of the first components. Equation (91.3) relates the two pairs, and the two applications of 𝑠 beta-contract to those pairs. By theorem 91.12, the applications are related in the dependent-pair fiber; (91.2) therefore relates 𝑠 to itself. Equivalently, use C-Eq-I for the evidence component, C-Σ-I for the pair, and C-Π-I for the outer abstraction. Applying C-Σ-E with branch 𝑥,𝑦.𝑥 gives the displayed witness projection; the instance is 𝑎=𝑏=2. ◻
★★☆ Compare 𝖨𝗇𝖼(𝑛) with ∑𝑚:ℕ𝖤𝗊ℕ(𝑚,𝑛+1). Give the member of each produced by successor, compute both members at 𝑛=2, and use equation 91.5, equation 91.3 to explain why only one result contains 𝖺𝗑𝗂𝗈𝗆.
The meanings establish consistency without first proving normalization of all untyped programs. A member of a particular type must have the behavior required by that type; unrelated programs may diverge.
The closed type 𝖥𝖺𝗅𝗌𝖾𝑐 has no member. Consequently no proof tree assembled solely from rules sound for the frozen system card has a closed root sequent whose conclusion type is 𝖥𝖺𝗅𝗌𝖾𝑐.
Proof of Theorem 91.32 — Computational consistency
Proof. By (91.4), a member of 𝖤𝗊𝖨𝗇𝗍(0,1) would require 𝑅ℤ(0,1). By (91.1), this would give one integer 𝑧 with 0⇓𝑧 and 1⇓𝑧. Canonical integers evaluate to themselves, so 𝑧=0 and 𝑧=1, a contradiction.
For the second claim, induct on the finite proof tree. At each node, rule soundness carries truth of all premise sequents to truth of the conclusion. The root would therefore give a member of 𝖥𝖺𝗅𝗌𝖾𝑐, contradicting the first paragraph. This is weak consistency for the displayed rule set; it does not assert termination of every raw program. ◻
The meta-level statement 𝑅𝐴(𝑎,𝑏) is PER equality. The object-language type 𝖤𝗊𝐴(𝑎,𝑏) reflects that statement by being inhabited precisely when it holds; its inhabitants all evaluate to 𝖺𝗑𝗂𝗈𝗆. A proof-relevant identity type instead records a path that may affect transport. Here, if 𝑢 belongs to 𝐵(𝑎) and 𝑅𝐴(𝑎,𝑏), definition 91.5 gives equal types 𝐵(𝑎) and 𝐵(𝑏). Writing their assigned cross-fiber relation as 𝑅𝑎,𝑏𝐵, the transport clause of corollary 91.13 gives the calculation 𝑅𝑎,𝑎𝐵(𝑢,𝑢)⟹𝑅𝑎,𝑏𝐵(𝑢,𝑢)⟹𝑅𝑏,𝑏𝐵(𝑢,𝑢). The first identification compares the source self-fiber with the cross fiber; the second compares that cross fiber with the target self-fiber. Thus the unchanged program 𝑢 is a member of 𝐵(𝑏). By contrast, proof-relevant identity uses an explicit path 𝑝:𝖨𝖽𝐴(𝑎,𝑏). It constructs a transport term 𝗍𝗋𝖺𝗇𝗌𝗉𝗈𝗋𝗍𝐵(𝑝,𝑢):𝐵(𝑏). No path argument occurs in the PER reclassification. This is extensional equality, not a proof that all proof-relevant identity types collapse.
A set type restricts the members of 𝐴 but retains 𝐴’s equality. A quotient does the opposite: it retains the members and replaces their equality. The replacement is legitimate only when the proposed relation is functional and an equivalence relation on members of 𝐴.
The extension adds the canonical program former 𝖰𝗎𝗈𝗍𝑥,𝑦:𝐴(𝑒), which binds 𝑥,𝑦 in the binary relation program 𝑒 and has no root contraction. When the binders and relation program are fixed, write 𝐴/𝐸 for this syntax and define 𝐸(𝑎,𝑏):=𝑒[𝑎/𝑥,𝑏/𝑦]. Thus 𝐸(𝑎,𝑏) is object-language substitution into a stored program, not meta-level quotient data.
For this extended syntax, enlarge 𝖢𝖺𝗇𝖢𝗈𝗇𝗏L from definition 91.9 by the clause 𝖢𝖺𝗇𝖢𝗈𝗇𝗏L(𝖰𝗎𝗈𝗍𝑥,𝑦:𝐴(𝑒),𝖰𝗎𝗈𝗍𝑥,𝑦:𝐴′(𝑒′))⟺𝐴≡L𝐴′∧𝑒≡L𝑒′, where the two binders are chosen fresh on both sides. With this clause, component conversion covers every new canonical value.
Proof of Lemma 91.35 — Quotient-compatible observation stability
Proof. The quotient tag has no root contraction, and evaluation returns it without demanding either stored child. A compatible reduction therefore changes only 𝐴 or 𝑒; the two resulting quotient values are related by (91.17). The residual induction in the proof gains only the ordinary two-binder case for 𝑒. ◻
Fix an old-system level 𝑖, let 𝐴 have member PER 𝑅𝐴, and fix a relation program 𝑥:𝐴,𝑦:𝐴⊢𝑒 such that every closed instance 𝐸(𝑎,𝑏)=𝑒[𝑎/𝑥,𝑏/𝑦], for 𝑎,𝑏∈dom(𝑅𝐴), satisfies 𝖳𝗒𝑖(𝐸(𝑎,𝑏)). Define 𝖨𝗇𝗁𝑖(𝑃)⟺∃𝑢.𝖬𝖾𝗆𝑖(𝑢;𝑃). This notation takes a type program and a level, unlike Inh(𝑅) in definition 91.6, which takes an already assigned binary relation. If C𝑖(𝑃,𝑃,𝑅), unique valuation gives 𝖨𝗇𝗁𝑖(𝑃)⟺Inh(𝑅). Thus 𝐸 is used only through inhabitance in the old closure C𝑖; it is not defined recursively through the quotient extension. The family 𝐸 is admissible for a quotient when:
if 𝑅𝐴(𝑎,𝑎′) and 𝑅𝐴(𝑏,𝑏′), then 𝖳𝗒𝖤𝗊𝑖(𝐸(𝑎,𝑏),𝐸(𝑎′,𝑏′)), so their old-level inhabitance agrees;
𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑎)) for every 𝑎∈dom(𝑅𝐴);
𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑏)) implies 𝖨𝗇𝗁𝑖(𝐸(𝑏,𝑎));
𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑏)) and 𝖨𝗇𝗁𝑖(𝐸(𝑏,𝑐)) imply 𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑐)).
Define the proposed quotient PER by 𝑅(𝑖)𝐴/𝐸(𝑎,𝑏)⟺𝑅𝐴(𝑎,𝑎)∧𝑅𝐴(𝑏,𝑏)∧𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑏)). Its representatives are programs drawn from the domain of 𝐴; there is no term constructor for representatives.
Define the extended levels recursively. The system C𝗊0 is the least evaluation-saturated candidate system closed under the integer, Π, Σ, equality, set, and fresh quotient generators, with the dependent premises interpreted in C𝗊0; it has no universe generator. Having defined C𝗊𝑖, let C𝗊𝑖+1 be the least evaluation-saturated candidate system extending C𝗊𝑖, closed under the same nonuniverse generators with premises interpreted in C𝗊𝑖+1, and containing the two universe generators specified next. Thus dependent functions and pairs may have quotient domains or fibers, and every extended type persists to the next level.
Universes require two disjoint tags. Retain each old U𝑖 with exactly its old relation 𝑅U𝑖, defined from C𝑖 as in (91.6). Separately introduce a fresh extended universe U𝗊𝑖 with 𝑅U𝗊𝑖(𝐴,𝐵)⟺∃𝑅.C𝗊𝑖(𝐴,𝐵,𝑅),C𝗊𝑖+1(U𝗊𝑖,U𝗊𝑖,𝑅U𝗊𝑖). The original universe generator C𝗊𝑖+1(U𝑖,U𝑖,𝑅U𝑖) is reproduced literally; it does not acquire the expanded relation. Hence a quotient type belongs to U𝗊𝑖, while the old universe U𝑖 continues to classify exactly the old C𝑖-types.
For the new generator at level 𝑖, suppose C𝗊𝑖(𝐴,𝐴′,𝑅𝐴), and let the stored programs 𝑒,𝑒′, binding 𝑥,𝑦 and 𝑥′,𝑦′, induce admissible families 𝐸,𝐸′ over the two endpoints at old-system level 𝑖. Their required pointwise agreement is the explicit condition ∀𝑎,𝑎′,𝑏,𝑏′.𝑅𝐴(𝑎,𝑎′)∧𝑅𝐴(𝑏,𝑏′)⟹(𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑏))⟺𝖨𝗇𝗁𝑖(𝐸′(𝑎′,𝑏′))). Under that condition, add C𝗊𝑖(𝖰𝗎𝗈𝗍𝑥,𝑦:𝐴(𝑒),𝖰𝗎𝗈𝗍𝑥′,𝑦′:𝐴′(𝑒′),𝑅(𝑖)𝐴/𝐸). The extension judgments 𝖳𝗒𝖤𝗊𝗊𝑖, 𝖬𝖾𝗆𝖤𝗊𝗊𝑖, and 𝖬𝖾𝗆𝗊𝑖 are those of definition 91.14 with C𝗊𝑖 in place of C𝑖. Every original generator, including the unchanged old-universe generator, is present in the extension, yielding the one-way embedding of theorem 91.38. No converse is claimed merely because two endpoint normal forms lack a quotient tag: an old-looking former may have extended premises involving quotient types. This closure is a locally proved extension; it is not a constructor of the pinned artifact’s close.
If C𝑖(𝑃,𝑃,𝑅) and 𝑗≥𝑖, then for every closed program 𝑢, 𝖬𝖾𝗆𝑖(𝑢;𝑃)⟺𝖬𝖾𝗆𝑗(𝑢;𝑃),𝖨𝗇𝗁𝑖(𝑃)⟺𝖨𝗇𝗁𝑗(𝑃). Consequently, if every 𝐸(𝑎,𝑏) is typed at old-system level 𝑖, then for every 𝑗≥𝑖 and fixed ambient relation 𝑅𝐴, 𝑅(𝑖)𝐴/𝐸(𝑎,𝑏)⟺𝑅(𝑗)𝐴/𝐸(𝑎,𝑏).
Proof of Lemma 91.37 — Old-stratum inhabitance persistence
Proof. It suffices to prove the member equivalence for 𝑗=𝑖+1. The inclusion C𝑖⊆C𝑖+1 proves the forward implication. For the converse, let C𝑖(𝑃,𝑃,𝑅) witness the old typing, and let C𝑖+1(𝑃,𝑃,𝑆) and 𝑆(𝑢,𝑢) witness 𝖬𝖾𝗆𝑖+1(𝑢;𝑃). The first triple persists to level 𝑖+1. Unique valuation there gives ∀𝑥,𝑦.𝑅(𝑥,𝑦)⟺𝑆(𝑥,𝑦), so 𝑅(𝑢,𝑢) and hence 𝖬𝖾𝗆𝑖(𝑢;𝑃). Existential quantification over 𝑢 gives the inhabitance equivalence. Induction on 𝑗−𝑖 gives the general case, and substitution in the three conjuncts of (91.18) gives the last equivalence. ◻
Fix 𝑖. Let 𝑅𝐴 be a PER and let 𝐸(𝑎,𝑏) be an old-level closed type, as in definition 91.36, for 𝑎,𝑏∈dom(𝑅𝐴). If 𝐸 satisfies the symmetry and transitivity clauses (3)–(4), then 𝑅(𝑖)𝐴/𝐸 is a PER. Suppose further that C𝗊𝑖(𝐴,𝐴′,𝑅𝐴). If 𝐸 is admissible for 𝐴, 𝐸′ is admissible for 𝐴′, and they satisfy the displayed pointwise equivalence, then the quotient generator (91.19) is well defined and uniquely assigns that quotient PER up to logical equivalence. More generally, the extended closure has all five base invariants: every assigned relation is a PER, and, with relations identified up to logical equivalence, C𝗊𝑖(𝑋,𝑌,𝑆)⟹C𝗊𝑖(𝑌,𝑋,𝑆),C𝗊𝑖(𝑋,𝑌,𝑆)∧C𝗊𝑖(𝑌,𝑍,𝑆)⟹C𝗊𝑖(𝑋,𝑍,𝑆),C𝗊𝑖(𝑋,𝑌,𝑆)∧C𝗊𝑖(𝑋,𝑌,𝑇)⟹∀𝑎,𝑏.(𝑆(𝑎,𝑏)⟺𝑇(𝑎,𝑏)). Closure assignment is also computationally stable. If C𝗊𝑖(𝑋,𝑌,𝑆) and 𝑋0,𝑌0 are closed programs, then 𝑋≡L𝑋0,𝑌≡L𝑌0⟹C𝗊𝑖(𝑋0,𝑌0,𝑆). If additionally 𝑎,𝑎0,𝑏,𝑏0 are closed programs, then 𝑎≡L𝑎0,𝑏≡L𝑏0⟹(𝑆(𝑎,𝑏)⟺𝑆(𝑎0,𝑏0)). It also gives the one-way embedding C𝑖(𝑋,𝑌,𝑆)⟹C𝗊𝑖(𝑋,𝑌,𝑆). Consequently, if 𝐴 is an old type witnessed by C𝑖(𝐴,𝐴,𝑅𝐴), then 𝖬𝖾𝗆𝖤𝗊𝗊𝑖(𝑎,𝑏;𝐴)⟺𝖬𝖾𝗆𝖤𝗊𝑖(𝑎,𝑏;𝐴),𝖬𝖾𝗆𝗊𝑖(𝑎;𝐴)⟺𝖬𝖾𝗆𝑖(𝑎;𝐴).
Proof of Theorem 91.38 — Quotient-extension invariants and well-definedness
Proof. Suppose 𝑅(𝑖)𝐴/𝐸(𝑎,𝑏). The first two conjuncts of (91.18) put 𝑎,𝑏 in the domain of 𝑅𝐴, and clause (3) gives 𝖨𝗇𝗁𝑖(𝐸(𝑏,𝑎)). Hence 𝑅(𝑖)𝐴/𝐸(𝑏,𝑎).
Suppose also 𝑅(𝑖)𝐴/𝐸(𝑏,𝑐). Clause (4) gives 𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑐)). By the outer hypotheses, 𝑅𝐴(𝑎,𝑎) and 𝑅𝐴(𝑐,𝑐), so by (91.18), 𝑅(𝑖)𝐴/𝐸(𝑎,𝑐). Thus the relation is symmetric and transitive.
By admissibility clause (1), the proposed relation is invariant under equal representatives; clause (2) preserves the intended domain of representatives. Prove the five extended-closure invariants simultaneously by induction on levels and closure derivations. Evaluation saturation and the nonuniverse old formers repeat the proofs of theorem 91.8, theorem 91.12 with the induction hypotheses applied to their extended premises.
The quotient relation is a PER by the first two paragraphs. For type symmetry, reverse the ambient type equality and the displayed pointwise equivalence between 𝐸 and 𝐸′. For transitivity, compose the two ambient type equalities. By the closure-induction hypothesis on their strictly smaller recursive premises, the assigned PERs are logically equivalent. After transporting to that PER, use the same middle representatives in the two pointwise equivalences and compose the resulting logical equivalences. This constructs the required outer quotient generator. For unique valuation, replace the three conjuncts of (91.18) one at a time. Equality of the ambient assigned PERs preserves the first two, and pointwise equivalence of 𝐸,𝐸′ preserves the third. The resulting binary predicates are logically equivalent.
For the closure-assignment half of computational stability, consider one contraction inside a quotient endpoint. A contraction in the ambient type is handled by the closure-assignment induction hypothesis. A contraction in a relation program is handled by theorem 91.12: the old-level types before and after the contraction are equal, so their 𝖨𝗇𝗁𝑖 tests agree and all four admissibility clauses and the displayed pointwise-agreement condition persist. The quotient tag has no root contraction. Rebuild the quotient generator, then use symmetry and transitivity for an arbitrary computational conversion.
For member-relation stability, suppose 𝑅(𝑖)𝐴/𝐸(𝑎,𝑏), 𝑎≡L𝑎0, and 𝑏≡L𝑏0. By the simultaneous induction hypothesis for the ambient assigned relation, its two domain conjuncts persist and 𝑅𝐴(𝑎,𝑎0) and 𝑅𝐴(𝑏,𝑏0) hold. Admissibility clause (1) then gives 𝖳𝗒𝖤𝗊𝑖(𝐸(𝑎,𝑏),𝐸(𝑎0,𝑏0)), so 𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑏)) and 𝖨𝗇𝗁𝑖(𝐸(𝑎0,𝑏0)) are equivalent. These are exactly the three conjuncts of (91.18); symmetry of computational conversion proves the reverse implication.
At the successor-level step, an inherited quotient triple can have the same canonical endpoints as a quotient triple generated again at the larger level. Constructor injectivity then fixes the same raw ambient types and relation programs. By the level-induction hypothesis, the two ambient assigned PERs are logically equivalent. By lemma 91.37, the old-level inhabitance tests at 𝑖 and 𝑖+1 are equivalent. Replacing these three conjuncts proves that the inherited relation 𝑅(𝑖)𝐴/𝐸 and the freshly generated relation 𝑅(𝑖+1)𝐴/𝐸 are logically equivalent. This is the only inherited-versus-fresh quotient case of unique valuation.
The old universe case uses its fixed original relation and theorem 91.8, theorem 91.12. For the fresh universe, lower-level type symmetry gives symmetry of 𝑅U𝗊𝑖. Given 𝑅U𝗊𝑖(𝑋,𝑌) and 𝑅U𝗊𝑖(𝑌,𝑍), lower-level unique valuation identifies the two relations assigned through 𝑌, and lower-level type transitivity gives 𝑅U𝗊𝑖(𝑋,𝑍). Thus the fresh universe relation is a PER; lower-level unique valuation also renders its existential witness independent of choice. Its computational stability is the closure-assignment half of the simultaneous induction one level lower. The fresh quotient and extended-universe tags, constructor injectivity, and the unchanged old-universe tag determine the applicable root generator, completing symmetry, transitivity, and unique valuation at level 𝑖.
For (91.20), induct on an original closure derivation. Evaluation saturation and every original generator occur in the extension, and the induction hypotheses embed all recursive premises, so the same final generator constructs the extended derivation. Fix an old-type witness C𝑖(𝐴,𝐴,𝑅𝐴). Original member equality implies extended member equality by the embedding. Conversely, an extended witness assigns some 𝑅′ to the same endpoints 𝐴,𝐴; extended unique valuation identifies 𝑅′ with the embedded 𝑅𝐴. Hence it yields the original member equality. The reflexive case gives the stated membership equivalence. This argument uses the old-type witness and proves no converse embedding C𝗊𝑖⊆C𝑖. ◻
Each admissibility clause has a separate job. Without reflexivity, taking 𝐸 always empty gives an empty quotient domain rather than the domain of 𝐴. Without symmetry, the integer relation 𝑚≤𝑛 produces a nonsymmetric candidate PER. Deleting transitivity alone also breaks the theorem. On integer values let 𝖨𝗇𝗁𝑖(𝐸(𝑚,𝑛)) hold when |𝑚−𝑛|≤1. Then 𝖨𝗇𝗁𝑖(𝐸(0,1)) and 𝖨𝗇𝗁𝑖(𝐸(1,2)) hold but 𝖨𝗇𝗁𝑖(𝐸(0,2)) does not, so the proposed quotient relation is not transitive. Finally, without clause (1), a predicate that inspects whether its arguments are written as integer literals can distinguish equal programs such as 0 and (𝜆𝑥.𝑥)0; the quotient generator would then depend on the chosen representatives.
Proof of Proposition 91.39 — Displayed quotient rules
Proof. By admissibility clause (1), related representatives give equal old-level types and hence equivalent 𝖨𝗇𝗁𝑖 tests. Thus the self-instance of the quotient generator constructs C𝗊𝑖(𝐴/𝐸,𝐴/𝐸,𝑅(𝑖)𝐴/𝐸). Extended unique valuation permits the membership and member-equality judgments for 𝐴, 𝐴/𝐸, and, in clause (3), 𝐵 to be computed with the displayed relations 𝑅𝐴, 𝑅(𝑖)𝐴/𝐸, and 𝑅𝐵. For (1), reflexivity of 𝐸 turns 𝑅𝐴(𝑎,𝑎) into 𝑅(𝑖)𝐴/𝐸(𝑎,𝑎); the reverse implication is the first conjunct of (91.18). Clause (2) is that equation with the two domain conjuncts written as membership. For (3), take 𝑅(𝑖)𝐴/𝐸(𝑎,𝑏). By (91.18), both representatives are in the domain and 𝖨𝗇𝗁𝑖(𝐸(𝑎,𝑏)). The stated respect condition gives equality of the outputs in 𝐵. This is precisely the function-PER obligation (91.2) for a map out of the quotient. Taking 𝑏=𝑎 and using admissibility reflexivity proves that members map to members. ◻
For closed integer programs 𝑚,𝑛, define the relation program 𝐸2(𝑚,𝑛):=𝖤𝗊𝖨𝗇𝗍((𝑚−𝑛)mod2,0). For every old-system level 𝑖, the equality-type generator derives 𝖳𝗒𝑖(𝐸2(𝑚,𝑛)). Here mod is the pinned integer program’s signed remainder operation. If 𝑚⇓𝑧 and 𝑛⇓𝑤, subtraction and integer remainder normalize the left endpoint to (𝑧−𝑤)mod2. Hence 𝖨𝗇𝗁𝑖(𝐸2(𝑚,𝑛))⟺2∣(𝑧−𝑤). If 𝑚,𝑚′ evaluate to the same integer and 𝑛,𝑛′ do likewise, the instances 𝐸2(𝑚,𝑛) and 𝐸2(𝑚′,𝑛′) normalize to the same canonical equality type. This proves functionality under the integer PER rather than assuming it from the source spelling of representatives. Reflexivity, symmetry, and transitivity follow respectively from zero difference, negation, and addition of even differences. Hence 𝐸2 is admissible over 𝖨𝗇𝗍 at every old-system level. Thus 2 and 4 are equal in 𝖨𝗇𝗍/𝐸2, whereas 2 and 3 are not.
The program 𝑟:=𝜆𝑚.𝑚mod2 respects 𝐸2. Indeed, if 2∣(𝑧−𝑤), then 2∣((𝑧mod2)−(𝑤mod2)), including for negative signed remainders. Thus clause (3) of proposition 91.39 gives the member judgment for a quotient endomap 𝖨𝗇𝗍/𝐸2→𝖨𝗇𝗍/𝐸2 whose value at a representative 𝑚 is represented by 𝑟𝑚. Binary maximum on quotient representatives does not: 0 and 2 represent the same parity class, as do 1 and 3, but max(0,3)=3 and max(2,1)=2 have different parity. Hence maximum cannot be defined on two parity quotient arguments by choosing representatives.
The quotient data in definition 91.36, the PER theorem in theorem 91.38, and the rules in proposition 91.39 form the book’s extension of the frozen card. Allen’s semantic construction and the 1986 Nuprl presentation motivate and support these clauses. NuprlInCoq’s per/per.v contains the candidate relation but says that quotient types are not in close because the required type-system properties were not proved there. No quotient-extension result is attributed to that artifact as a mechanized quotient theorem.
★★☆ Define the relation program 𝐸3(𝑚,𝑛):=𝖤𝗊𝖨𝗇𝗍((𝑚−𝑛)mod3,0), using signed remainder. Verify all four clauses of definition 91.36. Regard successor and absolute value as candidate endomaps 𝖨𝗇𝗍/𝐸3→𝖨𝗇𝗍/𝐸3. Decide whether each respects the quotient equality, giving either the required calculation or a specific pair of equal representatives that it separates.
Artifact-bounded extensions and sources. The pinned per/per.v also defines the partial-type relation 𝑅――𝐴(𝑎,𝑏)⟺(𝑎𝗁𝖺𝗅𝗍𝗌⟺𝑏𝗁𝖺𝗅𝗍𝗌)∧(𝑎𝗁𝖺𝗅𝗍𝗌⇒𝑅𝐴(𝑎,𝑏)). Thus two divergent programs are related, while a terminating program cannot be related to a divergent one. The artifact includes partial types, continuity developments, and bar-induction material, but none enters the frozen card or local proofs. In particular, the metatheoretic axiom FunctionalChoice_on is not bar induction and does not establish an internal choice theorem.
Allen’s thesis owns the non-type-theoretic assignment of PERs, the least closure construction, universes, and pointwise functionality [All87]. The 1986 Nuprl book owns the historical meaning and rule presentation, including set and quotient types [CAB^+86b]. Anand and Rahli own the mechanized core and the equivalence of the formal sequent meanings [AR14]. The broader computational-type-theory orientation is documented by Allen and collaborators [ABC^+06]; the Nuprl 5 manual is an implementation and rule reference [Kre02], not the proof owner for this chapter.
The pinned repository specifies Coq 8.9.1. Its archive contains both a top-level RULES file and a rules/ directory, so a normal checkout collides on a case-insensitive filesystem. The retained source archive was inspected, but no replay under the workspace’s Rocq 9.1.1 is claimed. These facts delimit the trust chain; they do not change the local theorems of this chapter.
★★★ Reconstruct the PER proof for one dependent function and one dependent pair from theorem 91.8. For transitivity of functions, name the middle application and the two fiber PERs that functionality identifies. For dependent pairs, prove that determinism forces the two evaluations of the middle representative to have identical canonical components. Then give a counterexample showing why either proof fails if the assigned fiber relation is not functional under equal domain inputs.
★★★ For the telescope 𝑛:ℕ,𝑝:𝖤𝗊ℕ(𝑛,𝑛),𝑓:∏𝑥:ℕℕ, write the complete inductive definition of two equal substitutions. Prove pointwise functionality of all three hypotheses, and instantiate (91.14) for the extract 𝑓𝑛. Repeat the calculation after replacing the last type by ∏𝑥:ℕ𝖤𝗊ℕ(𝑥,𝑛) and state which additional equality obligation appears.
★★★ Let 𝐴 be the integer pairs and let 𝐸 identify pairs with the same sum. Prove admissibility, calculate three nontrivial quotient equalities, and determine whether the three candidate maps 𝖿𝗂𝗋𝗌𝗍:𝐴/𝐸→𝖨𝗇𝗍,𝗍𝗈𝗍𝖺𝗅:𝐴/𝐸→𝖨𝗇𝗍,𝗌𝗐𝖺𝗉:𝐴/𝐸→𝐴/𝐸 respect the indicated codomain equality. For each rejected map, give two 𝐸-equal representatives whose outputs are not equal in its codomain.
★★★Practical project.nuprl-per-evaluator Implement in Kappa a lazy evaluator and a uniform tagged PER decision procedure for the finite closed-binder specialization containing integers, three lambda bodies, application, pairs, spread, integer addition, 𝖨𝗇𝗍, derived ℕ, the successor set specification, and the parity quotient extension. Maintain the invariant that the decision procedure first evaluates every principal argument required by the selected PER clause and never equates programs merely because their raw syntax matches. The finished program must print exactly these seven verdict lines followed by the corpus summary line, in order:
eval-opening=3
int-eq-opening-3=true
nat-member-minus1=false
nat-member-opening=true
inc-spec-2=true
parity-eq-2-4=true
parity-eq-2-3=false
All 7 Chapter 91 corpus cases passed.
Reject a fuel-exhausted computation as unknown, not false; the named acceptance inputs must not exhaust fuel. The exact seven outcome records followed by the owner summary are the decidable acceptance test. The program illustrates theorem 91.18, theorem 91.30, theorem 91.38; it does not prove those theorems or implement the pinned Nuprl artifact.