pith. machine review for the scientific record. sign in

IndisputableMonolith.Foundation.GlobalCoIdentityConstraint

IndisputableMonolith/Foundation/GlobalCoIdentityConstraint.lean · 324 lines · 14 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.Cost
   3import IndisputableMonolith.Constants
   4import IndisputableMonolith.Papers.GCIC.GraphRigidity
   5import IndisputableMonolith.Papers.GCIC.ReducedPhasePotential
   6
   7/-!
   8# The Global Co-Identity Constraint (GCIC) — derived from local rigidity
   9
  10## Arc 8 of the AR-anchored ambitious completion plan (2026-04-18)
  11
  12The Anno Recognitionis essay §V states the **Global Co-Identity Constraint**:
  13
  14  Across the universal recognition field, all stable boundaries share one and
  15  the same global phase.
  16
  17That paragraph cites a "Recognition Physics Institute working paper"; the
  18Lean side previously had `Consciousness/GlobalPhase.lean` whose `GCIC` lemma
  19(line 127) honestly documents itself as a model statement that just unpacks
  20the `UniversalField` structure's `global_phase` field.
  21
  22This module **derives** the global statement from already-proved local
  23ingredients:
  24
  251. `Papers/GCIC/GraphRigidity.ratio_rigidity_iff` — ratio cost vanishing on
  26   every edge of a connected graph forces a constant positive field.
  272. `Papers/GCIC/ReducedPhasePotential.phase_rigidity` — reduced phase cost
  28   vanishing on every edge of a connected graph forces phase differences
  29   to be integers (windings).
  303. **NEW** (this module): wrapping the integer-winding ambiguity onto the
  31   torus `ℝ/ℤ` via the canonical `frac` projection gives the *global*
  32   phase-uniqueness statement: every pair of vertices has the same wrapped
  33   phase.
  34
  35That is the Lean-derivable form of the global GCIC.
  36
  37## What this module provides
  38
  391. `wrapPhase : ℝ → ℝ` — canonical fractional-part projection (matches the
  40   existing `Consciousness.GlobalPhase.wrapPhase` definitionally).
  412. `wrapPhase_eq_of_int_diff` — if two reals differ by an integer, their
  42   wrapped values agree.
  433. `gcic_global_phase_unique` — the headline theorem: on any connected
  44   recognition lattice with edge-wise zero reduced phase cost, all
  45   vertices share one wrapped phase.
  464. `gcic_existence_of_global_phase` — there exists a unique
  47   `Θ_global ∈ [0, 1)` such that every vertex has `wrapPhase (Θ v) = Θ_global`.
  485. `gcic_global_phase_independent_of_basepoint` — the global phase is
  49   well-defined irrespective of which vertex is taken as base.
  506. `gcic_global_phase_independent_of_path` — equivalent to (5), restated
  51   in path-composition form (matches the AR essay §V phrasing).
  527. `GlobalCoIdentityConstraintCert` — master certificate with five fields.
  538. `gcic_one_statement` — single-statement theorem packaging the above.
  54
  55## Bridge to the AR essay
  56
  57The Anno Recognitionis essay §V argues (paragraphs 5–7):
  58
  59  > Two stable boundaries cannot have independent global phases, because
  60  > there is no recognition coupling between them that could carry such an
  61  > independence. The boundaries are not independent occupants of a shared
  62  > spacetime container. The shared phase is what holds the spacetime
  63  > container together.
  64
  65The Lean-derivable form of this is `gcic_global_phase_unique`: any pair of
  66vertices in the recognition lattice that are connected (by *any* path of
  67edges, regardless of length) share the same wrapped phase, with no further
  68parameter beyond the connectivity of the lattice and the GCIC edge
  69condition.
  70
  71## Status
  72
  73THEOREM (clean, 0 sorry, 0 axiom).  The local rigidity ingredients are
  74already in `Papers/GCIC/`; this module assembles them into the global
  75statement and adds the wrapping projection step that converts
  76"phase mod ℤ" into "wrapped phase ∈ [0, 1)".
  77
  78## Frontier accounting
  79
  80Adds a new §XXIII row in section A: "GCIC global statement", CLOSED via
  81this module.  Removes the `washburn2026light-consciousness` working-paper
  82citation in `papers/Anno_Recognitionis.tex` §V from the "RPI working
  83papers" set; the load-bearing structural claim is now a Lean theorem.
  84-/
  85
  86namespace IndisputableMonolith
  87namespace Foundation
  88namespace GlobalCoIdentityConstraint
  89
  90open IndisputableMonolith.Papers.GCIC.GraphRigidity
  91open IndisputableMonolith.Papers.GCIC.ReducedPhasePotential
  92open IndisputableMonolith.Cost
  93
  94noncomputable section
  95
  96/-! ## §1. The wrapping projection -/
  97
  98/-- Canonical fractional-part projection ℝ → [0, 1).
  99
 100    Definitionally equal to `Consciousness.GlobalPhase.wrapPhase` and to
 101    `Consciousness.GlobalPhase.frac`; we re-state it locally to avoid
 102    introducing a Consciousness import cycle (this module sits in
 103    Foundation and feeds the Consciousness layer, not the other way). -/
 104def wrapPhase (x : ℝ) : ℝ := x - Int.floor x
 105
 106/-- Wrapped phase is in `[0, 1)`. -/
 107theorem wrapPhase_bounds (x : ℝ) : 0 ≤ wrapPhase x ∧ wrapPhase x < 1 := by
 108  refine ⟨?_, ?_⟩
 109  · have := Int.floor_le x; unfold wrapPhase; linarith
 110  · have := Int.lt_floor_add_one x; unfold wrapPhase; linarith
 111
 112/-- Wrapped phase is invariant under shifts by integers. -/
 113theorem wrapPhase_add_int (x : ℝ) (n : ℤ) :
 114    wrapPhase (x + (n : ℝ)) = wrapPhase x := by
 115  unfold wrapPhase
 116  rw [Int.floor_add_intCast]
 117  push_cast
 118  ring
 119
 120/-- If two reals differ by an integer, they wrap to the same value. -/
 121theorem wrapPhase_eq_of_int_diff (x y : ℝ) (n : ℤ) (h : x - y = (n : ℝ)) :
 122    wrapPhase x = wrapPhase y := by
 123  have hx : x = y + (n : ℝ) := by linarith
 124  rw [hx]
 125  exact wrapPhase_add_int y n
 126
 127/-! ## §2. The headline theorem: global phase uniqueness -/
 128
 129variable {V : Type*}
 130
 131/-- **THE GLOBAL CO-IDENTITY CONSTRAINT (derived form).**
 132
 133    Suppose:
 134    - The recognition lattice has vertex type `V` with adjacency `adj`.
 135    - The lattice is connected (every pair related by reflexive-transitive
 136      closure of `adj`).
 137    - Each vertex carries a real-valued local phase `Θ : V → ℝ`.
 138    - The GCIC edge condition holds: every adjacent pair has zero reduced
 139      phase cost `Jtilde lam (Θ v - Θ w) = 0` (this is the ratio
 140      energy on phases at base `b = e^lam`).
 141    - The base parameter `lam` is nonzero (the canonical choice is
 142      `lam = ln φ`, where `φ` is the golden ratio).
 143
 144    Then every pair of vertices has the **same wrapped phase**: there is
 145    a single `Θ_global ∈ [0, 1)` independent of the vertex chosen.
 146
 147    This is the Lean-derivable form of the Anno Recognitionis §V statement
 148    "all stable boundaries share one global phase across the universal
 149    recognition field".
 150
 151    The proof is direct composition of `phase_rigidity` (which gives
 152    `Θ v - Θ w ∈ ℤ` for any pair `v, w`) and `wrapPhase_eq_of_int_diff`
 153    (which projects out the integer-winding ambiguity onto the torus
 154    `ℝ/ℤ`). -/
 155theorem gcic_global_phase_unique
 156    {adj : V → V → Prop}
 157    (hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 158    {lam : ℝ} (hlam : lam ≠ 0)
 159    {Θ : V → ℝ}
 160    (hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0) :
 161    ∀ v w : V, wrapPhase (Θ v) = wrapPhase (Θ w) := by
 162  intro v w
 163  -- Step 1: get the integer-winding form from `phase_rigidity`.
 164  obtain ⟨n, hn⟩ := phase_rigidity hconn hlam hzero v w
 165  -- Step 2: project onto the torus.
 166  exact wrapPhase_eq_of_int_diff (Θ v) (Θ w) n hn
 167
 168/-- **Existence form of the global phase.**
 169
 170    There exists a single value `Θ_global ∈ [0, 1)` such that every
 171    vertex's wrapped phase equals `Θ_global`. -/
 172theorem gcic_existence_of_global_phase
 173    [Inhabited V]
 174    {adj : V → V → Prop}
 175    (hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 176    {lam : ℝ} (hlam : lam ≠ 0)
 177    {Θ : V → ℝ}
 178    (hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0) :
 179    ∃ Θ_global : ℝ,
 180      (0 ≤ Θ_global ∧ Θ_global < 1) ∧
 181      (∀ v : V, wrapPhase (Θ v) = Θ_global) := by
 182  refine ⟨wrapPhase (Θ default), wrapPhase_bounds _, ?_⟩
 183  intro v
 184  exact gcic_global_phase_unique hconn hlam hzero v default
 185
 186/-! ## §3. Independence of basepoint and path
 187
 188The "global phase" of the field is the wrapped phase of any vertex.  Since
 189all vertices have the same wrapped phase by `gcic_global_phase_unique`,
 190the choice of basepoint is irrelevant. -/
 191
 192/-- **Independence of basepoint.**
 193
 194    Picking any two basepoints `b1, b2 : V` and reading off the global
 195    phase as `wrapPhase (Θ b1)` vs `wrapPhase (Θ b2)` gives the same
 196    value. -/
 197theorem gcic_global_phase_independent_of_basepoint
 198    {adj : V → V → Prop}
 199    (hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 200    {lam : ℝ} (hlam : lam ≠ 0)
 201    {Θ : V → ℝ}
 202    (hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0)
 203    (b1 b2 : V) :
 204    wrapPhase (Θ b1) = wrapPhase (Θ b2) :=
 205  gcic_global_phase_unique hconn hlam hzero b1 b2
 206
 207/-- **Independence of path.**
 208
 209    The global phase is well-defined irrespective of which connecting
 210    path is chosen.  This is the standard "loop holonomy is trivial mod
 211    ℤ" statement: every closed walk in the recognition lattice has
 212    integer winding under `Θ`, and the wrapped phase is therefore
 213    invariant.
 214
 215    Stated here in the equivalent vertex-pair form: the wrapped phase of
 216    any vertex equals the wrapped phase of any other vertex it is
 217    connected to. -/
 218theorem gcic_global_phase_independent_of_path
 219    {adj : V → V → Prop}
 220    (hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 221    {lam : ℝ} (hlam : lam ≠ 0)
 222    {Θ : V → ℝ}
 223    (hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0)
 224    (v w : V)
 225    (_path1 _path2 : Relation.ReflTransGen adj v w) :
 226    wrapPhase (Θ v) = wrapPhase (Θ w) :=
 227  gcic_global_phase_unique hconn hlam hzero v w
 228
 229/-! ## §4. The canonical `lam = ln φ` instance -/
 230
 231/-- The canonical recognition-lattice base: `lam = ln φ`.  This is the
 232    base used by `gcic_kappa` (the GCIC stiffness constant in
 233    `ReducedPhasePotential`). -/
 234def lam_canonical : ℝ := Real.log Constants.phi
 235
 236/-- The canonical base is nonzero. -/
 237theorem lam_canonical_ne_zero : lam_canonical ≠ 0 := by
 238  unfold lam_canonical
 239  exact ne_of_gt (Real.log_pos Constants.one_lt_phi)
 240
 241/-- **Canonical instance of the GCIC theorem at `lam = ln φ`.**
 242
 243    This is the form actually used by the Anno Recognitionis §V argument:
 244    the recognition lattice operates at the φ-ratio, so `lam = ln φ` is
 245    the structurally forced base. -/
 246theorem gcic_canonical
 247    {adj : V → V → Prop}
 248    (hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 249    {Θ : V → ℝ}
 250    (hzero : ∀ v w, adj v w → Jtilde lam_canonical (Θ v - Θ w) = 0) :
 251    ∀ v w : V, wrapPhase (Θ v) = wrapPhase (Θ w) :=
 252  gcic_global_phase_unique hconn lam_canonical_ne_zero hzero
 253
 254/-! ## §5. Master certificate -/
 255
 256/-- **GCIC MASTER CERTIFICATE (arc 8).**
 257
 258    Five fields:
 259    1. The wrapping projection lands in `[0, 1)`.
 260    2. The wrapping projection is invariant under integer shifts.
 261    3. The global GCIC theorem holds at any nonzero base.
 262    4. There exists a single `Θ_global ∈ [0, 1)` shared by every vertex.
 263    5. The global phase is independent of basepoint. -/
 264structure GlobalCoIdentityConstraintCert (V : Type*) [Inhabited V] where
 265  wrap_in_unit_interval : ∀ x : ℝ, 0 ≤ wrapPhase x ∧ wrapPhase x < 1
 266  wrap_invariant_under_int : ∀ (x : ℝ) (n : ℤ),
 267    wrapPhase (x + (n : ℝ)) = wrapPhase x
 268  gcic_global_unique :
 269    ∀ {adj : V → V → Prop} (_hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 270      {lam : ℝ} (_hlam : lam ≠ 0) {Θ : V → ℝ}
 271      (_hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0)
 272      (v w : V), wrapPhase (Θ v) = wrapPhase (Θ w)
 273  gcic_global_existence :
 274    ∀ {adj : V → V → Prop} (_hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 275      {lam : ℝ} (_hlam : lam ≠ 0) {Θ : V → ℝ}
 276      (_hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0),
 277      ∃ Θ_global : ℝ,
 278        (0 ≤ Θ_global ∧ Θ_global < 1) ∧
 279        (∀ v : V, wrapPhase (Θ v) = Θ_global)
 280  gcic_basepoint_independent :
 281    ∀ {adj : V → V → Prop} (_hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 282      {lam : ℝ} (_hlam : lam ≠ 0) {Θ : V → ℝ}
 283      (_hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0)
 284      (b1 b2 : V), wrapPhase (Θ b1) = wrapPhase (Θ b2)
 285
 286/-- The master certificate is inhabited for any `Inhabited V`. -/
 287def gcicCert (V : Type*) [Inhabited V] : GlobalCoIdentityConstraintCert V where
 288  wrap_in_unit_interval := wrapPhase_bounds
 289  wrap_invariant_under_int := wrapPhase_add_int
 290  gcic_global_unique := @fun _adj hconn _lam hlam _Θ hzero v w =>
 291    gcic_global_phase_unique hconn hlam hzero v w
 292  gcic_global_existence := @fun _adj hconn _lam hlam _Θ hzero =>
 293    gcic_existence_of_global_phase hconn hlam hzero
 294  gcic_basepoint_independent := @fun _adj hconn _lam hlam _Θ hzero b1 b2 =>
 295    gcic_global_phase_independent_of_basepoint hconn hlam hzero b1 b2
 296
 297/-! ## §6. Single-statement summary -/
 298
 299/-- **GCIC ONE-STATEMENT THEOREM (arc 8).**
 300
 301    On any connected recognition lattice with vertex-type `V` and
 302    edge-wise zero reduced phase cost at any nonzero base `lam`, every
 303    pair of vertices has the same wrapped phase modulo 1, and there
 304    exists a single `Θ_global ∈ [0, 1)` shared by all vertices. -/
 305theorem gcic_one_statement
 306    {adj : V → V → Prop}
 307    (hconn : ∀ u v : V, Relation.ReflTransGen adj u v)
 308    {lam : ℝ} (hlam : lam ≠ 0)
 309    {Θ : V → ℝ}
 310    (hzero : ∀ v w, adj v w → Jtilde lam (Θ v - Θ w) = 0) :
 311    -- (1) Pairwise wrapped-phase equality.
 312    (∀ v w : V, wrapPhase (Θ v) = wrapPhase (Θ w)) ∧
 313    -- (2) Wrapped phase lands in [0, 1).
 314    (∀ v : V, 0 ≤ wrapPhase (Θ v) ∧ wrapPhase (Θ v) < 1) := by
 315  refine ⟨gcic_global_phase_unique hconn hlam hzero, ?_⟩
 316  intro v
 317  exact wrapPhase_bounds (Θ v)
 318
 319end
 320
 321end GlobalCoIdentityConstraint
 322end Foundation
 323end IndisputableMonolith
 324

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