Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Section 3: The explicit closed type refutes both UIP formulations

Proved
HofmannStreicher1994.uip_underivable

by kmehltretter82 · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

category-theorygroupoidsidentity-typestype-theory

The expression A0=ΣX:U.El(X)A_0=\Sigma X:U.\mathrm{El}(X)A0​=ΣX:U.El(X) is a well-formed type in the empty context. No expression is derivably a term of IdIdA0(x,x)(p,reflA0(x))\mathrm{Id}_{\mathrm{Id}_{A_0}(x,x)}(p,\mathrm{refl}_{A_0}(x))IdIdA0​​(x,x)​(p,reflA0​​(x)) in context x:A0,p,q:IdA0(x,x)x:A_0,p,q:\mathrm{Id}_{A_0}(x,x)x:A0​,p,q:IdA0​​(x,x). Nor is any expression derivably a term of IdIdA0(x,y)(p,q)\mathrm{Id}_{\mathrm{Id}_{A_0}(x,y)}(p,q)IdIdA0​​(x,y)​(p,q) in context x,y:A0,p,q:IdA0(x,y)x,y:A_0,p,q:\mathrm{Id}_{A_0}(x,y)x,y:A0​,p,q:IdA0​​(x,y).

All three clauses concern the specified annotated object theory, including the selected 1994 U/ElU/\mathrm{El}U/El interface. There is no model, interpretation, soundness, or non-UIP premise. The source's model, interpretation and soundness argument remain part of the work required to prove this unconditional statement.

Preamble
import Definitions.Def_HofmannStreicher1994_Syntax
Formal statement
namespace HofmannStreicher1994

theorem uip_underivable :
    TypeWf [] counterexampleType ∧
      (¬ ∃ t, TermWf (diagonalContext counterexampleType) t
        (diagonalConclusion counterexampleType)) ∧
      (¬ ∃ t, TermWf (uipContext counterexampleType) t
        (uipConclusion counterexampleType)) := by sorry

end HofmannStreicher1994
Source
Hofmann and Streicher, A Groupoid Model Refutes Uniqueness of Identity Proofs, author manuscript dated 21 March 1994, https://www.dcs.ed.ac.uk/home/mxh/SH.dvi.gz; LICS 1994, https://doi.org/10.1109/LICS.1994.316071. Theorem 1 and following paragraph, manuscript p. 2; explicit witness in Section 3, p. 7.
Read-back

What the Lean code literally says, in plain math · GPT-6 (Codex independent blind auditor)

