Computational type theory, elaboration, and clause compilation
appendix sectionrules
Computational type theory, elaboration, and clause compilation
The frozen Nuprl-style computational fragment
Evaluation is the deterministic lazy relation of convention 91.1. Integers, abstractions, pairs, and type formers are canonical at the root. The selected noncanonical root computations are (𝜆𝑥.𝑏)𝑎𝐶−𝛽⇝0𝑏[𝑎/𝑥],𝗌𝗉𝗋𝖾𝖺𝖽((𝑎,𝑏);𝑥,𝑦.𝑐)𝐶−𝑠𝑝𝑟𝑒𝑎𝑑⇝0𝑐[𝑎/𝑥,𝑏/𝑦], together with the displayed integer operations after their principal arguments evaluate. Pair components and abstraction bodies are not evaluated to make the enclosing term canonical. The compatible closure of these roots is ⟶L; ≡L is its reflexive, symmetric, transitive closure. Theorem 91.12 states that closure assignment and every assigned member relation are invariant under this conversion.
The candidate system C𝑖(𝐴,𝐵,𝑅) is the least evaluation-saturated closure containing the integer triple and these generators:
from an equal domain and a functional family of equal fibers, generate equal dependent function types with (91.2) and equal dependent pair types with (91.3);
from an equal ambient type and pairwise equal endpoints, generate equal equality types with (91.4);
from an equal ambient type and a functional family of equal predicate types, generate equal set types with (91.5);
after constructing C𝑖, generate C𝑖+1(U𝑖,U𝑖,𝑅U𝑖), where 𝑅U𝑖(𝐴,𝐵)⟺∃𝑅.C𝑖(𝐴,𝐵,𝑅).
Constructor tags are disjoint and injective, and each functional fiber family is invariant under equal domain representatives. These are premises of the closure; global uniqueness of assigned PERs is the conclusion of theorem 91.8, and member-relation computation stability is theorem 91.12.
At universe level 𝑖, closed type equality, membership, and member equality are 𝖳𝗒𝖤𝗊𝑖(𝐴,𝐵)⟺∃𝑅.C𝑖(𝐴,𝐵,𝑅),𝖬𝖾𝗆𝑖(𝑎;𝐴)⟺∃𝑅.C𝑖(𝐴,𝐴,𝑅)∧𝑅(𝑎,𝑎),𝖬𝖾𝗆𝖤𝗊𝑖(𝑎,𝑏;𝐴)⟺∃𝑅.C𝑖(𝐴,𝐴,𝑅)∧𝑅(𝑎,𝑏). For a functional telescope, the open judgment is the two-substitution clause of definition 91.21. The global artifact theorem theorem 91.23 equates its two full close(univ) sequent encodings; the fixed-level list correspondence is the separate local result proposition 91.25. The open judgment’s inhabited conclusion means that for every pair of equal substitutions the assigned cross-fiber PER has some element in its domain. In every derived rule below, each conclusion type and dependent family is assumed well formed and functional under equal substitutions. The complete derived rules used in the chapter are
The quotient side condition of definition 91.36 fixes the old level 𝑖 and defines 𝖨𝗇𝗁𝑖(𝑃)⟺∃𝑢.𝖬𝖾𝗆𝑖(𝑢;𝑃). Every relation program 𝐸(𝑎,𝑏) is an old-system type 𝖳𝗒𝑖(𝐸(𝑎,𝑏)), and its functionality clause is stated with 𝖳𝗒𝖤𝗊𝑖. This prevents the admissibility test from referring recursively to the quotient extension. The separately proved closure C𝗊𝑖 repeats evaluation and every integer, Π, Σ, equality, and set generator over the extended systems, then adds (91.19); hence old nonuniverse formers may range over quotient types. It retains each old U𝑖 with its original PER and gives the expanded hierarchy fresh tags U𝗊𝑖. Thus quotient types inhabit only the fresh extended universes, and old-universe equality is unchanged. Its member judgments carry a superscript 𝗊. It is not the frozen artifact closure. The quotient PER is written 𝑅(𝑖)𝐴/𝐸 because its inhabitance test is indexed. Lemma 91.37 proves that old-level inhabitance is unchanged at larger strata; hence inherited and freshly regenerated quotient triples receive logically equivalent relations.
Full-Timpl bidirectional checking and certificate replay
The three modes, inversion oracles, and priority convention are those of definition 48.16. The following is the complete local rule card used by Chapters 110 and 112; no omitted constructor schema is implicit.
The opening presyntax calculation uses four earlier, syntax-directed rules. They are distinct from the full-Timpl card because their surface terms store the domain and codomain annotations directly.
Rule Ty-El is that bridge: it first synthesizes a universe element and then returns the elaborated code as a type.
Dependent elimination synthesizes its result by substituting the elaborated scrutinee into the motive. Variables, fixed-type constructors, and annotations also synthesize.
The vector constructors and eliminator expose every parameter needed by the kernel rule. The bracketed lists below are stored certificate fields, not inferred surface arguments. Write 𝖭𝗂𝗅𝑖[𝜏] for the annotated nil form, 𝖢𝗈𝗇𝗌𝑖[𝜏;⃗𝑒] for annotated cons, where ⃗𝑒=(𝑒𝑛,𝑒𝑎,𝑒𝑥𝑠), and 𝖨𝗇𝖽𝑖,𝑗 for annotated vector elimination. Its stored fields, in order, are 𝜏𝐴, 𝑛.𝑣.𝜏𝑃, 𝑒0, 𝑛.𝑎.𝑥𝑠.𝑞.𝑒𝑠, 𝑒𝑚, and 𝑒𝑦𝑠. Put 𝑃0:=𝑃[𝟢/𝑛,𝖭𝗂𝗅𝑖[𝐴]/𝑣] and 𝑃𝑠:=𝑃[𝗌𝗎𝖼(𝑛)/𝑛,𝖢𝗈𝗇𝗌𝑖[𝐴;(𝑛,𝑎,𝑥𝑠)]/𝑣]. For the eliminator rule also abbreviate Δ𝑠:=Γ,𝑛:ℕ,𝑎:𝐴,𝑥𝑠:𝖵𝖾𝖼(𝐴,𝑛),𝑞:𝑃[𝑛/𝑛,𝑥𝑠/𝑣].
Γ⊢𝜏⇐U𝑖⇝𝐴
Γ⊢𝖭𝗂𝗅𝑖[𝜏]⇒𝖵𝖾𝖼(𝐴,𝟢)⇝𝖭𝗂𝗅𝑖[𝐴]
Syn-VNil
Γ⊢𝜏⇐U𝑖⇝𝐴Γ⊢𝑒𝑛⇐ℕ⇝𝑛Γ⊢𝑒𝑎⇐𝐴⇝𝑎Γ⊢𝑒𝑥𝑠⇐𝖵𝖾𝖼(𝐴,𝑛)⇝𝑥𝑠
Γ⊢𝖢𝗈𝗇𝗌𝑖[𝜏;⃗𝑒]⇒𝖵𝖾𝖼(𝐴,𝗌𝗎𝖼(𝑛))⇝𝖢𝗈𝗇𝗌𝑖[𝐴;(𝑛,𝑎,𝑥𝑠)]
Syn-VCons
For Syn-VecInd, abbreviate the complete surface and core nodes by 𝐸𝑉:=𝖨𝗇𝖽𝑖,𝑗[𝜏𝐴;𝑛.𝑣.𝜏𝑃;𝑒0;𝑛.𝑎.𝑥𝑠.𝑞.𝑒𝑠;𝑒𝑚,𝑒𝑦𝑠],𝑎𝑉:=𝖨𝗇𝖽𝑖,𝑗[𝐴;𝑛.𝑣.𝑃;𝑝0;𝑛.𝑎.𝑥𝑠.𝑞.𝑝𝑠;𝑚,𝑦𝑠].
Introduction forms check against a constructor recovered from the expected type; dedicated introduction and code rules take priority over the fallback that synthesizes a type and compares it with the expected type.
unPiMeta(Γ,𝐶)=(𝜖,𝜚,𝐴,𝑥.𝐵)Γ,𝑥:𝐴⊢𝑒⇐𝐵⇝𝑏
Γ⊢𝜆𝜖,𝜚𝑥.𝑒⇐𝐶⇝𝜆𝜖,𝜚(𝑥:𝐴).𝑏
Chk-Lam
unSg(Γ,𝐶)=(𝐴,𝑥.𝐵)Γ⊢𝑒0⇐𝐴⇝𝑎Γ⊢𝑒1⇐𝐵[𝑎/𝑥]⇝𝑏
Γ⊢(𝑒0,𝑒1)⇐𝐶⇝(𝑎,𝑏)
Chk-Pair
unId(Γ,𝐶)=(𝐴,𝑎,𝑏)Γ⊢𝑒⇐𝐴⇝𝑐Γ⊢𝑐⇔𝑎:𝐴Γ⊢𝑎⇔𝑏:𝐴
Γ⊢𝗋𝖾𝖿𝗅(𝑒)⇐𝐶⇝𝗋𝖾𝖿𝗅𝑐
Chk-Refl
Γ⊢𝑒⇒𝐶′⇝𝑎Γ⊢𝐶⇔𝐶′𝗍𝗒𝗉𝖾
Γ⊢𝑒⇐𝐶⇝𝑎
Chk-Conv
For Russell universes the expected universe supplies the level. These are term-checking rules: they are what permit a type expression to occur as a universe element.
unUniv(Γ,𝐶)=𝑖
Γ⊢𝟏⇐𝐶⇝𝟏
Chk-Code-1
unUniv(Γ,𝐶)=𝑖
Γ⊢ℕ⇐𝐶⇝ℕ
Chk-Code-
unUniv(Γ,𝐶)=𝑖
Γ⊢𝟐⇐𝐶⇝𝟐
Chk-Code-
unUniv(Γ,𝐶)=𝑖𝑗<𝑖
Γ⊢U𝑗⇐𝐶⇝U𝑗
Chk-Code-Univ
unUniv(Γ,𝐶)=𝑖Γ⊢𝜏0⇐U𝑖⇝𝐴Γ,𝑥:𝐴⊢𝜏1⇐U𝑖⇝𝐵
Γ⊢∏𝜖,𝜚𝑥:𝜏0𝜏1⇐𝐶⇝∏𝜖,𝜚𝑥:𝐴𝐵
Chk-Code-Pi
unUniv(Γ,𝐶)=𝑖Γ⊢𝜏0⇐U𝑖⇝𝐴Γ,𝑥:𝐴⊢𝜏1⇐U𝑖⇝𝐵
Γ⊢∑𝑥:𝜏0𝜏1⇐𝐶⇝∑𝑥:𝐴𝐵
Chk-Code-Sg
unUniv(Γ,𝐶)=𝑖Γ⊢𝜏⇐U𝑖⇝𝐴Γ⊢𝑒0⇐𝐴⇝𝑎Γ⊢𝑒1⇐𝐴⇝𝑏
Γ⊢𝖨𝖽𝜏(𝑒0,𝑒1)⇐𝐶⇝𝖨𝖽𝐴(𝑎,𝑏)
Chk-Code-Id
unUniv(Γ,𝐶)=𝑖+1Γ⊢𝑒⇐U𝑖⇝𝐴
Γ⊢𝖫𝗂𝖿𝗍𝑖(𝑒)⇐𝐶⇝𝖫𝗂𝖿𝗍𝑖𝐴
Chk-Code-Lift
unUniv(Γ,𝐶)=𝑖Γ⊢𝜏⇐U𝑖⇝𝐴Γ⊢𝑒⇐ℕ⇝𝑛
Γ⊢𝖵𝖾𝖼[𝑖](𝜏,𝑒)⇐𝐶⇝𝖵𝖾𝖼(𝐴,𝑛)
Chk-Code-Vec
The code rules use the formation and lift rules of definition 29.1 and definition 29.10. Equality is consulted only by the two comparison premises and inside the inversion operations. Everywhere else information flows structurally.
The rule cards are executed in the following total priority order. In type mode inspect the head in the order Π𝜖,𝜚,Σ,𝖨𝖽,𝟏,𝟐,ℕ,𝖵𝖾𝖼[𝑖],U𝑖;otherwisetryTy-El. In synthesis mode inspect the head in the order 𝑥,𝖺𝗉𝗉𝜖,𝜚,𝖿𝗌𝗍,𝗌𝗇𝖽,⋆,𝟢,𝗌𝗎𝖼,𝗍𝗍,𝖿𝖿,(−:−),𝟐-ind,ℕ-ind,𝐽,𝖭𝗂𝗅𝑖[−],𝖢𝗈𝗇𝗌𝑖[−;−],𝖨𝗇𝖽𝑖,𝑗[−]. In checking mode first try, in order, the recognized heads 𝜆𝜖,𝜚, pair, reflexivity, and the universe-code heads 𝟏,ℕ,𝟐,U,Π𝜖,𝜚,Σ,𝖨𝖽,𝖫𝗂𝖿𝗍,𝖵𝖾𝖼; only an unrecognized head reaches Chk-Conv. Within a selected clause, premises run top to bottom. A failed premise rejects the query; there is no backtracking to a later clause.
Read with this priority, every full-Timpl elaboration query has at most one derivation and one output. Assuming the exact oracles of definition 48.16 total, every query terminates.
Proof of Proposition 1
Proof. For each mode and head constructor, exactly one clause is eligible. Its premises are evaluated in the fixed order stated by the algorithm; a failed premise returns failure. All outputs are determined by recursive outputs and the deterministic oracles. In particular, Ty-El uses the single output of unUniv, not a choice of universe level.
For termination, order calls lexicographically by the size of the surface subject and the mode order ⇐𝗍𝗒𝗉𝖾>⇐>⇒. Every recursive call is on a proper subexpression, except the premise of Ty-El and that of Chk-Conv; those preserve the subject and strictly decrease the mode. Context extension and substitution in an output do not create recursive queries. Hence no call chain is infinite. ◻
The annotations in the source tree can serve as a certificate rather than as trusted elaborator state.
A proof assistant meets the de Bruijn criterion when it can export a proof object that a small, independent program checks against the stated formal rules. In the present development the trust chain consists of the surface input, then the untrusted elaborator, then the certificate (Γ,𝜏𝐴,𝑒,𝐴,𝑎), then the independent rechecker, and finally the judgment Γ⊢𝑎:𝐴. Only the last implication is the mathematical guarantee. The rechecker’s implementation, its parser, and the sound implementations of the conversion and inversion oracles remain in the trusted base; tactics and the elaborator do not.
A term certificate is a quintuple (Γ,𝜏𝐴,𝑒,𝐴,𝑎). Here 𝜏𝐴 is the fully annotated surface certificate for the claimed core type 𝐴, and 𝑒 uses the full Timpl surface syntax of definition 48.16, including every written level, motive, vector parameter, and metadata bit. The claimed 𝐴 and 𝑎 are core syntax. The rechecker ignores any supplied derivation and evaluates three mutually recursive partial functions 𝑅𝗍𝗒(Γ,𝜏),𝑅𝗌𝗒𝗇(Γ,𝑒),𝑅𝖼𝗁𝗄(Γ,𝑒,𝐴). Their equations are the rule cards above, evaluated top to bottom. The table is exhaustive; each entry means “make exactly the recursive calls and oracle calls printed in this rule, then return its printed output.”
There is no implicit default: a head absent from its row fails. A recognized head whose selected clause fails is not retried as “other.” Binder freshening is deterministic up to alpha-equivalence. In particular, Syn-VecInd checks the motive in Γ,𝑛:ℕ,𝑣:𝖵𝖾𝖼(𝐴,𝑛) and its successor method in the full 𝑛,𝑎,𝑥𝑠,𝑞 context; Syn-𝐽 checks its motive in the full 𝑥,𝑦,𝑝 context. These are equations of the rechecker, not prose placeholders.
To decide a certificate, first run 𝑅𝗍𝗒(Γ,𝜏𝐴)=𝐴′ and require Γ⊢𝐴′⇔𝐴𝗍𝗒𝗉𝖾. Then run 𝑅𝖼𝗁𝗄(Γ,𝑒,𝐴)=𝑎′. Accept exactly when 𝑎′=𝛼𝑎. The final term comparison is syntactic because the claimed 𝑎 carries no typing derivation. The type comparison is conversion because checking may end at a judgmentally equal expected type. All oracle calls occur only at the typed premises displayed in the rule cards.
Defined declarations carry a finite map 𝐷 from declared names to their elaborated types and bodies. The two variable rules and the declaration-list rules are
(𝑥:𝐴)∈Γ𝑥∉dom𝐷
Γ;𝐷⊢𝑥⇒𝐴⇝𝑥
Syn-Var-Plain
𝐷(𝑥)=(𝐴,𝑎)
Γ;𝐷⊢𝑥⇒𝐴⇝𝑎↑Γ
Syn-Var-Def
Γ;𝐷⊢𝜀𝗈𝗄
Decls-Nil
Γ;𝐷⊢𝜏⇐𝗍𝗒𝗉𝖾⇝𝐴Γ;𝐷⊢𝑒⇐𝐴⇝𝑎Γ,𝑥:𝐴;𝐷[𝑥↦(𝐴,𝑎)]⊢𝑑𝑠𝗈𝗄
Γ;𝐷⊢(𝖽𝖾𝖿𝑥:𝜏=𝑒);𝑑𝑠𝗈𝗄
Decls-Cons
Here 𝑎↑Γ is the ordered weakening of the stored body through declarations following 𝑥. The accepted initial state is ⋅;∅⊢𝑑𝑠𝗈𝗄.
Ranked normal forms and semantic computability
Chapter 49 uses four mutually inductive judgments: neutral terms Γ⊢𝑢𝗇𝖾𝐴, eta-long normal terms Γ⊢𝑣𝗇𝖿𝐴, normal types Γ⊢𝐴𝗇𝖿𝗍𝗒𝗉𝖾, and normal universe codes Γ⊢𝑐𝗇𝖿U𝑖. They are generated mutually by the following complete rules.
Here 𝑃0 and 𝑃𝑠 are the base and successor method types of Vec-elim, including its full 𝑛,𝑎,𝑥𝑠,𝑞 successor context.
Normal terms:
Γ⊢𝐴𝗇𝖿𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝑣𝗇𝖿𝐵
Γ⊢𝜆𝜖,𝜚(𝑥:𝐴).𝑣𝗇𝖿∏𝜖,𝜚𝑥:𝐴𝐵
nf-lam
Γ⊢𝑣𝗇𝖿𝐴Γ⊢𝑤𝗇𝖿𝐵[𝑣/𝑥]
Γ⊢(𝑣,𝑤)𝗇𝖿∑𝑥:𝐴𝐵
nf-pair
Γ⊢⋆𝗇𝖿𝟏
nf-star
Γ⊢𝗍𝗍𝗇𝖿𝟐
nf-true
Γ⊢𝖿𝖿𝗇𝖿𝟐
nf-false
Γ⊢𝟢𝗇𝖿ℕ
nf-zero
Γ⊢𝑣𝗇𝖿ℕ
Γ⊢𝗌𝗎𝖼(𝑣)𝗇𝖿ℕ
nf-suc
Γ⊢𝑣𝗇𝖿𝐴Γ⊢𝑎≡𝑣:𝐴Γ⊢𝑏≡𝑣:𝐴
Γ⊢𝗋𝖾𝖿𝗅𝑣𝗇𝖿𝖨𝖽𝐴(𝑎,𝑏)
nf-refl
Γ⊢𝑛≡𝟢:ℕ
Γ⊢𝗏𝗇𝗂𝗅𝗇𝖿𝖵𝖾𝖼(𝑐,𝑛)
nf-vnil
Γ⊢𝑣𝑛𝗇𝖿ℕΓ⊢𝑣𝑎𝗇𝖿𝑐Γ⊢𝑣𝑥𝑠𝗇𝖿𝖵𝖾𝖼(𝑐,𝑣𝑛)Γ⊢𝑛≡𝗌𝗎𝖼(𝑣𝑛):ℕ
Γ⊢𝗏𝖼𝗈𝗇𝗌(𝑣𝑛,𝑣𝑎,𝑣𝑥𝑠)𝗇𝖿𝖵𝖾𝖼(𝑐,𝑛)
nf-vcons
Γ⊢𝑢𝗇𝖾𝐴𝐴𝗉𝗈𝗌𝗂𝗍𝗂𝗏𝖾
Γ⊢𝑢𝗇𝖿𝐴
nf-ne
Normal universe codes:
Γ⊢𝐾𝗇𝖿Uℓ
nf-cd-K
𝑘<ℓ
Γ⊢U𝑘𝗇𝖿Uℓ
nf-cd-univ
Γ⊢𝑐𝗇𝖿UℓΓ,𝑥:𝑐⊢𝑑𝗇𝖿Uℓ
Γ⊢∏𝜖,𝜚𝑥:𝑐𝑑𝗇𝖿Uℓ
nf-cd-pi
Γ⊢𝑐𝗇𝖿UℓΓ,𝑥:𝑐⊢𝑑𝗇𝖿Uℓ
Γ⊢∑𝑥:𝑐𝑑𝗇𝖿Uℓ
nf-cd-sg
Γ⊢𝑐𝗇𝖿UℓΓ⊢𝑣𝗇𝖿𝑐Γ⊢𝑤𝗇𝖿𝑐
Γ⊢𝖨𝖽𝑐(𝑣,𝑤)𝗇𝖿Uℓ
nf-cd-id
Γ⊢𝑐𝗇𝖿UℓΓ⊢𝑣𝗇𝖿ℕ
Γ⊢𝖵𝖾𝖼(𝑐,𝑣)𝗇𝖿Uℓ
nf-cd-vec
Γ⊢𝑐𝗇𝖿Uℓ𝑐𝗌𝗍𝗎𝖼𝗄
Γ⊢𝖫𝗂𝖿𝗍ℓ(𝑐)𝗇𝖿Uℓ+1
nf-cd-lift
where 𝐾∈{𝟏,𝟐,ℕ}.
Normal types:
Γ⊢Uℓ𝗇𝖿𝗍𝗒𝗉𝖾
nf-ty-univ
Γ⊢𝐴𝗇𝖿𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝐵𝗇𝖿𝗍𝗒𝗉𝖾
Γ⊢∏𝜖,𝜚𝑥:𝐴𝐵𝗇𝖿𝗍𝗒𝗉𝖾
nf-ty-pi
Γ⊢𝐴𝗇𝖿𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝐵𝗇𝖿𝗍𝗒𝗉𝖾
Γ⊢∑𝑥:𝐴𝐵𝗇𝖿𝗍𝗒𝗉𝖾
nf-ty-sg
Γ⊢𝐾𝗇𝖿𝗍𝗒𝗉𝖾
nf-ty-K
Γ⊢𝐴𝗇𝖿𝗍𝗒𝗉𝖾Γ⊢𝑣𝗇𝖿𝐴Γ⊢𝑤𝗇𝖿𝐴
Γ⊢𝖨𝖽𝐴(𝑣,𝑤)𝗇𝖿𝗍𝗒𝗉𝖾
nf-ty-id
Γ⊢𝑐𝗇𝖿UℓΓ⊢𝑣𝗇𝖿ℕ
Γ⊢𝖵𝖾𝖼(𝑐,𝑣)𝗇𝖿𝗍𝗒𝗉𝖾
nf-ty-vec
Γ⊢𝑢𝗇𝖾Uℓ
Γ⊢𝑢𝗇𝖿𝗍𝗒𝗉𝖾
nf-ty-ne
Here positive means Boolean, natural, identity, vector, universe, or neutral type. A code is stuck exactly when it is neutral, vector-headed, or lift-headed. Consequently a lift may head a normal code but never a normal type; the element field of a vector is the one code-valued field in a normal type.
Semantic code equality 𝛼:A≈𝑖B and semantic type equality 𝛿:A≈B are ranked proof trees. Write 𝐷Ψ for the values admissible at the displayed support telescope. Membership is the support-indexed judgment 𝜂:(𝑑,𝑒)∈𝖤𝗅𝗍Ψ(𝛼),𝖤𝗅𝗍Ψ(𝛼)⊆𝐷Ψ×𝐷Ψ. Its formation includes 𝑑,𝑒∈𝐷Ψ and a Ψ-admissibility derivation for 𝜂; there is no unindexed membership judgment on raw 𝐷. In particular, Unit has 𝖤𝗅𝗍Ψ(𝗎𝑖)=𝐷Ψ×𝐷Ψ, not 𝐷×𝐷. The generators, in formation order, are Unit, Boolean, natural, smaller universe, product, sum, identity, vector, lift, and neutral code. A ranked derivation is formed at a finite support telescope Ψ whose levels are the initial segment 0,…,|Ψ|−1 and whose declarations classify every neutral occurrence in each endpoint and membership witness. There is no sparse-support compression step. A typed semantic substitution 𝜎:Ψ⇒Φ assigns a value in 𝐷Φ at each transported declaration, with membership evidence at Φ. An iterated typed target weakening additionally has a structural action on neutral syntax: it fixes old levels and transports stored semantic fields, so its image is still neutral. This action is distinct from arbitrary semantic substitution, which may expose a redex. Arbitrary source instantiation, for 𝑒∈𝐷Φ with its transported membership evidence, is (𝜎,𝑒):Ψ.A⇒Φ. Put B:=𝜎∗A. Target weakening and the canonical fresh lift have the exact types 𝗐𝗄∘𝜎:Ψ⇒Φ.B,𝜎↑:Ψ.A⇒Φ.B, with 𝜎↑=(𝗐𝗄∘𝜎,↑(𝗐𝗄∘𝜎)∗A(𝗑|Φ|)). The classifier (𝗐𝗄∘𝜎)∗A lives over Φ.B and classifies only the last component. The paired lift likewise targets 𝚽.(𝝈∗𝛼); its fresh pair is classified there by (𝗐𝗄∘𝝈)∗𝛼. Composition satisfies 𝜏∘(𝜎,𝑒)=(𝜏∘𝜎,𝜏∗𝑒). A dependent-family premise is natural under paired typed substitutions carrying evidence that their two assignments preserve corresponding classifiers. For 𝝈:𝚿⇒𝚽, products quantify over every 𝜁:(𝑑,𝑒)∈𝖤𝗅𝗍Φ(𝝈∗𝛼); formation of 𝜁 supplies 𝑑,𝑒∈𝐷Φ. Sums store support-indexed first-component evidence and the corresponding fiber evidence at the same support; identity stores a clique containing both endpoints and both reflexivity witnesses; vectors recurse on ranked natural length evidence. For a neutral-code generator with endpoints N=𝗎𝗉̂U𝑖(𝑘) and N′=𝗎𝗉̂U𝑖(𝑘′), its elements are exactly 𝗎𝗉N(𝑞) and 𝗎𝗉N′(𝑞′) for world-indexed related 𝑞,𝑞′ at the displayed support; there are no unbound carrier annotations. Semantic types use the same generators, except that a vector records a code premise and its semantic embedding, a universe at 𝑖 has code equality ≈𝑖 as its elements, and the code-lift generator is replaced by left and right peeling. A comparison involving code levels 𝑖1,…,𝑖𝑟 is ordered first by the multiset [𝑖1(⃗0),…,𝑖𝑟(⃗0)] and then by the Hessenberg sum of all construction and membership ranks. This measure strictly decreases under universe descent, transitivity, cross-level vector transport, and peeling.
The syntax–value relation is first defined without erasing that evidence: Δ⊩𝛿,𝜂𝑎∼𝑑,𝛿:A≈A@ΨΔ,𝜂:(𝑑,𝑑)∈𝖤𝗅𝗍(𝛿),Δ⊢𝑎:𝖰|Δ|(A),𝛿,𝜂,𝑑areΨΔ-admissible, where ΨΔ is the semantic classifier telescope of Δ. It is constructed by nested recursion. The outer order is the multiset of active code heights followed by generator rank; at one fixed generator the inner order is membership rank. Thus a product may call the already constructed relation at its strict domain or family generator with an argument witness of arbitrary rank. It does not compare that witness with the enclosing function witness. Unit adds nothing; Boolean and natural evidence select constructor or neutral equations; natural successor recurses on predecessor membership evidence. A product premise 𝛼,𝛽 requires, for every syntactic world embedding 𝜔:Δ↪Δ′, its induced typed classifier weakening 𝜔Ψ:ΨΔ⇒ΨΔ′, and every indexed argument witness 𝜁, the application witness at the target-world family premise 𝛽𝜔Ψ,𝜁 for 𝜔∗𝑎𝜖,𝜚𝑏. Quotations, reification, reflection, neutral readback, closures, ranked evidence, and stored judgments are transported by the corresponding 𝜔∗ or (𝜔Ψ)∗ action; in particular, for 𝑛=|Δ| and 𝑛′=|Δ′|, (𝜔Ψ)∗𝖰𝑛(A)=𝛼𝖰𝑛′((𝜔Ψ)∗A). The canonical embedding fixes old levels, while its binder lift sends the source fresh level 𝑛 to the target fresh level 𝑛′; dependent premise families are reindexed by precomposition and still range over every target-world argument, not merely arguments in the image of 𝜔Ψ. Their naturality equation is 𝜏∗𝛽𝜎,𝜁=𝛽𝜏∘𝜎,𝜏∗𝜁. A fresh readback binder uses 𝜎↑; an arbitrary future related argument uses (𝗐𝗄∘𝜎,𝑒) and never the canonical lift. A sum recurses at its two stored component premises. Identity reflexivity recurses at the carrier premise and stores both endpoint equations. Vector cons recurses at the semantic embedding of its code premise and at the shorter vector generator. Universe evidence is a code self-derivation and stores both code and type quotation equations; neutral type evidence stores its neutral readback equation. Paired lift peels recurse at their lower-ranked core. Fresh variables and every stuck neutral carry the world-indexed premise 𝑘≈neΨ𝑘 required by reflection, equivalently membership in the readback-defined field 𝐾Ψ. The neutral relation is a partial equivalence relation on all Ψ-admissible neutrals and an equivalence relation only after restriction to 𝐾Ψ. Its field condition quantifies over typed future weakenings from Ψ and reads back only at the exact target length. Quotation and reification at support Ψ use depth |Ψ|; larger depths arise only after an explicit typed world extension. Thus every recursive call descends in the displayed construction order. Same-endpoint, cross-level, bridge, and peel maps state evidence independence as exact indexed equivalences before the shorter notation Δ⊩𝑎∼𝑑:A erases 𝛿 and 𝜂. Quotation is proved simultaneously under realizing substitutions. In the product case, an arbitrary future argument extends the raw and semantic substitutions together; beta reduction exposes the quoted body, and the strict family induction hypothesis proves its indexed relation. In the sum case, the first quotation selects the transported fiber before the second is converted and quoted.
The fundamental lemma uses two independent quantifiers. Its semantic half fixes an arbitrary support telescope Ψ and ranked environment witnesses 𝜌≈Ψ𝜌′:Γ. Semantic extension by 𝜁:(𝑑,𝑒)∈𝖤𝗅𝗍Ψ(𝛼) is well formed because membership itself supplies 𝑑,𝑒∈𝐷Ψ; “arbitrary” therefore means arbitrary among values admissible at that displayed support. Its syntactic half separately fixes a context Δ and a valid pair supported by ΨΔ. No semantic derivation is assigned the world |Δ| merely because the syntactic half mentions Δ.
Timpl surface elaboration
The state-passing generation judgments are L;M;Γ⊢𝑒⇒𝑎:𝐴⊣L′;M′;C;U,L;M;Γ⊢𝑒⇐𝐴⇝𝑎⊣L′;M′;C;U,L;M;Γ⊢𝐴⇐𝗍𝗒𝗉𝖾⇝𝐴′⊣L′;M′;C;U. Output contexts extend inputs, and premises thread them from left to right. The atomic, checked-hole, direction-changing, and lambda rules are
𝑥:𝐴∈Γ
L;M;Γ⊢𝑥⇒𝑥:𝐴⊣L;M;∅;∅
E-Syn-Var
𝑐[⃗ℓ]:𝐴isafullylevel-instantiatedsignatureatom
L;M;Γ⊢𝑐[⃗ℓ]⇒𝑐[⃗ℓ]:𝐴⊣L;M;∅;∅
E-Syn-Atom
?𝛼freshM′=M,?𝛼:[Γ⊢𝐴]
L;M;Γ⊢_⇐𝐴⇝?𝛼[idΓ]⊣L;M′;∅;∅
E-Chk-Hole
L;M;Γ⊢𝑒⇒𝑎:𝐵⊣L′;M′;C;U
L;M;Γ⊢𝑒⇐𝐴⇝𝑎⊣L′;M′;(C,Γ⊢𝐴≐𝐵𝗍𝗒𝗉𝖾);U
E-Chk-Syn
𝗐𝗁𝗇𝖿(𝐴)=∏𝜖,𝜚𝑥:𝐵𝐶L;M;Γ,𝑥:𝐵⊢𝑒⇐𝐶⇝𝑏⊣L′;M′;C;U
L;M;Γ⊢𝜆𝜖,𝜚𝑥.𝑒⇐𝐴⇝𝜆𝜖,𝜚(𝑥:𝐵).𝑏⊣L′;M′;C;U
E-Chk-Lam
In E-Chk-Lam, the surface abstraction and exposed product must agree in both explicitness and relevance. A mismatch in either bit is rejected before the body is checked. Universe membership is generated by
𝑝,𝑞well-formedlevelexpressions
L;M;Γ⊢U𝑝⇐U𝑞⇝U𝑝⊣L;M;∅;(𝑝+1≤𝑞)
E-Chk-Univ
The remaining generation clauses and the complete policy-aligned clauses are displayed next. Together with the six clauses above, this is the complete finite rule inventory; the rule families after the display specify solving and certificate rechecking.
Type formation is a separate inductive judgment, not an implicit appeal to a maximum universe. In E-Ty-Vec, 𝗅𝖾𝗏𝖾𝗅L(̂ℓ)=(ℓ,L0) means ℓ is the written well-formed level and L0=L, or ℓ=?𝑢 is fresh and L0=L,?𝑢.
Thus the legal input 𝖵𝖾𝖼[0]((𝑥:ℕ)→ℕ,𝟢) first elaborates its product element type by E-Ty-Pi; the resulting guard is then discharged by U-Pi. No term-synthesis rule for a product is required.
The binding type formers thread the domain output into the opened codomain.
Type-mode rule selection is deterministic. Inspect the outer constructor in this priority order: hole, universe literal, nullary base, identity, vector, product, and Sigma. Rule E-Ty-El is the fallback only for an atom outside those seven syntactic classes whose synthesis exposes a universe. It is therefore never tried after a recognized type-former rule has failed, and no surface type expression selects two type-mode clauses.
Pairs and projections have the following exact clauses. The weak-head premises are tests; failure gives no derivation.
Ordinary application is the least relation generated by the next four rules. Rule priority is part of the definition: insertion precedes the explicit case, a written implicit argument precedes insertion, and E-Spine-Done applies only when the written spine is empty and the exposed head is not an implicit product.
A flexible or rigid nonproduct head and an explicitness mismatch have no rule. Consequently this relation inserts one unique consecutive block of implicit arguments and never guesses a relevance bit.
Finally let a signature entry have level parameters ⃗𝑢, result 𝑅, and dependency-ordered argument telescope ((𝑥𝑖:𝐵𝑖)𝜖𝑖,𝜚𝑖,𝜔𝑖)𝑛𝑖=1. Written levels are copied; omitted levels are replaced from left to right by fresh level metavariables. This deterministic operation is written 𝗅𝖾𝗏𝖾𝗅𝗌ℎ(⃗̂ℓ;L)=(⃗ℓ;L0). The signature-head and telescope rules are:
Rules P-Lam and P-Pair are the two genuinely checking-directed introductions. They display the expected type that generation weak-head inverts, copy the product metadata, and substitute the first pair component into the second component’s type. Atoms and every declared constructor or eliminator instead use P-Atom or the exact signature-head relation below; there is no duplicate introduction route. Type formation belongs to the separate relation below; it is not a term introduction into a guessed common universe.
For a surface vector level, 𝗅𝖾𝗏𝖾𝗅𝖯(̂ℓ)=ℓ copies a written level and, when the level is omitted, selects the metavariable-free formation witness stored by the candidate elaboration. The type relation for this policy is exactly:
𝑒≢_Γ⊢𝑒⇝𝖯𝑎:𝑇𝗐𝗁𝗇𝖿(𝑇)=U𝑢
Γ⊢𝑒⇝𝗍𝗒𝗉𝖾𝖯𝑎
P-Ty-El
𝑝isawell-formedlevelexpression
Γ⊢U𝑝⇝𝗍𝗒𝗉𝖾𝖯U𝑝
P-Ty-Univ
𝐷∈{𝟏,𝟐,ℕ}
Γ⊢𝐷⇝𝗍𝗒𝗉𝖾𝖯𝐷
P-Ty-Base
Γ⊢𝐴⇝𝗍𝗒𝗉𝖾𝖯𝐴′Γ⊢𝑒0⇝𝖯𝑎0:𝐴′Γ⊢𝑒1⇝𝖯𝑎1:𝐴′
Γ⊢𝖨𝖽𝐴(𝑒0,𝑒1)⇝𝗍𝗒𝗉𝖾𝖯𝖨𝖽𝐴′(𝑎0,𝑎1)
P-Ty-Id
𝗅𝖾𝗏𝖾𝗅𝖯(̂ℓ)=ℓΓ⊢𝐴⇝𝗍𝗒𝗉𝖾𝖯𝐴′Γ⊢𝐴′:UℓΓ⊢𝑛⇝𝖯𝑛′:ℕ
Γ⊢𝖵𝖾𝖼[̂ℓ](𝐴,𝑛)⇝𝗍𝗒𝗉𝖾𝖯𝖵𝖾𝖼(𝐴′,𝑛′)
P-Ty-Vec
Γ⊢𝐴⇝𝗍𝗒𝗉𝖾𝖯𝐴′Γ,𝑥:𝐴′⊢𝐵⇝𝗍𝗒𝗉𝖾𝖯𝐵′
Γ⊢∏𝜖,𝜚𝑥:𝐴𝐵⇝𝗍𝗒𝗉𝖾𝖯∏𝜖,𝜚𝑥:𝐴′𝐵′
P-Ty-Pi
Γ⊢𝐴⇝𝗍𝗒𝗉𝖾𝖯𝐴′Γ,𝑥:𝐴′⊢𝐵⇝𝗍𝗒𝗉𝖾𝖯𝐵′
Γ⊢∑𝑥:𝐴𝐵⇝𝗍𝗒𝗉𝖾𝖯∑𝑥:𝐴′𝐵′
P-Ty-Sigma
There is deliberately no P-Ty-Hole. Rule E-Ty-Hole remains part of general constraint generation, but its fresh universe may remain ambiguous, and a mixed-level type need not inhabit any universe at all. The decidable completeness policy therefore requires written annotation types; it still admits explicit mixed-level Π- and Σ-types through P-Ty-Pi/P-Ty-Sigma. The syntactic side condition on P-Ty-El prevents the term-hole rule from reconstructing a whole omitted type by a second route. Rule P-Ty-Vec separately records the particular universe membership required by vector formation, including an omitted vector level determined by guard compilation.
Ordinary applications have no alternative insertion choice:
The remaining rule is indexed by the same finite signature telescope as E-Syn-Head. For the external-level telescope of ℎ, define 𝗅𝖾𝗏𝖾𝗅𝗌ℎ,𝖯(⃗̂ℓ)=⃗ℓ positionwise: copy a written level exactly, and at an omitted position select the metavariable-free level witness stored by the candidate elaboration.
The auxiliary head judgment has exactly the three telescope clauses E-Head-Done, E-Head-Infer, and E-Head-Write, replacing each generation premise by ⇝𝖯 and replacing each inferred metavariable by its stored metavariable-free core witness. In particular, there is still no omission clause for a written motive. This completes the inductive policy relation and fixes every implicit, external-level, binder, and motive choice used by the completeness proof.
Annotations thread type checking into subject checking. Pair checking Annotations thread type checking into subject checking. Pair checking weak-head inverts a Σ-type and threads the first component into the second. Application uses the auxiliary spine clauses of definition 112.6: insert every consecutive declared implicit binder, then check the written explicit argument. Each emitted core application copies the exposed product’s explicitness and relevance; a mismatch of written and exposed explicitness is rejected. A flexible head is outside the direct fragment until an annotation exposes a product with declared relevance. Every nonbinding declared head—including program constants, constructors, and eliminators—uses the finite signature schema: traverse its declaration telescope in dependency order, create omitted level and implicit metavariables, check each written argument at its substituted domain, and return the complete core head at its substituted result, copying both bits from every declaration-telescope binder to its application node. Motives are written inputs. The two binding schemas form 𝐴⇐𝗍𝗒𝗉𝖾, open the written binder in Γ,𝑥:𝐴′, form 𝐵⇐𝗍𝗒𝗉𝖾, and thread the domain’s output state into the body. The Π-schema returns ∏𝜖,𝜚𝑥:𝐴′𝐵′ as a well-formed type and copies its written metadata; the Σ-schema returns ∑𝑥:𝐴′𝐵′ as a well-formed type and has no such metadata. The finite type-mode clauses use the exact formation premises of every remaining Timpl former. In particular, a variable or declared constant synthesizing a universe type is returned as a type by U-El; a type-mode hole declares a fresh universe element. The vector clause is exactly E-Ty-Vec of definition 112.6: it first elaborates the element by the type-mode judgment, checks the length at ℕ, and appends the suspended guard Γ⊢𝐴′˙∈Uℓ to the guard projection of C. Thus C is an ordered equation list together with an ordered guard list, and no guard is sent to the object unifier. After object substitution, the exact compiler of definition 112.11 follows the Timpl formation rules: universes emit 𝑝+1≤ℓ; base types emit 0≤ℓ; products and sums recurse over domain and codomain; identity and vector types recurse over their element type; a rigid neutral synthesized at U𝑞 emits ℓ≐𝖫𝑞; and a flexible head returns outside. These emitted level constraints join the same stratified level problem as the constraints generated during traversal. These binding and nonbinding schemas, together with the displayed atomic, hole, direction-changing, application, pair, projection, and annotation clauses, are the complete finite generation definition.
The type-mode hole belongs only to general constraint generation. The decidable completeness policy of definition 112.31 has no P-Ty-Hole, and the side condition on P-Ty-El forbids reconstructing a whole type through the term-hole rule.
Object constraints have form Γ⊢𝐴≐𝐵𝗍𝗒𝗉𝖾 or Γ⊢(𝑠:𝑆)≐(𝑡:𝑇). A type equation compares well-formed types without placing them in a common universe. For a term equation, solve the type equality first, convert to a homogeneous term equation, weak-head normalize, and delete every reflexive normal equation before head classification. Equal rigid heads decompose left to right; unequal heads fail. A direct-pattern flex–rigid equation assigns the contextual abstraction exactly under the occurs, scope, dependency-order, and type checks of definition 112.18. That type check must succeed after equality substitution without using a residual formation bound; otherwise this fixed policy reports outside. Flex–flex uses the dependency-closed telescope intersection and metacontext insertion of definition 112.20. A flexible neutral with a following application or stuck eliminator, pruning, and any other non-pattern occurrence produce the distinct result outside the direct fragment, not unsatisfiable. Rigid comparison of two universes transfers a strict level equality into the level state. The equality pass immediately orients and substitutes it through the combined state before a suspended term task is exposed; a distinct rigid equality rejects there. Thus every later object assignment is genuinely well typed. An empty object state is still not success until the residual formation bounds have passed the bound solver.
Normalize a zero/successor/maximum level expression by distributing successor over maximum, retaining the largest offset for each external parameter, and deleting dominated numeral atoms. Two rigid level expressions agree under all external-parameter valuations exactly when these declaration-ordered normal forms are identical. Level constraints generated during syntax traversal or emitted during object simplification form the stratified problem of definition 112.12. A fresh equality metavariable receives at most one dependency-ordered assignment 𝑞≐𝖫𝑒; strict universe comparison uses this equality, never a cumulative lift. These assignments are substituted on demand before dependent object work. The remaining formation bounds are edges 𝑝+𝑘≤𝑞 with a bound metavariable on the right. A zero-weight edge from zero seeds every bound vertex. Positive cycles fail and acyclic path maxima give the least residual solution. The independent rechecker clauses of definition 112.27 check all written motives, vector and Boolean premises, external levels, explicitness, and relevance bits.
Shared-DAG unification
These three cards fix the represented problem, the complete root-class transition, and its pointer-machine schedule. They are the exact signatures for the Chapter 113 MGU and linearity statements.
Fix a finite first-order signature Σ, whose symbol arities are part of the signature, and a finite set X of flexible variables. Ambient Timpl variables are treated here as distinct rigid nullary symbols. A shared term DAG is a finite directed acyclic graph 𝐺 with the following labels.
A node labelled 𝑓∈Σ has the ordered children 𝑛[1],…,𝑛[𝑘], where 𝑘 is the arity of 𝑓.
A node labelled 𝑥∈X has no children, and every occurrence of 𝑥 in the input points to this one node. Rigid nullary nodes may also be shared.
A problem adds 𝑚 pairs of distinguished nodes (𝑝𝑖,𝑞𝑖), for 1≤𝑖≤𝑚. Its size is |𝐺|:=|𝑉(𝐺)|+|𝐴(𝐺)|+𝑚, so a child pointer and an input equation are counted once.
For a substitution 𝜃:X→𝑇Σ(Y) into finite trees, define 𝑈𝜃(𝑛) by following child pointers and replacing a flexible leaf 𝑥 by 𝜃(𝑥). The recursion is defined because 𝐺 is acyclic. The substitution solves the graph problem when 𝑈𝜃(𝑝𝑖)=𝑈𝜃(𝑞𝑖) for every 𝑖. Thus sharing changes the representation, not the set of tree solutions.
An equivalence relation ∼ on the nodes of a shared term DAG is valid for the distinguished pairs when:
𝑝𝑖∼𝑞𝑖 for every input pair;
if 𝑟∼𝑠 and both nodes have rigid labels, those labels are the same symbol 𝑓, and 𝑟[𝑗]∼𝑠[𝑗] at every argument position 𝑗;
after every equivalence class is contracted, the directed child graph has no directed cycle.
The second clause is the homogeneous closure condition; it includes both rigid-head compatibility and propagation to corresponding children. The third is the acyclic closure condition. It is not optional: a class containing both 𝑥 and 𝑓(𝑥) is homogeneous but denotes no finite tree.
A live state consists of the undeleted part of 𝐺, undirected links between nodes required to be equal, and an ordered list 𝑆 of bindings. Initially the input pairs are the links and 𝑆 is empty. A link class is a connected component of the undirected links. A root class is a link class all of whose live nodes have no live parent.
One transition chooses a root class 𝑅.
If 𝑅 contains two rigid nodes with different labels, return 𝖼𝗅𝖺𝗌𝗁.
Otherwise choose a rigid node 𝑟∈𝑅 when one exists; if all nodes are flexible, choose one of them as 𝑟. For every other 𝑠∈𝑅, record 𝑠↦𝑟 when 𝑠 is flexible. When 𝑠 and 𝑟 are rigid nodes labelled by the same 𝑘-ary symbol, add the links (𝑠[𝑗],𝑟[𝑗]) for 1≤𝑗≤𝑘.
Delete the nodes of 𝑅 and their outgoing child arcs from the live graph. A deleted rigid node remains addressable as the compact recipe consisting of its label and child pointers; it is absent only from future scheduling scans.
If no root class exists while live nodes remain, return 𝖼𝗒𝖼𝗅𝖾. If no live node remains, return 𝑆.
The procedure 𝖥𝗂𝗇𝗂𝗌𝗁(𝑟) implements one root-class transition as follows. Every node stores its label, ordered children, a list of parents, an incident-link list, and an initially null owner pointer. Deleted nodes are skipped by live scans. On entry, an already deleted 𝑟 is ignored; a live node with a nonnull owner reports 𝖼𝗒𝖼𝗅𝖾. Otherwise set 𝗈𝗐𝗇𝖾𝗋(𝑟):=𝑟, push 𝑟, and repeat:
pop 𝑠; if 𝑟 and 𝑠 have different rigid labels, report 𝖼𝗅𝖺𝗌𝗁;
before inspecting 𝑠’s links, recursively call 𝖥𝗂𝗇𝗂𝗌𝗁(𝑡) for every live parent 𝑡 of 𝑠;
consume every link (𝑠,𝑡). Ignore a deleted 𝑡 or 𝑡=𝑟. If 𝑡’s owner is null, set it to 𝑟 and push 𝑡; if its owner is 𝑟, it is already on this class’s stack; any other owner reports 𝖼𝗒𝖼𝗅𝖾;
for 𝑠≠𝑟, record 𝑠↦𝑟 when 𝑠 is flexible, and add links between corresponding children when both are rigid. Mark 𝑠 deleted.
When the stack empties, mark 𝑟 deleted. The solver adds the input links, calls 𝖥𝗂𝗇𝗂𝗌𝗁 on every rigid node in one global list, and only then on the remaining flexible nodes. Hence a mixed class is represented by a rigid 𝑟, while a variable-only class may choose a flexible 𝑟.
The Timpl-clauses compiler
The source patterns are 𝑝::=𝑥∣𝑐(𝑝1,…,𝑝𝑘)∣.𝑡∣!. Rows are linear and ordered. A constructor or absurd pattern in an erased column is a relevance error. In the first surviving row, the compiler chooses that row’s leftmost blocking pattern among the runtime columns. Before inspecting a later row’s assertions, it applies ordered priority: if the first surviving row contains only variables and dots, it validates only those dots, returns that row’s leaf, and discards every later row as redundant without validating it. At a split of 𝑥:𝐷(⃗𝑢), each constructor 𝑐:(⃗𝑦:Δ𝑐)→𝐷(⃗𝑣𝑐) generates (⃗𝑢;𝑥)≡Ξ;𝐷(⃗𝑣𝑐;𝑐(⃗𝑦)). The restricted indexed unifier returns a dependency-preserving substitution, a negative certificate, or stuck. The first specializes the whole frontier and recurses, the second omits that constructor, and the third returns 𝗌𝗍𝗎𝖼𝗄𝖤𝗊 with its ordered residual equations. A dot is checked only when its row becomes the least surviving candidate; an absurd pattern succeeds only when every constructor has a negative certificate.
The compiler has exactly seven outcomes: 𝑅::=𝗈𝗄(C)∣𝗎𝗇𝖼𝗈𝗏𝖾𝗋𝖾𝖽(Θ,𝜋)∣𝗌𝗍𝗎𝖼𝗄𝖤𝗊(E)∣𝗌𝗍𝗎𝖼𝗄𝖥𝗈𝗋𝖼𝖾(𝑖,𝑧,𝑐,𝑢)∣𝖻𝖺𝖽𝖣𝗈𝗍(𝑖,𝑢,𝑡,𝐴)∣𝖻𝖺𝖽𝖠𝖻𝗌𝗎𝗋𝖽(𝑖,𝑐,𝜋)∣𝖻𝖺𝖽𝖱𝖾𝗅𝖾𝗏𝖺𝗇𝖼𝖾(𝑖,𝑧). The uncovered result alone carries a symbolic coverage witness. The two stuck forms distinguish unsolved indexed unification from a constructor pattern forced against a neutral image; the three bad forms reject a row against the source card. No additional abort result is implicit.
The restricted unifier consumes the leftmost equation and uses the fixed schedule Solution, indexed self-check plus Injectivity, Conflict, then Cycle; generated equations are prepended in telescope order and solutions are substituted globally. Variables inherited from the pre-split frontier are tagged old and constructor-telescope variables fresh. For a distinct variable–variable equation, the canonical orientation eliminates a fresh variable before an old one and otherwise the later telescope variable before the earlier one. It uses the first orientation whose occurs check succeeds and whose eliminand 𝑥 can be moved rightward, by the unique stable sequence of adjacent exchanges, to just after the rightmost later declaration free in its solution term. Every declaration crossed must be independent of 𝑥, and all other relative order is preserved. Thus the successor-vector constraint preserves old 𝑟 and solves fresh 𝑞:=𝑟; 𝑥=𝑥 still has no deletion rule. Specialization processes the selected column exactly once. Matching constructor patterns expose subpatterns, different heads delete a row, variables record the forced constructor, dots retain a row-local judgmental-equality obligation, and an absurd pattern retains a row-local reachable-absurd marker. In the latter three retained cases, the row also receives one fresh variable pattern for each declaration of the constructor telescope. A matching constructor row receives its constructor subpatterns, whose number is that same telescope length. Thus replacing one selected frontier declaration by Δ𝑐 replaces its selected pattern in every retained row by exactly |Δ𝑐| patterns. For any other declaration eliminated by the substitution, a separate recursive forced-image matcher consumes its pattern cell without adding frontier cells: matching constructor heads recurse, different heads delete, and variables, dots, and absurd patterns record a binding, obligation, or marker. A constructor pattern forced against a neutral image records a suspended task. Only when its row becomes least does the compiler retry that task: a matching head consumes it, a different head deletes the row, and a still-neutral image returns 𝗌𝗍𝗎𝖼𝗄𝖥𝗈𝗋𝖼𝖾. Likewise a reachable-absurd marker or invalid dot is raised only for the least row; a prior successful row makes every later invalid row redundant instead.
Typed trees have exactly the forms 𝗅𝖾𝖺𝖿(𝑖,𝑒),𝗌𝗉𝗅𝗂𝗍(𝑥,{𝑐↦(𝜎𝑐,C𝑐)}),𝖺𝖻𝗌𝗎𝗋𝖽(𝑥,{𝜈𝑐}). An empty reachable matrix is an uncovered-constructor error. Tree translation uses only Timpl eliminators; a recursive leaf may use only the direct-child component supplied by its structural eliminator. The generated judgmental equations are exactly the reachable leaf equations, with ordered-row priority.