Synthetic Phase Distinctions and Synthetic Tait Computability
Prerequisites. Direct starred prerequisites: Chapter 57. No later core chapter depends on this route.
A dependent theory with Booleans and dependent products has a question attached to it that its rules do not answer: is every closed term of Boolean type judgmentally equal to one of the two constructors? Tait’s method answers such questions by defining, for each type, a predicate on terms of that type, and then proving that every term satisfies the predicate of its type. The definition is by recursion on the type, and that is where the difficulty lies in a dependent theory, because the type of the result of an application is computed from the argument.
This chapter carries out that argument once, in a metalanguage where the recursion, the contexts, and the naturality conditions are all performed by a single modality. The object to be built is a glue type: a type former that fastens a semantic predicate onto a syntactic type so tightly that the composite is judgmentally the syntactic type again in one phase, and is the predicate in the other. Every construction below exists to make that former available and to use it.
Let Σ be the following list of constants, each declared in a metalanguage with dependent products and a universe U. A signature in this sense is a finite list of typed constants together with a finite list of equations between terms built from them; the object theory is the theory freely generated by that list. 𝗍𝗉:U,𝗍𝗆:𝗍𝗉→U,𝖻𝗈𝗈𝗅:𝗍𝗉,𝗍𝗋𝗎𝖾,𝖿𝖺𝗅𝗌𝖾:𝗍𝗆(𝖻𝗈𝗈𝗅),𝗂𝖿:(𝐶:𝗍𝗆(𝖻𝗈𝗈𝗅)→𝗍𝗉)→(𝑏:𝗍𝗆(𝖻𝗈𝗈𝗅)):→𝗍𝗆(𝐶𝗍𝗋𝗎𝖾)→𝗍𝗆(𝐶𝖿𝖺𝗅𝗌𝖾)→𝗍𝗆(𝐶𝑏),𝗉𝗂:(𝐴:𝗍𝗉)→(𝗍𝗆(𝐴)→𝗍𝗉)→𝗍𝗉,𝗅𝖺𝗆:((𝑥:𝗍𝗆(𝐴))→𝗍𝗆(𝐵𝑥))→𝗍𝗆(𝗉𝗂𝐴𝐵),𝖺𝗉𝗉:𝗍𝗆(𝗉𝗂𝐴𝐵)→(𝑥:𝗍𝗆(𝐴))→𝗍𝗆(𝐵𝑥). The equations are 𝗂𝖿𝛽1:𝗂𝖿𝐶𝗍𝗋𝗎𝖾𝑡𝑓=𝑡,𝗂𝖿𝛽2:𝗂𝖿𝐶𝖿𝖺𝗅𝗌𝖾𝑡𝑓=𝑓,𝗉𝗂𝛽:𝖺𝗉𝗉(𝗅𝖺𝗆𝑓)𝑎=𝑓𝑎,𝗉𝗂𝜂:𝗅𝖺𝗆(𝖺𝗉𝗉𝑒)=𝑒.
Three features of this presentation are used throughout and are worth naming before any calculation. Binding is carried by the metalanguage: the second argument of 𝗉𝗂 is a function 𝗍𝗆(𝐴)→𝗍𝗉, so there is no separate account of variables, capture, or substitution for the object theory. Typing is carried by indexing: 𝗍𝗆 is a family over 𝗍𝗉, so an ill-typed object term cannot be written down. Equality is carried by equations between constants, so the object theory’s judgmental equality is the least congruence generated by the four displayed equations.
The motive 𝐶 of 𝗂𝖿 is an arbitrary function 𝗍𝗆(𝖻𝗈𝗈𝗅)→𝗍𝗉 of the metalanguage. This is what makes the eliminator dependent, and it is the exact feature that the next section will show to obstruct a recursion on type structure.
Write 𝗇𝖾𝗀:=𝗅𝖺𝗆(𝜆𝑥.𝗂𝖿(𝜆_.𝖻𝗈𝗈𝗅)𝑥𝖿𝖺𝗅𝗌𝖾𝗍𝗋𝗎𝖾) and 𝑏0:=𝖺𝗉𝗉𝗇𝖾𝗀𝗍𝗋𝗎𝖾. Then 𝑏0 is a closed term of 𝗍𝗆(𝖻𝗈𝗈𝗅) whose head constant is 𝖺𝗉𝗉, not 𝗍𝗋𝗎𝖾 or 𝖿𝖺𝗅𝗌𝖾. Its value is computed by the two equations: 𝑏0𝗉𝗂𝛽=𝗂𝖿(𝜆_.𝖻𝗈𝗈𝗅)𝗍𝗋𝗎𝖾𝖿𝖺𝗅𝗌𝖾𝗍𝗋𝗎𝖾𝗂𝖿𝛽1=𝖿𝖺𝗅𝗌𝖾.
The signature Σ satisfies canonicity when every closed term 𝑏 of type 𝗍𝗆(𝖻𝗈𝗈𝗅) — that is, every global element of 𝗍𝗆(𝖻𝗈𝗈𝗅) in the theory freely generated by Σ — satisfies 𝑏=𝗍𝗋𝗎𝖾 or 𝑏=𝖿𝖺𝗅𝗌𝖾.
Example 161.2 verifies one instance by hand. A proof must cover every closed term at once, and every closed term arises by applying the constants of Σ to arguments that are themselves not closed: the body of a 𝗅𝖺𝗆 has a free variable, and the motive of an 𝗂𝖿 is a function.
What the external computability predicate must carry
Tait’s construction assigns to each type a predicate on its terms. For the signature Σ the intended clauses are the following two, in which C𝐴 denotes a predicate on closed terms of type 𝗍𝗆(𝐴): C𝖻𝗈𝗈𝗅(𝑏)iff𝑏=𝗍𝗋𝗎𝖾or𝑏=𝖿𝖺𝗅𝗌𝖾,C𝗉𝗂𝐴𝐵(𝑒)iffforeveryclosed𝑎withC𝐴(𝑎),C𝐵𝑎(𝖺𝗉𝗉𝑒𝑎). Clause (161.2) refers to C𝐵𝑎. In definition 161.1 the second argument of 𝗉𝗂 is a function 𝐵:𝗍𝗆(𝐴)→𝗍𝗉, so 𝐵𝑎 is the value of a function at an argument. It is therefore not a subterm of 𝗉𝗂𝐴𝐵, and the pair of clauses is not a definition by structural recursion on the first index.
The failure is not repaired by choosing a different measure. Take 𝐴:=𝖻𝗈𝗈𝗅 and let 𝐵 be any function 𝗍𝗆(𝖻𝗈𝗈𝗅)→𝗍𝗉 of the metalanguage. Nothing in Σ constrains the values of 𝐵 beyond their type, so the family of types {𝐵𝑎} appearing in clause (161.2) is not generated by a smaller instance of the same grammar. In this presentation 𝗍𝗉 is a constant of the signature and carries no induction principle at all: there is no case analysis on a type, and hence no recursion on one.
A recursion is still available, but not on types: it is the recursion that constructs the theory freely generated by Σ, and it lives outside the theory. Section 161.8 performs exactly that outside step once, for all signatures at once, by asking for a structure-preserving functor out of the syntactic category. Everything between here and there is carried out inside a metalanguage, where no such recursion is needed.
A second obligation appears as soon as open terms are admitted, and they must be admitted, because clause (161.2) is used to type the body of a 𝗅𝖺𝗆. Indexing the predicate by a context Δ turns each clause into a family CΔ𝐴, and each family must be stable under renaming: for every renaming 𝜌 from Δ′ to Δ, CΔ𝐴(𝑎)impliesCΔ′𝐴[𝜌](𝑎[𝜌]). Obligation (161.3) is discharged separately for every clause of the definition, and again for every lemma proved about the clauses. It is bookkeeping in the exact sense that it never selects between two mathematical possibilities; it only records that a construction was uniform in the context.
Both obligations are removed by the same change of ambient setting. Work in a category whose objects already are context-indexed families and whose maps already are the natural ones, so that (161.3) holds by construction; and describe the predicate not by recursion on syntax but as a type in the internal language of that category, so that the missing recursion in (161.2) is never attempted. The rest of the chapter constructs that category and that internal language.
Let T be the category freely generated by Σ in the sense of definition 161.1: its objects are the closed types built from the constants, its maps are equivalence classes of terms modulo the four equations, and it has finite limits and dependent products. Write y:T→[Top,𝐒𝐞𝐭] for the Yoneda embedding and pt:[Top,𝐒𝐞𝐭]→𝐒𝐞𝐭,pt(𝑋):=Nat(y(1T),𝑋) for the global-sections functor, which sends a presheaf to the set of its maps out of the presheaf represented by the terminal object. Since Yoneda preserves limits, y(1T) is the terminal presheaf, so pt(𝑋) is the set 𝑋(1T) of elements of 𝑋 at the empty context.
Contexts of the object theory index the presheaves, and a map of presheaves is a family of functions commuting with reindexing. Obligation (161.3) is the commutation requirement, and it is part of what it means to be a map in [Top,𝐒𝐞𝐭].
The gluing categoryG has as objects the triples (𝑆,𝑋,𝑓) with 𝑆 a set, 𝑋 a presheaf on T, and 𝑓:𝑆⟶pt(𝑋) a function; a map (𝑆,𝑋,𝑓)→(𝑆′,𝑋′,𝑓′) is a pair (ℎ,𝑡) with ℎ:𝑆⟶𝑆′ and 𝑡:𝑋⇒𝑋′ such that pt(𝑡)∘𝑓=𝑓′∘ℎ. The syntactic projection is 𝜋:G→[Top,𝐒𝐞𝐭],𝜋(𝑆,𝑋,𝑓):=𝑋,𝜋(ℎ,𝑡):=𝑡.
An object (𝑆,y(𝐵),𝑓) is to be read as a proof-relevant predicate on the closed terms of type 𝐵: the set 𝑆 is the collection of witnesses and 𝑓 records, for each witness, the term it is a witness for. The set 𝑆𝑏:=𝑓−1(𝑏) is the set of witnesses at the closed term 𝑏.
Let 𝐵:=𝖻𝗈𝗈𝗅 and consider 𝖡𝖮𝖮𝖫G:=({0,1},y(𝖻𝗈𝗈𝗅),𝑓),𝑓(0)=y(𝖿𝖺𝗅𝗌𝖾),𝑓(1)=y(𝗍𝗋𝗎𝖾). Its witness set at a closed term 𝑏 is a singleton when 𝑏=𝗍𝗋𝗎𝖾 or 𝑏=𝖿𝖺𝗅𝗌𝖾 and is empty otherwise. A map 1G→𝖡𝖮𝖮𝖫G whose presheaf component is y(𝑏) therefore exists exactly when 𝑏 is one of the two constructors.
Example 161.7 already contains the shape of the canonicity argument: if every closed term 𝑏 receives such a map, canonicity follows. The work is to produce those maps uniformly, and that is done by interpreting the whole signature in G so that the interpretation of a term is a map whose presheaf component is that very term.
An interpretation of Σ in G is phase separated when it assigns to each constant an element of G whose image under 𝜋 is the corresponding presheaf built from y, and to each equation of Σ an equation in G. In this situation 𝜋 maps the interpretation of a term back to that term.
The condition “𝜋 of the semantic object is the syntactic object” is a strict equation between objects, not an isomorphism. Keeping it strict is the single hardest requirement in the construction, and section 161.5 is devoted to the axiom that makes it available.
The synthetic phase distinction
The internal language of G is a dependent type theory with extensional equality types, dependent sums and products, coproducts, quotients, and a hierarchy of universes. All constructions below are written in that language; what makes them into gluing constructions is one additional constant.
Throughout section 161.4–section 161.7 we reason in an extensional dependent type theory with a cumulative hierarchy of universes U0,U1,…, in which propositional and judgmental equality coincide, so that an inhabitant of 𝑎=𝑏 licenses the replacement of 𝑎 by 𝑏 in any type. We write U for an unspecified member of the hierarchy. A type 𝑃 is a proposition when any two of its elements are equal.
Fix a proposition 𝗌𝗒𝗇:U. The open modality and closed modality associated with 𝗌𝗒𝗇 are #𝐴:=𝗌𝗒𝗇→𝐴,∙𝐴:=𝗌𝗒𝗇∨𝐴, where the join 𝗌𝗒𝗇∨𝐴 is the quotient inductive type with constructors 𝜂:𝐴→∙𝐴,⋆:𝗌𝗒𝗇→∙𝐴,law:(𝑎:𝐴)(𝑧:𝗌𝗒𝗇)→𝜂𝑎=⋆𝑧. Their units are 𝜂#:=𝜆𝑎.𝜆𝑧.𝑎:𝐴→#𝐴 and 𝜂:𝐴→∙𝐴. The symbol # marks the syntactic part throughout, and the filled dot marks the semantic part.
The three constructors say exactly this: ∙𝐴 contains a copy of 𝐴, it contains a point supplied by the syntactic phase, and under the syntactic phase these two are identified. The third clause is the whole content of the definition and is used in every proof below.
Proof of Lemma 161.11 — The modalities are idempotent monads
Proof. For #: the action on maps is #𝑔:=𝜆𝑢.𝜆𝑧.𝑔(𝑢𝑧), and the double application unfolds to ##𝐴=𝗌𝗒𝗇→𝗌𝗒𝗇→𝐴. Define 𝜇:=𝜆𝑤.𝜆𝑧.𝑤𝑧𝑧. The two round trips are 𝜇(𝜂#𝑢)𝑑𝑒𝑓.=𝜆𝑧.𝑢𝑧𝑓𝑢𝑛𝑒𝑥𝑡=𝑢,𝜂#(𝜇𝑤)𝑑𝑒𝑓.=𝜆𝑧.𝜆𝑧′.𝑤𝑧𝑧𝑧=𝑧′=𝑤, the second because 𝗌𝗒𝗇 is a proposition, so its two proofs 𝑧 and 𝑧′ are equal. The monad laws are the corresponding two calculations.
For ∙: the functorial action is defined on constructors by ∙𝑔(𝜂𝑎):=𝜂(𝑔𝑎) and ∙𝑔(⋆𝑧):=⋆𝑧, which respects law because both sides are identified under 𝗌𝗒𝗇. For idempotence, define 𝜈:∙∙𝐴→∙𝐴 by 𝜈(𝜂𝑥):=𝑥 and 𝜈(⋆𝑧):=⋆𝑧; this respects law because law𝑥𝑧 maps to 𝑥=⋆𝑧, which is an instance of law in ∙𝐴 when 𝑥=𝜂𝑎 and is law-reflexivity when 𝑥=⋆𝑧′, using that 𝗌𝗒𝗇 is a proposition. Then 𝜈∘𝜂=id by the first clause, and 𝜂∘𝜈=id by the eliminator’s uniqueness clause on the two constructors. ◻
Proof. Suppose #𝐵 is contractible with centre 𝑐. Define 𝑟:∙𝐵→𝐵 by 𝑟(𝜂𝑏):=𝑏 and 𝑟(⋆𝑧):=𝑐𝑧; the clause for law requires 𝑏=𝑐𝑧 for 𝑧:𝗌𝗒𝗇, and under 𝑧 the two elements 𝜂#𝑏 and 𝑐 of #𝐵 are equal by contractibility, so their values at 𝑧 agree. Then 𝑟∘𝜂=id by the first clause and 𝜂∘𝑟=id by the eliminator’s uniqueness clause.
Conversely, suppose 𝜂 is an isomorphism with inverse 𝑟. Under 𝑧:𝗌𝗒𝗇 every element of ∙𝐵 equals ⋆𝑧 by law, so ∙𝐵 is contractible under 𝑧; transporting along the isomorphism, 𝐵 is contractible under 𝑧, which is the statement that #𝐵 is contractible. ◻
For every 𝐴 the type ∙𝐴 is closed-modal, by lemma 161.11. The unit type 𝟏 is closed-modal, since #𝟏 is contractible. The type 𝗍𝗆(𝖻𝗈𝗈𝗅) of the signature is not closed-modal: under 𝗌𝗒𝗇 it retains 𝗍𝗋𝗎𝖾 and 𝖿𝖺𝗅𝗌𝖾 as distinct elements, so # of it is not contractible. That failure is what the closed modality repairs in section 161.7.
Interpret 𝗌𝗒𝗇 in G as the subterminal object (∅,y(1T),!). Then for every object 𝑇=(𝑆,𝑋,𝑓), #𝑇=(pt(𝑋),𝑋,id),∙𝑇=(𝑆,y(1T),!). Moreover 𝜂#:𝑇→#𝑇 is the map (𝑓,id𝑋) and 𝜂:𝑇→∙𝑇 is the map (id𝑆,!).
Proof of Lemma 161.15 — Computation of the modalities in G
Proof. The open modality is the exponential 𝗌𝗒𝗇→(−) in G. In a comma category over a limit-preserving functor, the exponential by a subterminal object with empty set component has set component pt(𝑋): a map (𝑆′,𝑋′,𝑓′)→#𝑇 is a map (𝑆′,𝑋′,𝑓′)×𝗌𝗒𝗇→𝑇, and (𝑆′,𝑋′,𝑓′)×𝗌𝗒𝗇=(∅,𝑋′,!), so such a map is just a presheaf map 𝑋′→𝑋; that is exactly a map into (pt(𝑋),𝑋,id). Its unit is the identity on presheaves and 𝑓 on sets.
For the closed modality, ∙𝑇 is the pushout of the two projections of 𝗌𝗒𝗇×𝑇=(∅,𝑋,!). Colimits in G are computed by taking the colimit of the set components and the colimit of the presheaf components and inducing the structure map, so the set component is the pushout of ∅←∅→𝑆, namely 𝑆, and the presheaf component is the pushout of y(1T)←𝑋→y(1T) along the two terminal maps, namely y(1T). The structure map is the unique one into pt(y(1T))=1. ◻
Proof. Commutation is the naturality of 𝜂 at 𝜂#. For the pullback property, compute both sides in G using lemma 161.15 at 𝑇=(𝑆,𝑋,𝑓): #𝑇=(pt(𝑋),𝑋,id),∙𝑇=(𝑆,y(1T),!),∙#𝑇=(pt(𝑋),y(1T),!). The map 𝜂:#𝑇→∙#𝑇 has set component the identity on pt(𝑋), and the map ∙𝜂#:∙𝑇→∙#𝑇 has set component 𝑓:𝑆⟶pt(𝑋), because ∙ leaves set components unchanged and 𝜂# has set component 𝑓. Limits in G are computed componentwise, since pt preserves them. The set component of the pullback is therefore pt(𝑋)×pt(𝑋)𝑆=𝑆 along (id,𝑓), and the presheaf component is 𝑋×y(1T)y(1T)=𝑋. The induced structure map is 𝑓. Hence the pullback is (𝑆,𝑋,𝑓)=𝑇, and the comparison map is the identity. ◻
The fracture theorem is the exact sense in which nothing is lost by working with the two modalities instead of with the triples: a type is determined by its syntactic part, its semantic part, and the way the second sits over the first. Every definition in section 161.7 is given by specifying those three data.
★☆☆ Show that open-modal types are closed under dependent products and dependent sums, and that closed-modal types are closed under dependent products. For each closure, name the clause of definition 161.10 used. Then give a closed-modal type whose dependent sum with a non-closed-modal family is not closed-modal.
★★☆ Take 𝑇:=𝗍𝗆(𝖻𝗈𝗈𝗅) in G, interpreted as (∅,y(𝖻𝗈𝗈𝗅),!). Compute #𝑇, ∙𝑇 and ∙#𝑇 by lemma 161.15, verify the pullback of theorem 161.16 in this instance by exhibiting the two projections, and state which of the three objects is the proof-relevant predicate of example 161.7.
Let 𝐴:U and let 𝜑 be a proposition. The partial element type is {𝜑}𝐴:=𝜑→𝐴, and for 𝑎:{𝜑}𝐴 the extent type is {𝐴∣𝜑↪𝑎}:={𝑎′:𝐴∣∀𝑧:𝜑.𝑎′=𝑎𝑧}, the subtype of 𝐴 spanned by the elements that agree with 𝑎 under 𝜑. The inclusion {𝐴∣𝜑↪𝑎}→𝐴 is left implicit: if 𝑎′:{𝐴∣𝜑↪𝑎} then 𝑎′:𝐴, and conversely an element 𝑎′:𝐴 with #(𝑎′=𝑎) inhabits the extent type.
For 𝜑:=𝗌𝗒𝗇 the extent type is the internal form of the strictness condition of definition 161.8: an element of {𝐴∣𝗌𝗒𝗇↪𝑎} is a semantic object that is, under the syntactic phase, the prescribed syntactic object.
Proof. By lemma 161.13 it suffices to show that #{𝐴∣𝗌𝗒𝗇↪𝑎} is contractible. Assume 𝑧:𝗌𝗒𝗇. Then every element 𝑎′ of the extent type satisfies 𝑎′=𝑎𝑧 by definition 161.17, so the type has the element 𝑎𝑧 and all its elements are equal to 𝑎𝑧. Hence under 𝗌𝗒𝗇 it is contractible, which is the required statement. ◻
The strictness required in definition 161.8 does not follow from the constructions so far. Given a syntactic type 𝐴 and a semantic predicate on it, dependent sums produce a type that is isomorphic to 𝐴 under 𝗌𝗒𝗇, not equal to it. The next definition is the axiom that converts such an isomorphism into an equation.
For 𝐴:U write Iso(𝐴):=∑𝐵:U(𝐵≅𝐴) for the type of U-small types equipped with an isomorphism to 𝐴. Let 𝑃 be a collection of propositions. A realignment structure for U with respect to 𝑃 is an element of ∏𝐴:U∏𝜑:𝑃∏𝐵:[𝜑]→Iso(𝐴)∑𝐴0:Iso(𝐴)(∀𝑧:𝜑.𝐴0=𝐵𝑧), where [𝜑] is the type of proofs of 𝜑. A universe carrying such a structure is called strong.
Read the type in definition 161.19 as an instruction: given a type 𝐴, a proposition 𝜑, and a partially defined isomorph 𝐵 of 𝐴 available under 𝜑, produce a single isomorph 𝐴0 of 𝐴 that is equal to 𝐵 wherever 𝐵 is defined. The conclusion is an equality of elements of Iso(𝐴), so both the type and its isomorphism are pinned down.
For 𝐴:U, 𝜑:𝑃 and 𝐵:[𝜑]→Iso(𝐴) we write realign[𝐴∣𝜑↪𝐵]:U for the first component produced by definition 161.19, so that 𝑧:[𝜑]⊢realign[𝐴∣𝜑↪𝐵]=𝗉𝗋1(𝐵𝑧):U, and we treat the accompanying isomorphism realign[𝐴∣𝜑↪𝐵]≅𝐴 as an implicit coercion in both directions.
Definition 161.8 requires 𝜋 of the interpretation of 𝖻𝗈𝗈𝗅 to be y(𝖻𝗈𝗈𝗅) on the nose. Suppose only an isomorphism 𝜋(𝖡𝖮𝖮𝖫)≅y(𝖻𝗈𝗈𝗅) were available. The interpretation of 𝗂𝖿 has the type 𝗍𝗆(𝐶𝑏), in which 𝑏 occurs inside the motive; replacing 𝖡𝖮𝖮𝖫 by an isomorphic copy changes the type of the eliminator, and the two copies must then be related by a coercion at every use. Composing those coercions across the 𝗉𝗂𝛽 and 𝗂𝖿𝛽 equations produces coherence obligations of exactly the kind that (161.3) produced externally. Realignment removes them by making one representative of the isomorphism class equal to the prescribed syntactic object.
Assume U is strong with respect to a collection containing 𝗌𝗒𝗇. Then there are universes U𝗌𝗒𝗇:=realign[{𝗌𝗒𝗇}U∣𝗌𝗒𝗇↪(U,𝜆𝐴.𝜆𝑧.𝐴)],U∙:=realign[{U∣𝗌𝗒𝗇↪𝟏}∣𝗌𝗒𝗇↪(𝟏,𝜆_.∗)] whose elements are exactly the open-modal and the closed-modal types respectively, and for which 𝑧:𝗌𝗒𝗇⊢U𝗌𝗒𝗇=U and 𝑧:𝗌𝗒𝗇⊢U∙=𝟏.
Proof of Lemma 161.22 — Open and closed subuniverses
Proof. Both displayed expressions are instances of convention 161.20, so the two equations under 𝗌𝗒𝗇 hold by the defining equation of realign. For the characterization of elements: an element of {𝗌𝗒𝗇}U is a type defined only under 𝗌𝗒𝗇, and composing with the realignment isomorphism sends 𝐴:U to 𝜆𝑧.𝐴, whose image is open-modal because #𝐴=𝗌𝗒𝗇→𝐴 and the unit is inverted by evaluation; conversely an open-modal 𝐴 equals #𝐴, which is in the image. For the closed subuniverse, an element of {U∣𝗌𝗒𝗇↪𝟏} is a type equal to 𝟏 under 𝗌𝗒𝗇, and by lemma 161.13 that is exactly the condition to be closed-modal. ◻
★★☆ Let 𝐴:U, let 𝜑 be a proposition, and let 𝐵:[𝜑]→Iso(𝐴). Prove that realign[𝐴∣⊥↪𝐵] is isomorphic to 𝐴 and that realign[𝐴∣⊤↪𝐵] equals 𝗉𝗋1(𝐵∗). State which clause of definition 161.19 each half uses, and explain in one sentence why the second is an equation while the first is only an isomorphism.
Realignment is a statement about universes. The construction it is used for is always the same, and it is worth isolating as a type former so that it need not be re-derived at each constant of the signature.
Let 𝐴:𝗌𝗒𝗇→U be a syntactic type family defined under the syntactic phase, and let 𝐵:((𝑧:𝗌𝗒𝗇)→𝐴𝑧)→U be a family of closed-modal types, so that #𝐵(𝑥) is contractible for every 𝑥. The strict glue type(𝑥:𝐴)⋉𝐵(𝑥) is the type with the rules displayed below, in which 𝜋∘ projects the syntactic component and 𝜋∙ the semantic one.
The two rules Glue-Syn and Glue-Elt-Syn are the reason for the whole construction: under the syntactic phase the glue type collapses to its syntactic component and a glued element collapses to its syntactic part. In the notation of definition 161.17 these say #((𝑥:𝐴)⋉𝐵(𝑥)=𝐴)and#([𝗌𝗒𝗇↪𝑎∣𝑏]=𝑎).
Assume U is strong with respect to a collection containing 𝗌𝗒𝗇. Then the rules of definition 161.23 are derivable, with (𝑥:𝐴)⋉𝐵(𝑥):=realign[Σ∣𝗌𝗒𝗇↪(𝐴,𝜄)],Σ:=∑𝑥:(𝑧:𝗌𝗒𝗇)→𝐴𝑧𝐵(𝑥), where 𝜄 is the isomorphism Σ≅𝐴𝑧 available under 𝑧:𝗌𝗒𝗇.
Proof of Proposition 161.24 — Glue types from realignment
Proof. The only step needing an argument is the existence of 𝜄; the rest is the reading of convention 161.20.
Assume 𝑧:𝗌𝗒𝗇. Then (𝑧′:𝗌𝗒𝗇)→𝐴𝑧′ is isomorphic to 𝐴𝑧 by evaluation at 𝑧, with inverse 𝜆𝑎.𝜆𝑧′.𝑎; these are mutually inverse because 𝗌𝗒𝗇 is a proposition, so 𝑧′=𝑧 and the two round trips are the identity. For the second component, the hypothesis of Glue-F gives #𝐵(𝑥)≅𝟏, and evaluating that isomorphism at 𝑧 shows that 𝐵(𝑥) is contractible; hence the projection Σ→(𝑧′:𝗌𝗒𝗇)→𝐴𝑧′ is an isomorphism under 𝑧. Composing the two gives 𝜄:Σ≅𝐴𝑧.
Now convention 161.20 supplies a type equal to 𝐴𝑧 under 𝗌𝗒𝗇 and isomorphic to Σ; that equation is Glue-Syn. Transporting the introduction, projections, computation, and uniqueness rules of Σ across the realignment isomorphism gives Glue-I, Glue-E, Glue-C, and Glue-U. Finally, under 𝑧:𝗌𝗒𝗇 the isomorphism 𝜄 sends a pair to the evaluation of its first component, so (𝜋∘𝑔)𝑧=𝑔, which is Glue-Elt-Syn. ◻
Let 𝐴 be open-modal with interpretation (pt(𝑋),𝑋,id) and let 𝐵 be a closed-modal family whose value at 𝑎∈pt(𝑋) has set component 𝐵𝑎. Then (𝑥:𝐴)⋉𝐵(𝑥)isinterpretedby(∐𝑎∈pt(𝑋)𝐵𝑎,𝑋,𝗉𝗋1).
Proof of Lemma 161.25 — Interpretation of the glue type in G
Proof. By proposition 161.24 the glue type is a realignment of Σ, and realignment changes an object only within its isomorphism class, so it suffices to compute Σ. A closed-modal family has presheaf component y(1T) at each index by lemma 161.15, so the dependent sum has presheaf component 𝑋 and set component the disjoint union of the fibres, with the first projection as structure map. ◻
★★☆ The formation rule Glue-F has two hypotheses beyond well-formedness: 𝐴 is defined only under 𝗌𝗒𝗇, and 𝐵 takes closed-modal values.
Drop the second hypothesis and take 𝐴:=𝜆𝑧.𝗍𝗆(𝖻𝗈𝗈𝗅) and 𝐵(𝑥):=(𝑥=𝗍𝗋𝗎𝖾)+(𝑥=𝖿𝖺𝗅𝗌𝖾). Exhibit a term 𝑥 for which #𝐵(𝑥) is empty, and conclude that Glue-Syn fails.
Drop the first hypothesis by taking 𝐴 to be a type defined outright rather than only under 𝗌𝗒𝗇, and show that #((𝑥:𝐴)⋉𝐵(𝑥)=𝐴) then asserts an equation between a dependent sum and its first component that has no proof.
The interpretation is now written as a list of definitions, one per constant of Σ. Each carries an extent type recording which syntactic constant it must restrict to under 𝗌𝗒𝗇; that extent condition is the internal form of definition 161.8. Constants of the signature are written in lower case and their semantic counterparts in capitals.
Read 𝖳𝖯 as follows: a semantic type is a syntactic type together with a semantic collection of its terms, and that collection must restrict to the syntactic term collection under 𝗌𝗒𝗇. Three checks make the definition well formed, and each uses one rule of definition 161.23.
The semantic component {U∣𝗌𝗒𝗇↪𝗍𝗆(𝐴)} is closed-modal by lemma 161.18, so Glue-F applies.
The extent condition #(𝖳𝖯=𝗍𝗉) holds by Glue-Syn.
The definition of 𝖳𝖬 is well typed because 𝜋∙𝐴 inhabits the semantic component of 𝖳𝖯 by Glue-E, and the extent condition #(𝖳𝖬=𝗍𝗆) holds because that component is an extent type over 𝗍𝗆(𝐴) and #(𝐴=𝜋∘𝐴) by Glue-Elt-Syn.
The inner glue type in 𝖡𝖮𝖮𝖫 is the semantic component supplied to the outer one. Its syntactic part is 𝗍𝗆(𝖻𝗈𝗈𝗅) and its semantic part is the closed modality applied to the disjunction that names a constructor. Three conditions must hold, and the third is the reason the closed modality appears.
#(𝖡𝖮𝖮𝖫=𝖻𝗈𝗈𝗅), which is Glue-Elt-Syn for the outer glue type.
The semantic component of 𝖡𝖮𝖮𝖫 restricts to 𝗍𝗆(𝖻𝗈𝗈𝗅) under 𝗌𝗒𝗇, as construction 161.26 demands. This is Glue-Syn for the inner glue type.
The family 𝑏↦∙((𝑏=𝗍𝗋𝗎𝖾)+(𝑏=𝖿𝖺𝗅𝗌𝖾)) takes closed-modal values, so that Glue-F applies to the inner glue type. This holds by lemma 161.11, since every type of the form ∙𝐶 is closed-modal.
Delete ∙ from construction 161.27 and the third condition fails. Under 𝗌𝗒𝗇 the variable 𝑏 ranges over all syntactic terms of type 𝗍𝗆(𝖻𝗈𝗈𝗅), including a term that is neither constructor: the free variable 𝑥 of the body of 𝗇𝖾𝗀 in example 161.2. For that 𝑏 the type (𝑏=𝗍𝗋𝗎𝖾)+(𝑏=𝖿𝖺𝗅𝗌𝖾) has no element, so #((𝑏=𝗍𝗋𝗎𝖾)+(𝑏=𝖿𝖺𝗅𝗌𝖾)) is empty rather than contractible, and Glue-F does not apply. Wrapping the disjunction in ∙ adds the point ⋆𝑧 under 𝗌𝗒𝗇 and identifies it with every other element, restoring contractibility without weakening the predicate outside the syntactic phase.
The three branches of construction 161.29 agree on the identifications imposed by law, so 𝖨𝖥 is a well-defined map out of the quotient inductive type ∙((𝑏=𝗍𝗋𝗎𝖾)+(𝑏=𝖿𝖺𝗅𝗌𝖾)), and it satisfies the stated extent condition.
Proof of Proposition 161.30 — The eliminator is well defined
Proof. By definition 161.10 the eliminator of ∙𝐶 requires, for each 𝑐:𝐶 and each 𝑧:𝗌𝗒𝗇, that the value at 𝜂𝑐 equal the value at ⋆𝑧.
First branch. Take 𝑐=𝗂𝗇𝗅(𝑝) with 𝑝:𝑏=𝗍𝗋𝗎𝖾. Under 𝑧:𝗌𝗒𝗇 the equality 𝑝 holds, so 𝑏=𝗍𝗋𝗎𝖾, and by equality reflection this is a judgmental equality. Therefore 𝗂𝖿𝐶𝑏𝑡𝑓𝑝=𝗂𝖿𝐶𝗍𝗋𝗎𝖾𝑡𝑓𝗂𝖿𝛽1=𝑡, which is the value assigned at 𝜂(𝗂𝗇𝗅(𝑝)).
Second branch. As in the first branch, with 𝗂𝗇𝗋 for 𝗂𝗇𝗅, 𝖿𝖺𝗅𝗌𝖾 for 𝗍𝗋𝗎𝖾, 𝗂𝖿𝛽2 for 𝗂𝖿𝛽1, and 𝑓 for 𝑡.
Extent condition. Under 𝗌𝗒𝗇 the element 𝜋∙𝑏 equals ⋆𝑧 by law, so the third branch is selected and 𝖨𝖥𝐶𝑏𝑡𝑓=𝗂𝖿𝐶𝑏𝑡𝑓, using Glue-Elt-Syn to identify 𝐶, 𝑏, 𝑡, 𝑓 with their syntactic parts. ◻
Proof of Proposition 161.32 — The product clauses are well typed
Proof.Formation. The semantic component of 𝖯𝖨𝐴𝐵 is an extent type, hence closed-modal by lemma 161.18, so Glue-F applies to the inner glue type. Its Glue-Syn equation gives #(𝖯𝖨𝐴𝐵=𝗉𝗂𝐴𝐵), which is the extent condition on 𝖯𝖨.
Introduction. For 𝖫𝖠𝖬𝑓 to be an application of Glue-I to the inner glue type, the second component 𝑓 must inhabit {(𝑎:𝖳𝖬(𝐴))→𝖳𝖬(𝐵𝑎)∣𝗌𝗒𝗇↪𝖺𝗉𝗉(𝗅𝖺𝗆𝑓)}, that is, 𝑓 must equal 𝖺𝗉𝗉(𝗅𝖺𝗆𝑓) under 𝗌𝗒𝗇. Under 𝑧:𝗌𝗒𝗇 we compute, for every 𝑎, 𝖺𝗉𝗉(𝗅𝖺𝗆𝑓)𝑎𝗉𝗂𝛽=𝑓𝑎, and function extensionality gives 𝖺𝗉𝗉(𝗅𝖺𝗆𝑓)=𝑓. The equation 𝗉𝗂𝛽 of definition 161.1 is used exactly here, and by equality reflection it is available as a judgmental equality during type checking.
Elimination.𝜋∙𝑒 inhabits the extent type displayed above by Glue-E, hence is a function (𝑎:𝖳𝖬(𝐴))→𝖳𝖬(𝐵𝑎); applying it to 𝑎 gives the required type. Under 𝗌𝗒𝗇 it equals 𝖺𝗉𝗉𝑒 by the extent condition, which is the extent condition on 𝖠𝖯𝖯.
★★☆ Write out the type of 𝖫𝖠𝖬𝑓 with every extent condition expanded, and mark the two places where the equation 𝗉𝗂𝛽 is used. Then state what goes wrong if 𝗉𝗂𝛽 is removed from definition 161.1: name the rule of definition 161.23 whose premise fails and give the type of the term that can no longer be formed.
★☆☆ Extend Σ with a constant 𝗎𝗇𝗂𝗍:𝗍𝗉, a constant 𝗍𝗋𝗂𝗏:𝗍𝗆(𝗎𝗇𝗂𝗍), and the equation 𝑎=𝗍𝗋𝗂𝗏 for every 𝑎:𝗍𝗆(𝗎𝗇𝗂𝗍). Give the semantic clauses 𝖴𝖭𝖨𝖳 and 𝖳𝖱𝖨𝖵 in the style of construction 161.27, and verify the three conditions. State which choice of semantic component makes the closed-modality hypothesis of Glue-F hold without an application of ∙.
The constructions of section 161.7 are definitions in the internal language of G. Canonicity is a statement about closed terms of T. One step joins the two, and it is the step named in remark 161.4: the recursion that builds T out of Σ.
Let T be the category freely generated by Σ as in definition 161.5, let G be its Artin gluing as in definition 161.6, and suppose an interpretation of every constant of Σ is given in the internal language of G such that 𝜋 of each interpreted constant is the presheaf generated by the corresponding constant of Σ, and every equation of Σ is validated. Then there is a functor 𝜄:T→G preserving finite limits and dependent products, sending each constant of Σ to its interpretation, and satisfying pt(𝜋(𝜄(𝑏)))=𝑏foreveryglobalelement𝑏ofT.
The statement imported is the categorical fundamental theorem of logical relations for Artin gluing, in the form used by Li, Yao and Harper, Mechanizing Synthetic Tait Computability in Istari, §1.1, together with the adequacy of the logical-framework presentation of a type theory by a free locally cartesian closed category, due to Gratzer and Sterling [LH26, Ste21]. What it supplies here is the single passage from internal definitions to closed terms. Everything else in this chapter is proved locally: the modal lemmas lemma 161.11, lemma 161.13, the fracture theorem theorem 161.16, the computation of the modalities and of the glue type inside Glemma 161.15, lemma 161.25, the derivation of the glue rules from realignment proposition 161.24, the well-typing of every clause of construction 161.26–construction 161.31, and the extraction below.
The interpreted Boolean type. By construction 161.27 the semantic component of 𝖡𝖮𝖮𝖫 is the glue type (𝑐:𝗍𝗆(𝖻𝗈𝗈𝗅))⋉∙((𝑐=𝗍𝗋𝗎𝖾)+(𝑐=𝖿𝖺𝗅𝗌𝖾)). Its base is open-modal, and ∙ leaves set components unchanged by lemma 161.15, so lemma 161.25 computes the interpretation of 𝖡𝖮𝖮𝖫 in G as (∐𝑐∈pt(y(𝖻𝗈𝗈𝗅))𝑆𝑐,y(𝖻𝗈𝗈𝗅),𝗉𝗋1),𝑆𝑐:=(𝑐=𝗍𝗋𝗎𝖾)+(𝑐=𝖿𝖺𝗅𝗌𝖾), where pt(y(𝖻𝗈𝗈𝗅)) is the set Nat(y(1T),y(𝖻𝗈𝗈𝗅)) of closed terms of type 𝗍𝗆(𝖻𝗈𝗈𝗅) modulo the equations of Σ, by definition 161.5. Thus 𝑆𝑐 has an element exactly when 𝑐=𝗍𝗋𝗎𝖾 or 𝑐=𝖿𝖺𝗅𝗌𝖾.
Extraction. Apply 𝜄 to the global element 𝑏:1T→𝖻𝗈𝗈𝗅. The result is a map 𝜄(𝑏):1G→𝜄(𝖻𝗈𝗈𝗅) in G; write it as a pair (ℎ,𝑡) as in definition 161.6. The set component ℎ:1⟶∐𝑐𝑆𝑐 selects an element of 𝑆𝑐0 for exactly one index 𝑐0. The commutation condition of definition 161.6 applied to (ℎ,𝑡) gives 𝑐0𝗉𝗋1∘ℎ=pt(𝑡)𝑡ℎ𝑒𝑜𝑟𝑒𝑚161.33=𝑏. Hence 𝑆𝑏 has an element, so 𝑏=𝗍𝗋𝗎𝖾 or 𝑏=𝖿𝖺𝗅𝗌𝖾. ◻
Theorem 161.34 is a canonicity theorem for the signature Σ. Four nearby statements are not consequences of it, and each fails for a different reason.
Normalization. Canonicity concerns closed terms of one base type. Normalization concerns open terms of every type and requires an interpretation in which types carry normal and neutral forms, not merely a predicate on closed terms. A normalization theorem proved by the method of this chapter, at a signature that includes modalities, is available: Gratzer, Normalization for multimodal type theory, proves in Theorem 6.4 that there is a function nfΓ(−,𝐴) from terms to normal forms with Γ⊢|nfΓ(𝑀,𝐴)|=𝑀:𝐴 and with Γ⊢𝑀=𝑁:𝐴 implying nfΓ(𝑀,𝐴)=nfΓ(𝑁,𝐴); Corollary 6.6 derives decidability of conversion from decidability of the mode theory, and Corollary 6.11 recovers Boolean canonicity. That theorem is stated for multimodal type theory at its own signature, and is not proved here.
Other phase distinctions. The proposition 𝗌𝗒𝗇 of definition 161.10 separates syntax from semantics. It is not the strict/fibrant distinction of two-level type theory, whose two layers are two notions of equality on the same terms; it is not a parameter/state distinction, whose two layers are two run-times; it is not an erasure annotation, whose content is a usage discipline on variables; and it is not a stage separation, whose content is a temporal order on evaluation. What distinguishes 𝗌𝗒𝗇 from all four is that it is an ordinary proposition of the ambient theory, so that the two “layers” are the two subtopoi it cuts out, and the fracture theorem theorem 161.16 reassembles them.
Mechanization. Li, Yao and Harper check the constructions of construction 161.26–construction 161.31 in Istari, an extensional proof assistant with equality reflection; their development also treats a cost-aware framework. A successful check establishes the archived theories at their recorded signatures. It does not establish theorem 161.33, which is the step performed outside the internal language, and it is not a verified kernel.
Arbitrary signatures. Nothing above depends on the particular constants of Σ except construction 161.27–construction 161.31. Section 161.4–Section 161.6 are stated for an arbitrary proposition and an arbitrary strong universe. But a new type former requires a new semantic clause and a new verification of the three conditions, and a former whose semantic component cannot be made closed-modal has no clause of this shape at all. Exercise 161.4 is the smallest instance of that failure.
Set the external Kripke argument of section 161.2 beside the construction just completed.
The context index Δ of CΔ𝐴 becomes the presheaf structure of an object of G (definition 161.6); nothing in the internal language mentions it.
The renaming obligation (161.3) becomes the requirement that a definition be written in the internal language at all, since every such definition denotes a map of G.
The clause (161.1) becomes the semantic component of construction 161.27; the closed modality that appears there has no external counterpart, because externally the predicate is stated only for closed terms, where the missing case of remark 161.28 does not arise.
The clause (161.2) becomes the semantic component of construction 161.31. Its self-reference at 𝐵𝑎, which blocked the external recursion, is now an ordinary dependent function type over 𝖳𝖯, and 𝖳𝖯 is a glue type rather than an inductively generated set of codes.
The external requirement that the predicate be preserved by the eliminators becomes the extent conditions, and each is discharged by one rule of definition 161.23.
The external step that concludes canonicity from the fundamental lemma becomes theorem 161.33 together with the extraction in theorem 161.34.
The one item with no external counterpart is realignment definition 161.19: externally, the predicate is defined at a syntactic type, so strictness is automatic; internally, the predicate is a type in its own right, and strictness must be asserted.
★★☆ Extend Σ with 𝗇𝖺𝗍:𝗍𝗉, 𝗓𝖾𝗋𝗈:𝗍𝗆(𝗇𝖺𝗍), 𝗌𝗎𝖼𝖼:𝗍𝗆(𝗇𝖺𝗍)→𝗍𝗆(𝗇𝖺𝗍), and the dependent recursor with its two computation equations. Give the semantic clauses 𝖭𝖠𝖳, 𝖹𝖤𝖱𝖮, 𝖲𝖴𝖢𝖢, 𝖱𝖤𝖢 in the style of construction 161.27–construction 161.29, taking as semantic component of 𝖭𝖠𝖳 the closed modality applied to the type of witnesses that a term equals a numeral. Verify the three conditions of construction 161.27 for 𝖭𝖠𝖳, and verify that the branches of 𝖱𝖤𝖢 agree on law in the manner of proposition 161.30. State precisely where the semantic component requires an inductively defined witness type and why the closed modality does not remove that requirement.
★★★Theorem 161.16 was proved by computing in G. Give a second proof entirely in the internal language, as follows.
Construct the comparison map 𝑇→∑𝑥:#𝑇{𝑦:∙𝑇∣∙𝜂#(𝑦)=𝜂(𝑥)} from the two units.
Construct an inverse using the eliminator of ∙ from definition 161.10, and state the exact instance of law needed to see that the two branches agree.
Check both round trips, naming at each step whether the equation used is law, function extensionality, or the fact that 𝗌𝗒𝗇 is a proposition.
Show that the statement fails if 𝗌𝗒𝗇 is not assumed to be a proposition, by exhibiting a two-element 𝗌𝗒𝗇 and a type 𝑇 for which the comparison map is not injective.
★★★ Replace realignment by the weaker assumption that (𝑥:𝐴)⋉𝐵(𝑥) is merely isomorphic to 𝐴 under 𝗌𝗒𝗇, and attempt to repeat section 161.7.
Show that 𝖳𝖯 and 𝖳𝖬 can still be defined, with the extent conditions replaced by isomorphisms.
Write out the type of 𝖨𝖥 under this weakening, inserting the coercions that the motive now requires, and display the coherence equation between two coercions that proposition 161.30 would need.
Identify which step of theorem 161.34 then fails, and state what would have to be proved instead.
★★★ Replace the single proposition 𝗌𝗒𝗇 by two propositions 𝗌𝗒𝗇L and 𝗌𝗒𝗇R whose conjunction is false, and write 𝗌𝗒𝗇LR:=𝗌𝗒𝗇L∨𝗌𝗒𝗇R. For 𝑞 ranging over the three propositions define #𝑞 and ∙𝑞 as in definition 161.10.
Given 𝐴L open-modal for 𝗌𝗒𝗇L, 𝐴R open-modal for 𝗌𝗒𝗇R, and a family 𝑆:𝐴L×𝐴R→U with 𝗌𝗒𝗇LR-closed-modal values, construct a type ̃𝑆 with #L(̃𝑆≅𝐴L) and #R(̃𝑆≅𝐴R).
State the fracture theorem for 𝗌𝗒𝗇LR and say what it asserts about a type in this setting.
Explain in one sentence why this configuration expresses a binary relation, and name the theorem of chapter 6 whose statement it internalizes.
★★★Practical project.stc-canonicity-witness Implement, in Agda, the analytic counterpart of construction 161.26–construction 161.31 for the signature Σ of definition 161.1, and use it to compute canonicity witnesses.
Calculus to implement. Represent the object theory of definition 161.1 as an intrinsically typed syntax: an inductive type of object types, an inductive family of object terms indexed by a context and a type, and de Bruijn indices with capture-avoiding simultaneous substitution. Include 𝖻𝗈𝗈𝗅 with both constructors and the dependent eliminator, and dependent products with 𝗅𝖺𝗆 and 𝖺𝗉𝗉. Define a proof-relevant computability family: at 𝖻𝗈𝗈𝗅, the type of witnesses that a closed term equals a constructor; at a product, the dependent function type of (161.2), indexed by a context and closed under renaming.
Invariant. The computability family must be indexed by a context and must come with an explicit renaming action satisfying (161.3); every clause of the fundamental lemma must be given that action, and the action must be checked to commute with the eliminators. This is the bookkeeping that remark 161.36, item 2, records as absent from the synthetic proof; the program must contain it in full.
Concrete result. A function that, given a closed term of Boolean type, returns the constructor it equals together with the witness produced by the fundamental lemma.
Acceptance test. Run the function on the following named inputs and compare against the stated outcomes: 𝗍𝗋𝗎𝖾 and 𝖿𝖺𝗅𝗌𝖾 return themselves with the injection witnesses of construction 161.27; the term 𝑏0 of example 161.2 returns 𝖿𝖺𝗅𝗌𝖾 with the right injection, as computed in example 161.35; the term 𝖺𝗉𝗉𝗇𝖾𝗀(𝖺𝗉𝗉𝗇𝖾𝗀𝗍𝗋𝗎𝖾) returns 𝗍𝗋𝗎𝖾; the term 𝖺𝗉𝗉(𝗅𝖺𝗆(𝜆𝑥.𝑥))𝖿𝖺𝗅𝗌𝖾 returns 𝖿𝖺𝗅𝗌𝖾; and the open term 𝑥 in the context 𝑥:𝖻𝗈𝗈𝗅 is rejected by the type of the function, which accepts closed terms only. In addition, produce three mutations that still typecheck — delete the renaming action from the product clause, replace the product clause by a non-dependent one, and replace the Boolean witness type by the unit type — and check that each makes some named case fail. Finally, state explicitly that the program illustrates theorem 161.34 and does not prove it: the program establishes the theorem for the finitely many named inputs, whereas the theorem quantifies over all closed terms.