Blind read-back of HofmannStreicher1994.uip_underivable. Fix the raw type expression S=Σ(X:U).El⁡(X)S=\Sigma(X:U).\operatorname{El}(X)S=Σ(X:U).El(X), where UUU is the syntax's primitive universe type and El⁡(X)\operatorname{El}(X)El(X) is its decoding expression. The declaration has no parameters, hypotheses, or typeclass assumptions. It asserts the conjunction of the following three propositions: SSS is a derivably well-formed type in the empty context; there exists no raw expression ttt for which the typing judgment x:S, p:Id⁡S(x,x), q:Id⁡S(x,x)⊢t:Id⁡Id⁡S(x,x)(p,refl⁡S(x))x:S,\ p:\operatorname{Id}_S(x,x),\ q:\operatorname{Id}_S(x,x)\vdash t:\operatorname{Id}_{\operatorname{Id}_S(x,x)}(p,\operatorname{refl}_S(x))x:S, p:IdS​(x,x), q:IdS​(x,x)⊢t:IdIdS​(x,x)​(p,reflS​(x)) is derivable; and there exists no raw expression ttt for which x:S, y:S, p:Id⁡S(x,y), q:Id⁡S(x,y)⊢t:Id⁡Id⁡S(x,y)(p,q)x:S,\ y:S,\ p:\operatorname{Id}_S(x,y),\ q:\operatorname{Id}_S(x,y)\vdash t:\operatorname{Id}_{\operatorname{Id}_S(x,y)}(p,q)x:S, y:S, p:IdS​(x,y), q:IdS​(x,y)⊢t:IdIdS​(x,y)​(p,q) is derivable. The two existential quantifiers range independently over all elements of the raw-expression inductive type, including expressions that are not well scoped or well typed; their respective typing premises would have to be derivable. Each negated existential equivalently says that every raw expression fails the indicated typing judgment. The context variables displayed here are object-language variables, not additional universal quantifiers in the theorem. In particular, SSS is fixed; the declaration does not quantify over types. The diagonal context contains both ppp and qqq, and its conclusion mentions ppp but not qqq. All these judgments refer to the following particular syntactic inference system, with no semantic interpretation included in their definitions. Raw expressions are finite trees formed from variables indexed by natural numbers, dependent function and dependent pair type expressions, identity type expressions, Nat\mathsf{Nat}Nat, UUU, decoding expressions, annotated lambdas and applications, annotated pairs and dependent pair eliminators, annotated reflexivity expressions and identity eliminators, zero, successor, and a dependent natural-number eliminator. Types and terms use this same raw-expression type. Contexts are finite lists of raw expressions, stored with the most recent variable first; a declaration's stored type is expressed in the preceding, older context. Index 000 denotes the most recent variable. A variable at index nnn, whose stored type is AAA, has type AAA with each free index kkk increased to k+n+1k+n+1k+n+1. Thus, in the diagonal context the final indices 2,1,02,1,02,1,0 denote x,p,qx,p,qx,p,q, respectively; in the second context the final indices 3,2,1,03,2,1,03,2,1,0 denote x,y,p,qx,y,p,qx,y,p,q. The index 000 in the codomain El⁡(X)\operatorname{El}(X)El(X) of SSS denotes its bound universe variable. Renaming and simultaneous substitution are capture avoiding: under one binder renaming fixes index 000 and maps n+1n+1n+1 to the successor of the old image of nnn, while substitution fixes index 000 and weakens the old substitution image at nnn before placing it at index n+1n+1n+1; these operations are iterated under multiple binders. Weakening increases every free index by one. The codomain of a dependent function or pair type and the body of a lambda each bind one variable. The codomain annotation of an application or pair also binds one variable. A pair eliminator's motive binds the eliminated pair, and its branch binds the first component followed by the second component, so the second component has index 000 and the first index 111. An identity eliminator's motive binds x:Ax:Ax:A, then y:Ay:Ay:A, then p:Id⁡A(x,y)p:\operatorname{Id}_A(x,y)p:IdA​(x,y), with indices 2,1,02,1,02,1,0 respectively, and its reflexive branch binds just x:Ax:Ax:A. A natural-number eliminator's motive binds n:Natn:\mathsf{Nat}n:Nat; its successor branch binds n:Natn:\mathsf{Nat}n:Nat followed by an induction-hypothesis variable of the motive at nnn, with indices 1,01,01,0 respectively. One-variable instantiation replaces index 000 by the supplied expression and lowers every higher free index by one; two-variable instantiation replaces indices 1,01,01,0 by the supplied expressions in that order and lowers higher free indices by two; three-variable instantiation replaces indices 2,1,02,1,02,1,0 in that order and lowers higher free indices by three. The context, type, term, type-equality, term-equality, substitution, substitution-equality, and context-equality judgments are the simultaneously inductively generated relations given by the following rules, with all metavariables in the rules universally quantified over raw expressions, contexts, natural indices, or total substitutions of the indicated kinds. The empty context is well formed, and adjoining a type well formed in a well-formed context gives a well-formed context. Dependent function and pair types are well formed when their domain is a type and their codomain is a type in the context extended by that domain. An identity type is well formed when its carrier is a type and its two endpoints have that carrier type. Nat\mathsf{Nat}Nat and UUU are types in any well-formed context; El⁡(a)\operatorname{El}(a)El(a) is a type whenever a:Ua:Ua:U. A variable has the shifted stored type described above, provided the whole context is well formed and the corresponding list entry exists. A lambda has dependent function type when its annotated domain and codomain are types and its body has the codomain type under the domain binder. An annotated application has the instantiated codomain type when its domain and codomain are types, its function has that dependent function type, and its argument has the domain type. An annotated pair has dependent pair type when the domain and codomain are types, its first component has the domain type, and its second component has the codomain instantiated at the first. A pair eliminator has the motive instantiated at the scrutinee when the domain and codomain are types, the motive is a type under a variable of that dependent pair type, the branch under variables a:A,b:B(a)a:A,b:B(a)a:A,b:B(a) has motive C(⟨a,b⟩)C(\langle a,b\rangle)C(⟨a,b⟩), and the scrutinee has the dependent pair type. Here the branch motive is literally obtained by replacing the motive's index 000 with the annotated pair of indices 1,01,01,0, shifting the free domain and codomain parameters past these two branch binders, and replacing each original outer index n+1n+1n+1 with n+2n+2n+2. Reflexivity has type Id⁡A(a,a)\operatorname{Id}_A(a,a)IdA​(a,a) when AAA is a type and a:Aa:Aa:A. An identity eliminator has type C(a,b,p)C(a,b,p)C(a,b,p) when AAA is a type, CCC is a type in the context x:A,y:A,p:Id⁡A(x,y)x:A,y:A,p:\operatorname{Id}_A(x,y)x:A,y:A,p:IdA​(x,y), its branch under x:Ax:Ax:A has type C(x,x,refl⁡A(x))C(x,x,\operatorname{refl}_A(x))C(x,x,reflA​(x)), its endpoints a,ba,ba,b have type AAA, and its identity argument has type Id⁡A(a,b)\operatorname{Id}_A(a,b)IdA​(a,b). The branch motive replaces original indices 0,1,20,1,20,1,2 respectively by reflexivity at the remaining index-000 variable, that variable, and that variable, and sends each original outer index n+3n+3n+3 to n+1n+1n+1. Zero has type Nat\mathsf{Nat}Nat in any well-formed context, and successor preserves this type. A natural-number eliminator has type C(n)C(n)C(n) when CCC is a type under n:Natn:\mathsf{Nat}n:Nat, the zero branch has type C(0)C(0)C(0), the successor branch under n:Nat,h:C(n)n:\mathsf{Nat},h:C(n)n:Nat,h:C(n) has type C(succ⁡(n))C(\operatorname{succ}(n))C(succ(n)), and the scrutinee has type Nat\mathsf{Nat}Nat; the successor branch's expected type replaces the motive's index 000 with successor of index 111 and sends each original outer index n+1n+1n+1 to n+2n+2n+2. A term's type can be replaced by a derivably equal type. Type equality is generated by reflexivity for well-formed types, symmetry, transitivity, congruence for dependent function and pair types, congruence for identity types, and congruence for decoding, together with the structural rules described below. For dependent function and pair congruence, domains are compared in the ambient context and codomains are compared in the context extended by the left-hand domain. For identity-type congruence, the carriers are compared as types and the endpoints are compared as terms of the left-hand carrier. Decoding congruence uses term equality at UUU. Term equality is generated by reflexivity for well-typed terms, symmetry, transitivity, conversion along type equality, congruence for lambda, application, pair, pair elimination, reflexivity, identity elimination, successor, and natural-number elimination, and the following computation equations: application of a lambda equals its instantiated body; a function equals its eta expansion λx.f(x)\lambda x.f(x)λx.f(x), with the constructor oriented from the expansion to the function; pair elimination on an explicit pair equals the branch instantiated with its two components; identity elimination on reflexivity equals its reflexive branch instantiated at the endpoint; natural-number elimination on zero equals its zero branch; and natural-number elimination on a successor equals its successor branch instantiated with the predecessor and the recursive result. Each computation rule requires the corresponding domain, codomain or motive formation and branch and argument typing premises of the elimination or lambda rule. Congruence premises compare domain annotations as types, and compare dependent codomain annotations under the left-hand domain; application compares functions at the left-hand dependent function type and arguments at the left-hand domain, and returns equality at the left-hand codomain instantiated with the left-hand argument; pair congruence compares first components at the left-hand domain and second components at the left-hand instantiated codomain, and returns equality at the left-hand dependent pair type. Lambda congruence additionally requires one common codomain to be well formed under the left-hand domain and compares bodies there at that codomain, returning equality at that dependent function type. Pair-eliminator congruence compares motives under a variable of the left-hand dependent pair type, branches under the two left-hand component declarations at the left-hand pair branch motive, and scrutinees at the left-hand dependent pair type, returning equality at the left-hand motive instantiated with the left-hand scrutinee. Reflexivity congruence compares carriers as types and endpoints at the left-hand carrier, returning equality in the identity type on the left-hand endpoint twice. Identity-eliminator congruence compares motives under the three-variable identity context of the left-hand carrier, branches under the left-hand carrier at the left-hand reflexive motive, endpoints at that carrier, and identity arguments at the identity type on the left-hand endpoints, returning equality at the left-hand motive instantiated with the left-hand endpoints and identity argument. Natural-number-eliminator congruence compares motives under Nat\mathsf{Nat}Nat, zero branches at the left-hand motive at zero, successor branches under n:Nat,h:C(n)n:\mathsf{Nat},h:C(n)n:Nat,h:C(n) for the left-hand motive and at its successor branch type, and scrutinees at Nat\mathsf{Nat}Nat, returning equality at the left-hand motive evaluated on the left-hand scrutinee. Successor congruence compares its arguments at Nat\mathsf{Nat}Nat and returns equality at Nat\mathsf{Nat}Nat. There are no further computation rules among the constructors: in particular, no pair eta rule, identity reflection rule, or rule identifying arbitrary identity proofs is supplied. A well-formed substitution from source context Γ\GammaΓ to target context Δ\DeltaΔ is a total map σ:N→Expr\sigma:\mathbb N\to\mathrm{Expr}σ:N→Expr with both contexts well formed such that, for every natural number nnn and every raw expression AAA, whenever the nnnth stored entry of Γ\GammaΓ is AAA, the target context derives σ(n)\sigma(n)σ(n) at the result of substituting σ\sigmaσ into AAA after increasing its free indices by n+1n+1n+1. Two substitutions are equal when both are well formed and, for every such existing source entry, their images are derivably term equal at that same type computed using the first substitution. Images at indices outside the source context are unconstrained by these conditions, including all indices when the source context is empty. Type formation, term typing, type equality, and term equality are closed under well-formed substitution. Equal substitutions applied to a well-formed type give equal types; equal substitutions applied to a well-typed term give equal terms at the type transformed by the first substitution. Context equality is generated by equality of the two empty contexts and by extending related contexts Γ,Δ\Gamma,\DeltaΓ,Δ with A,BA,BA,B whenever AAA and BBB are derivably equal types in Γ\GammaΓ; there are no additional context-equality constructors. Type formation, term typing, type equality, and term equality can all be transferred from a context to a related context, keeping their raw expressions unchanged. These are all the primitive judgment rules. In particular, although UUU and decoding occur in SSS, this syntax supplies no primitive terms coding Nat\mathsf{Nat}Nat, dependent functions, dependent pairs, identity types, or UUU itself as elements of UUU, and the theorem does not assert an inhabitant of UUU or of SSS, a semantic countermodel, or an equivalence between its two non-derivability assertions.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by kmehltretter82 · Oct 29, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me