Section 1: Equivalence of the two UIP formulations
ProvedHofmannStreicher1994.uip_formulations_iffFor every expression that is a well-formed type in the empty context, the following are equivalent in the specified object theory:
- There is a derivable term of in context .
- There is a derivable term of in context .
The source attributes this equivalence to the identity eliminator . The unused in the first context is preserved. The theorem assumes only closed formation of .
import Definitions.Def_HofmannStreicher1994_Syntax
namespace HofmannStreicher1994
theorem uip_formulations_iff (A : Expr) (hA : TypeWf [] A) :
(∃ t, TermWf (diagonalContext A) t (diagonalConclusion A)) ↔
(∃ t, TermWf (uipContext A) t (uipConclusion A)) := by sorry
end HofmannStreicher1994Read-back
What the Lean code literally says, in plain math · GPT-6 (Codex independent blind auditor)
For every raw syntactic expression , and every derivation that is a well-formed type in the empty context, the following two assertions are equivalent: there exists a raw syntactic expression for which the typing judgment is derivable; and there exists a raw syntactic expression for which the typing judgment is derivable. The two existential witnesses are separate and need not be the same expression. In the first assertion, the declaration of is present even though does not occur in the displayed conclusion; the witness may use . All displayed context entries are local syntactic variable declarations, written from oldest to newest, rather than quantification over elements of a semantic interpretation. The expression language consists of variables indexed by natural numbers; dependent function types, dependent pair types, identity types, natural numbers, a universe, and decoding a universe expression into a type; annotated lambda abstractions, function applications, pairs, dependent pair eliminators, reflexivity expressions, identity eliminators, zero, successors, and natural-number eliminators. Here denotes the raw identity-type constructor applied to the three expressions , and denotes the raw reflexivity constructor. Contexts are lists of expressions with the newest declaration first in their actual representation; variable index refers to the newest declaration. Thus, in the first displayed context, indices refer respectively to , while in the second they refer respectively to at indices . Copies of have their free indices shifted, with bound indices preserved: in the first context the types of and use shifts by and , and its conclusion uses a shift by ; in the second context the types of , , and use shifts by , , and , and its conclusion uses a shift by . These shifts are part of the expressions in the statement, even though the named-variable notation suppresses them. Well-formedness and derivability here mean membership in the particular mutually inductively generated judgments for this syntax: the empty context is well formed, and a well-formed context can be extended by a type well formed in that context; dependent function and pair types are formed from a domain type and a codomain type in the extended context; an identity type is formed from a type and two terms of that type; natural numbers and the universe are types in any well-formed context; and an expression of universe type can be decoded into a type. Type well-formedness is also closed under a well-formed substitution and transport to an equal context. Term typing is generated by lookup of a declaration in a well-formed context, with its stored type shifted to the lookup context; dependent function abstraction and application; dependent pair introduction and elimination; reflexivity and identity elimination; zero, successor, and dependent natural-number elimination; conversion along the specified type-equality judgment; well-formed substitution; and transport to an equal context. Function application and the eliminators obtain their result types by capture-avoiding substitution into the codomain or motive. Pair elimination uses a motive over a pair and a branch over its two components; identity elimination uses a motive over two endpoints and their identity proof and a branch at equal endpoints with reflexivity; natural-number elimination uses a motive over a natural number, a branch at zero, and a branch over a natural number together with the preceding result. The type- and term-equality judgments supporting these rules are generated by typed reflexivity, symmetry, transitivity, and congruence: type congruence covers dependent function types, dependent pair types, identity types, and decoding; term congruence covers abstraction, application, pairs, pair elimination, reflexivity, identity elimination, successor, and natural-number elimination. Term equality also allows conversion along type equality. Its computation rules identify application of a lambda with substitution into its body, pair elimination on an introduced pair with substitution of its components into the branch, identity elimination at reflexivity with substitution of the endpoint into its branch, natural-number elimination at zero with its zero branch, and natural-number elimination at a successor with its successor branch instantiated by the predecessor and its recursively obtained result; it additionally identifies the function with . Both equality judgments are closed under well-formed substitution and transport to equal contexts; substituting equal substitutions into a well-formed type or a well-typed term also generates the corresponding equality judgment. A substitution from a source context to a target context is well formed when both contexts are well formed and, for every stored source declaration at index , its image is a target-context term of the type obtained by first shifting that declaration's stored type by and then applying the substitution. Two substitutions are equal when each is well formed and their images at every source declaration are equal terms at the type obtained using the first substitution. Context equality is generated by equality of empty contexts and extension of equal context tails by types equal in the first tail. These are syntactic derivability assertions for each satisfying the given empty-context well-formedness hypothesis; the conclusion asserts neither uniqueness of either syntactic witness nor an equality between the two witnesses.
Literal code issues. The theorem's supplied proof is the placeholder "by sorry". This read-back records its stated proposition, not a checked proof. Only the supplied declaration, its supplied syntax dependency, and the specified auditor instructions informed this read-back; no elaboration or build was run.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.