pith. machine review for the scientific record. sign in

IndisputableMonolith.Papers.DraftV1

IndisputableMonolith/Papers/DraftV1.lean · 327 lines · 28 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.RecogGeom.Quotient
   3import IndisputableMonolith.RecogGeom.Composition
   4import IndisputableMonolith.Foundation.AlexanderDuality
   5
   6/-!
   7# Draft_v1.tex — theorem formalization surface (audit companion)
   8
   9This module exists to **mirror the theorem statements** appearing in `Draft_v1.tex`
  10and to map them to what is currently available in this Lean repository.
  11
  12Where the repo already contains a proved theorem with the same statement, we
  13re-export it here under a paper-oriented name.
  14
  15Where the paper relies on heavy external mathematics (e.g. Alexander duality for complements
  16of embeddings, or full Binet/Bertrand machinery), we provide **explicit hypothesis interfaces**
  17instead of introducing new global axioms. This keeps the certified surface honest: theorems
  18depending on those hypotheses are only as strong as the hypotheses supplied.
  19
  20See also: `Draft_v1_audit.tex` (the LaTeX-side inventory and mapping report).
  21-/
  22
  23noncomputable section
  24
  25namespace IndisputableMonolith
  26namespace Papers
  27namespace DraftV1
  28
  29/-! ## Paper Theorem: Injectivity of Observable Map -/
  30
  31namespace RecognitionGeometry
  32
  33open RecogGeom
  34
  35/-- Paper theorem: the induced map `R̄ : C_R → E` is injective. -/
  36theorem injectivity_of_observable_map {C E : Type*} (r : Recognizer C E) :
  37    Function.Injective (quotientEventMap r) :=
  38  quotientEventMap_injective (r := r)
  39
  40/-! ## Paper Theorem: Refinement (Composition of Recognizers) -/
  41
  42/-- Paper theorem: the composite quotient maps surjectively to each component quotient. -/
  43theorem refinement {C E₁ E₂ : Type*} (r₁ : Recognizer C E₁) (r₂ : Recognizer C E₂) :
  44    Function.Surjective (quotientMapLeft r₁ r₂) ∧
  45    Function.Surjective (quotientMapRight r₁ r₂) :=
  46  refinement_theorem (r₁ := r₁) (r₂ := r₂)
  47
  48end RecognitionGeometry
  49
  50/-! ## Constraint (S): Dyadic synchronization (N = 45) -/
  51
  52open Nat
  53
  54/-- The synchronization period used in `Draft_v1.tex`: `S(D) := lcm(2^D, 45)`. -/
  55def syncPeriod (D : ℕ) : ℕ := Nat.lcm (2 ^ D) 45
  56
  57lemma syncPeriod_def (D : ℕ) : syncPeriod D = Nat.lcm (2 ^ D) 45 := rfl
  58
  59/-! The key arithmetic lemma used in the paper's proof: since `45` is odd,
  60`gcd(2^D,45)=1`, hence `lcm(2^D,45)=2^D*45`. -/
  61theorem syncPeriod_eq_mul (D : ℕ) : syncPeriod D = (2 ^ D) * 45 := by
  62  unfold syncPeriod
  63  have h2 : Nat.Coprime 2 45 := by decide
  64  have h : Nat.Coprime (2 ^ D) 45 := h2.pow_left D
  65  simpa using h.lcm_eq_mul
  66
  67/-! ### Synchronization Selection Principle (proved) -/
  68
  69/-- A direct formalization of the paper's minimization statement:
  70among all `D ≥ 3`, the function `D ↦ lcm(2^D,45)` is minimized uniquely at `D = 3`. -/
  71theorem synchronization_selection_principle {D : ℕ} (hD : 3 ≤ D) :
  72    syncPeriod 3 ≤ syncPeriod D ∧ (syncPeriod D = syncPeriod 3 → D = 3) := by
  73  constructor
  74  · -- monotonicity from the closed form
  75    have h3 : syncPeriod 3 = (2 ^ 3) * 45 := syncPeriod_eq_mul 3
  76    have hD' : syncPeriod D = (2 ^ D) * 45 := syncPeriod_eq_mul D
  77    -- show 2^3 ≤ 2^D using D = 3 + k
  78    rcases Nat.exists_eq_add_of_le hD with ⟨k, rfl⟩
  79    have hk : 1 ≤ 2 ^ k := Nat.one_le_pow k 2 (by norm_num)
  80    have hpow : 2 ^ 3 ≤ 2 ^ (3 + k) := by
  81      calc
  82        2 ^ 3 = 2 ^ 3 * 1 := by ring
  83        _ ≤ 2 ^ 3 * 2 ^ k := by exact Nat.mul_le_mul_left (2 ^ 3) hk
  84        _ = 2 ^ (3 + k) := by
  85          -- 2^(3+k) = 2^3 * 2^k
  86          simp [Nat.pow_add]
  87    -- multiply by 45 on the right (commuting as needed)
  88    have hmul : (2 ^ 3) * 45 ≤ (2 ^ (3 + k)) * 45 := by
  89      -- use commutativity so we can multiply on the left
  90      have : 45 * (2 ^ 3) ≤ 45 * (2 ^ (3 + k)) := Nat.mul_le_mul_left 45 hpow
  91      simpa [Nat.mul_comm, Nat.mul_left_comm, Nat.mul_assoc] using this
  92    simpa [h3, hD', Nat.add_assoc] using hmul
  93  · intro heq
  94    -- use strictness: if D>3 then syncPeriod 3 < syncPeriod D, contradiction
  95    rcases Nat.exists_eq_add_of_le hD with ⟨k, rfl⟩
  96    cases k with
  97    | zero =>
  98        simp
  99    | succ k =>
 100        have hlt : 3 < 3 + Nat.succ k := Nat.lt_add_of_pos_right (by exact Nat.succ_pos _)
 101        have hpowlt : 2 ^ 3 < 2 ^ (3 + Nat.succ k) :=
 102          Nat.pow_lt_pow_right (by decide : 1 < (2 : Nat)) hlt
 103        have h3 : syncPeriod 3 = (2 ^ 3) * 45 := syncPeriod_eq_mul 3
 104        have hD' : syncPeriod (3 + Nat.succ k) = (2 ^ (3 + Nat.succ k)) * 45 :=
 105          syncPeriod_eq_mul (3 + Nat.succ k)
 106        have hmul : syncPeriod 3 < syncPeriod (3 + Nat.succ k) := by
 107          -- multiply strict inequality by 45 > 0 (again using commutativity)
 108          have : 45 * (2 ^ 3) < 45 * (2 ^ (3 + Nat.succ k)) :=
 109            (Nat.mul_lt_mul_left (by decide : 0 < 45)).2 hpowlt
 110          -- rewrite back to the paper order `(2^D)*45`
 111          have : (2 ^ 3) * 45 < (2 ^ (3 + Nat.succ k)) * 45 := by
 112            simpa [Nat.mul_comm, Nat.mul_left_comm, Nat.mul_assoc] using this
 113          simpa [h3, hD'] using this
 114        -- contradiction: strict inequality implies not-equal
 115        exfalso
 116        exact (Nat.ne_of_lt hmul) (heq.symm)
 117
 118/-! A convenience corollary matching the paper's explicit numeric claim `lcm(8,45)=360`. -/
 119theorem syncPeriod_3_eq_360 : syncPeriod 3 = 360 := by
 120  native_decide
 121
 122/-! The paper also packages the minimization in terms of a resource functional
 123\(\mathcal{F}(D,45)=\alpha\,\mathrm{lcm}(2^D,45)+\beta D\) with \(\alpha>0,\beta\ge0\).
 124We record that consequence here. -/
 125
 126/-- If `α>0` and `β≥0`, then the resource functional
 127`F(D)=α * lcm(2^D,45) + β * D` is minimized at `D=3` among `D≥3`. -/
 128theorem sync_resource_functional_minimized (α β : ℝ) (hα : 0 < α) (hβ : 0 ≤ β)
 129    {D : ℕ} (hD : 3 ≤ D) :
 130    α * (syncPeriod 3 : ℝ) + β * (3 : ℝ) ≤ α * (syncPeriod D : ℝ) + β * (D : ℝ) := by
 131  have hsyncNat : syncPeriod 3 ≤ syncPeriod D := (synchronization_selection_principle (D := D) hD).1
 132  have hsync : (syncPeriod 3 : ℝ) ≤ (syncPeriod D : ℝ) := by
 133    exact_mod_cast hsyncNat
 134  have hdim : (3 : ℝ) ≤ (D : ℝ) := by
 135    exact_mod_cast hD
 136  have h1 : α * (syncPeriod 3 : ℝ) ≤ α * (syncPeriod D : ℝ) :=
 137    mul_le_mul_of_nonneg_left hsync (le_of_lt hα)
 138  have h2 : β * (3 : ℝ) ≤ β * (D : ℝ) :=
 139    mul_le_mul_of_nonneg_left hdim hβ
 140  linarith
 141
 142/-! ## Constraint (K): Kepler non-precession (algebraic core) -/
 143
 144open Real
 145
 146/-- The apsidal-angle formula used in `Draft_v1.tex` after substituting the Green-kernel power
 147law: `Δθ(D) = 2π / √(4 - D)` (with `D` treated as a real parameter). -/
 148noncomputable def apsidalAngle (D : ℕ) : ℝ :=
 149  (2 * Real.pi) / Real.sqrt (4 - (D : ℝ))
 150
 151/-- A direct formalization of the paper's last step:
 152`Δθ = 2π` holds iff `D=3` for the substituted closed-form apsidal angle. -/
 153theorem kepler_selection_principle (D : ℕ) :
 154    apsidalAngle D = 2 * Real.pi ↔ D = 3 := by
 155  constructor
 156  · intro h
 157    have hpi : (2 * Real.pi) ≠ 0 := by
 158      exact mul_ne_zero (by norm_num) Real.pi_ne_zero
 159    -- Let x be the denominator √(4 - D).
 160    set x : ℝ := Real.sqrt (4 - (D : ℝ))
 161    have hx : x ≠ 0 := by
 162      intro hx0
 163      have : apsidalAngle D = 0 := by
 164        simp [apsidalAngle, x, hx0]
 165      have h0 : 0 = 2 * Real.pi := by
 166        simpa [this] using h
 167      exact hpi h0.symm
 168    -- Rewrite h as (2π) * x⁻¹ = 2π, then cancel.
 169    have h' : (2 * Real.pi) * x⁻¹ = 2 * Real.pi := by
 170      simpa [apsidalAngle, x, div_eq_mul_inv] using h
 171    have hmul : (2 * Real.pi) * (x⁻¹ * x) = (2 * Real.pi) * x := by
 172      -- multiply both sides by x
 173      simpa [mul_assoc] using congrArg (fun t => t * x) h'
 174    have hmul' : (2 * Real.pi) = (2 * Real.pi) * x := by
 175      simpa [mul_assoc, inv_mul_cancel₀ hx, mul_one] using hmul
 176    -- cancel 2π to get x = 1
 177    have hx1 : x = 1 := by
 178      have hcancel : (2 * Real.pi) * x = (2 * Real.pi) * 1 := by
 179        calc
 180          (2 * Real.pi) * x = (2 * Real.pi) := by simpa [mul_assoc] using hmul'.symm
 181          _ = (2 * Real.pi) * 1 := by simp
 182      exact mul_left_cancel₀ hpi hcancel
 183    -- show 0 ≤ 4 - D so we can square the sqrt
 184    have hnonneg : 0 ≤ 4 - (D : ℝ) := by
 185      by_contra hneg
 186      have hle : 4 - (D : ℝ) ≤ 0 := le_of_not_ge hneg
 187      have : Real.sqrt (4 - (D : ℝ)) = 0 := Real.sqrt_eq_zero_of_nonpos hle
 188      -- but x = sqrt(...) = 1
 189      have : (1 : ℝ) = 0 := by simpa [x, hx1] using this
 190      exact one_ne_zero this
 191    have hsq : x ^ 2 = 4 - (D : ℝ) := by
 192      simpa [x, pow_two] using (Real.sq_sqrt hnonneg)
 193    -- x=1 => 4 - D = 1 => D = 3
 194    have hreal : (D : ℝ) = 3 := by
 195      have : (1 : ℝ) ^ 2 = 4 - (D : ℝ) := by simpa [hx1] using hsq
 196      nlinarith
 197    -- cast-injectivity to return to ℕ
 198    exact (Nat.cast_injective (R := ℝ) (by simpa using hreal))
 199  · intro hD
 200    subst hD
 201    have : (4 - (3 : ℝ)) = (1 : ℝ) := by norm_num
 202    simp [apsidalAngle, this]
 203
 204/-! ## Paper Packaging: Dimensional Rigidity (T/K/S) -/
 205
 206/-- Paper-style (S) constraint: `D` is admissible (`D ≥ 3`) and is a minimizer of `syncPeriod`. -/
 207def ConstraintS (D : ℕ) : Prop :=
 208  3 ≤ D ∧ ∀ D', 3 ≤ D' → syncPeriod D ≤ syncPeriod D'
 209
 210/-- Paper-style (K) constraint, reduced to the closed-form apsidal-angle condition. -/
 211def ConstraintK (D : ℕ) : Prop :=
 212  apsidalAngle D = 2 * Real.pi
 213
 214/-! The (S) constraint is fully formalized here (arithmetic only). -/
 215
 216theorem constraintS_forces_D3 {D : ℕ} (hS : ConstraintS D) : D = 3 := by
 217  have hD : 3 ≤ D := hS.1
 218  have hle : syncPeriod D ≤ syncPeriod 3 := hS.2 3 (le_rfl)
 219  have hge : syncPeriod 3 ≤ syncPeriod D := (synchronization_selection_principle (D := D) hD).1
 220  have heq : syncPeriod D = syncPeriod 3 := le_antisymm hle hge
 221  exact (synchronization_selection_principle (D := D) hD).2 heq
 222
 223theorem constraintS_iff_D3 (D : ℕ) : ConstraintS D ↔ D = 3 := by
 224  constructor
 225  · intro hS; exact constraintS_forces_D3 hS
 226  · intro hD
 227    subst hD
 228    refine ⟨le_rfl, ?_⟩
 229    intro D' hD'
 230    exact (synchronization_selection_principle (D := D') hD').1
 231
 232/-!
 233Paper-style (T) constraint and Alexander duality are now formalized in
 234`IndisputableMonolith.Foundation.AlexanderDuality`. The Alexander duality
 235hypothesis interface below delegates to the cohomology-based predicate
 236`SphereAdmitsCircleLinking`, which is proved equivalent to D = 3 from
 237the reduced cohomology axiom for S¹.
 238-/
 239
 240open IndisputableMonolith.Foundation.AlexanderDuality
 241
 242/-- Hypothesis interface for the Alexander-duality computation used in `Draft_v1.tex`.
 243Now delegates to the cohomology-based `SphereAdmitsCircleLinking` from
 244`AlexanderDuality.lean` rather than being a vacuous `True`. -/
 245def AlexanderDualityForCircleHypothesis (D : ℕ) : Prop :=
 246  SphereAdmitsCircleLinking D
 247
 248/-- Hypothesis interface for the paper's ``integer-valued loop-linking invariant exists'' premise.
 249Now delegates to the cohomology-based linking predicate. -/
 250def LinkingInvariantHypothesis (D : ℕ) : Prop :=
 251  SphereAdmitsCircleLinking D
 252
 253/-! ## Remaining paper propositions (placeholders) -/
 254
 255/-- Placeholder for the paper proposition ``RG Conditions for Duality''.
 256
 257Status: not yet formalized (topology of quotients + local contractibility). -/
 258def RGConditionsForDualityHypothesis : Prop := True
 259
 260theorem rg_conditions_for_duality (_h : RGConditionsForDualityHypothesis) : True := trivial
 261
 262/-- Placeholder for the paper proposition ``RG Derivation of Central Potentials''.
 263
 264Status: not yet formalized (Laplacian / Green's functions). -/
 265def CentralPotentialDerivationHypothesis : Prop := True
 266
 267theorem rg_derivation_of_central_potentials (_h : CentralPotentialDerivationHypothesis) : True := trivial
 268
 269/-- Placeholder for the paper proposition ``Robustness of D=3 Signature''.
 270
 271Status: not yet formalized (perturbation theory / IFT / continuity). -/
 272def RobustnessHypothesis : Prop := True
 273
 274theorem robustness_of_D3_signature (_h : RobustnessHypothesis) : True := trivial
 275
 276/-- The (T) setup assumptions required for Alexander duality in the paper
 277are satisfied for this dimension. Now delegates to the cohomology-based
 278`SphereAdmitsCircleLinking` rather than being vacuous. -/
 279def AlexanderDualityApplies (D : ℕ) : Prop :=
 280  AlexanderDualityForCircleHypothesis D
 281
 282/-- Paper proposition (T): Linking selection principle.
 283
 284Previously an explicit hypothesis interface; now the bridge from
 285linking to D = 3 is provided by `alexander_duality_circle_linking`. -/
 286def LinkingSelectionPrincipleHypothesis (D : ℕ) : Prop :=
 287  LinkingInvariantHypothesis D → D = 3
 288
 289theorem linking_selection_principle (D : ℕ)
 290    (h : LinkingSelectionPrincipleHypothesis D) (hLink : LinkingInvariantHypothesis D) :
 291    D = 3 :=
 292  h hLink
 293
 294/-- Paper main theorem (forward direction): if (T), (K), (S) hold then `D=3`.
 295
 296In the current repo, (S) and (K) are fully formalized at the arithmetic/algebraic level;
 297(T) is recorded but not used in the proof here. -/
 298theorem dimensional_rigidity_main (D : ℕ)
 299    (_hT : LinkingInvariantHypothesis D)
 300    (hK : ConstraintK D)
 301    (_hS : ConstraintS D) :
 302    D = 3 :=
 303  (kepler_selection_principle D).1 hK
 304
 305/-- Paper combined theorem (full statement): forward direction plus a partial converse.
 306
 307Status: the converse direction is recorded in the paper but depends on substantial
 308geometric infrastructure; we record only the forward direction as proved above. -/
 309theorem dimensional_rigidity_full_forward (D : ℕ)
 310    (hT : LinkingInvariantHypothesis D) (hK : ConstraintK D) (hS : ConstraintS D) :
 311    D = 3 :=
 312  dimensional_rigidity_main D hT hK hS
 313
 314/-- Paper corollary: there is no `D > 3` satisfying all three constraints simultaneously.
 315
 316We prove this using the (K)-based forcing `ConstraintK D → D=3`. -/
 317theorem no_higher_dimensional_alternative (D : ℕ) (hD : 3 < D)
 318    (hT : LinkingInvariantHypothesis D) (hK : ConstraintK D) (hS : ConstraintS D) :
 319    False := by
 320  have h3 : D = 3 := dimensional_rigidity_full_forward D hT hK hS
 321  have : D ≤ 3 := by simp [h3]
 322  exact (not_le_of_gt hD) this
 323
 324end DraftV1
 325end Papers
 326end IndisputableMonolith
 327

source mirrored from github.com/jonwashburn/shape-of-logic