Existence of Uniform Realizers for Definite and Goal Formulas (Theorem 5.2)
OpenBBS2002.theorem_5_2Theorem 5.2 (pp. 13-14): For every definite formula D and goal formula G, there exist terms t = ⟦N_D⟧ and s = ⟦H_G⟧ such that for any comprehension term A = λy A₀, (12) Z ⊢ D → t mr_A D^X and (13) Z ⊢ w mr_A G^X → (G → A(v)) → A(s w v).
Superseded by BBS2002.V2.theorem_5_2. The original declaration incorrectly required closed uniform realizers. V2 permits the formulas' free object parameters, while choosing realizers independently of the comprehension term.
import Definitions.Def_BBS2002_Extraction
namespace BBS2002
/-- Theorem 5.2 (Section 5, pp. 13–14):
For every definite formula `D` and goal formula `G` (and any type `ν` with closed `dummy : ν`),
there exist `t : Option Term` and `s : Term` (specifically `t = ⟦N_D⟧` and `s = ⟦H_G⟧` extracted
from the `Z^X`-derivations `N_D : D → D^X` and `H_G : G^X → (G → X) → X` of Lemma 3.1(4),(6))
such that for every comprehension term `A = λy^ν A₀`:
- (12) `Z ⊢ D → t mr_A D^X`,
- (13) `Z ⊢ w mr_A G^X → (G → A(v)) → A(s w v)`. -/
theorem theorem_5_2
(ν : Ty) (dummy : Term)
(hDummyTy : HasType dummy ν)
(hDummyClosed : IsClosedTerm dummy)
(D G : Formula)
(hD : IsDefiniteFormula D)
(hG : IsGoalFormula G) :
(∃ t : Option Term,
(match tau ν (substBotWithX D), t with
| none, none => True
| some ρ, some t₀ => HasType t₀ ρ ∧ IsClosedTerm t₀
| _, _ => False) ∧
∀ comp : CompTerm ν,
Provable SysConfig.Z (.imp D (mrFormula ν comp t (substBotWithX D)))) ∧
(∃ s : Term,
IsClosedTerm s ∧
(match tau ν (substBotWithX G) with
| none => HasType s (.arr ν ν)
| some ρ => HasType s (.arr ρ (.arr ν ν))) ∧
∀ (comp : CompTerm ν) (w : Option Var) (v : Var),
v.ty = ν →
(match tau ν (substBotWithX G), w with
| none, none => True
| some ρ, some wVar =>
wVar.ty = ρ ∧
wVar ≠ v ∧
wVar ∉ freeVarsFormula G ∧
(wVar = comp.var ∨ wVar ∉ freeVarsFormula comp.body)
| _, _ => False) →
v ∉ freeVarsFormula G →
(v = comp.var ∨ v ∉ freeVarsFormula comp.body) →
Provable SysConfig.Z
(.imp
(mrFormula ν comp (w.map Term.var) (substBotWithX G))
(.imp
(.imp G (comp.apply (.var v)))
(comp.apply (applyGoalRealizer s w (.var v)))))) := by
sorry
end BBS2002Read-back
What the Lean code literally says, in plain math · Gemini 3.1 Pro (Independent Blind Auditor)
Independent Mathematical Read-Back: Thm_BBS2002_theorem_5_2.lean
theorem_5_2 (Uniform Realizers for Definite and Goal Formulas).
For any simple type , any fallback term that is closed and of type (HasType dummy ν and IsClosedTerm dummy), any definite formula (IsDefiniteFormula D), and any goal formula (IsGoalFormula G), both of the following hold, where :
- Realizer for the definite formula : There exists an optional System term (depending only on , , and , and independent of the comprehension term ) such that:
- if (), then (); if , then for a closed System term of type (
HasType t₀ ρandIsClosedTerm t₀); and the mismatched cases and do not occur; - for every comprehension term (representing ), intuitionistic arithmetic proves (
Provable SysConfig.Z)
- if (), then (); if , then for a closed System term of type (
- Realizer for the goal formula : There exists a closed System term (
IsClosedTerm s, depending only on , , and , and independent of , , and ) such that:- if (), then has type ; if , then has type ;
- for every comprehension term (), every optional variable , and every object variable satisfying:
- ,
- if then , whereas if then with , , , and (with mismatched cases forbidden),
- , and
- , intuitionistic arithmetic proves
where $\mathrm{applyGoalRealizer}(s, w, v)$ is $s\, v$ when $w = \mathrm{none}$ and $s\, w_{\mathrm{var}}\, v$ when $w = \mathrm{some}\,w_{\mathrm{var}}$.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.