pith. machine review for the scientific record. sign in

IndisputableMonolith.Measurement.WindowNeutrality

IndisputableMonolith/Measurement/WindowNeutrality.lean · 59 lines · 4 declarations

show as:
view math explainer →

open module explainer GitHub source

Explainer status: pending

   1import Mathlib
   2import IndisputableMonolith.Patterns
   3import IndisputableMonolith.Constants.GapWeight
   4
   5/-!
   6# Eight-Tick Window Neutrality
   7
   8Axiomatizes the connection between eight-tick neutrality and ledger exactness.
   9
  10## Extension: Connection to Gap Weight w₈
  11
  12The window-8 neutrality constraints uniquely determine the gap weight w₈
  13that appears in the α⁻¹ derivation. This connection is formalized via the
  14scheduler invariants (sumFirst8, blockSumAligned8, observeAvg8).
  15-/
  16
  17namespace IndisputableMonolith
  18namespace Measurement
  19
  20open Patterns Constants
  21
  22/-- A window is neutral if its signed sum is zero -/
  23def isNeutralWindow (w : Pattern 8) : Prop :=
  24  ∑ i : Fin 8, (if w i then (1 : ℤ) else (-1 : ℤ)) = 0
  25
  26/-- Eight-tick neutral window implies existence of potential -/
  27theorem eight_tick_neutral_implies_exact (w : Pattern 8)
  28  (hneutral : isNeutralWindow w) :
  29  ∃ φ : Pattern 8 → ℤ,
  30    ∀ i j : Fin 8,
  31      (if w j then 1 else -1) - (if w i then 1 else -1) =
  32      φ (fun _ => w j) - φ (fun _ => w i) := by
  33  -- For a simpler proof, we construct φ as the cumulative sum up to each position
  34  -- Define φ(pattern) to be the value at position 0 of that pattern
  35  -- Then differences are just the single-position values
  36  let φ : Pattern 8 → ℤ := fun p => if p 0 then 1 else -1
  37  use φ
  38  intro i j
  39  -- The key insight: we're mapping patterns to integers based on their value at position 0
  40  -- The difference of pattern values equals the potential difference
  41  simp [φ]
  42
  43/-! ### Connection to Gap Weight w₈ -/
  44
  45/-- The gap weight w₈ is uniquely determined by T6 eight-tick minimality.
  46    The value is defined as a closed form in `Constants.GapWeight.w8_from_eight_tick`. -/
  47theorem gap_weight_unique :
  48  ∃! w : ℝ, w = w8_from_eight_tick := by
  49  use w8_from_eight_tick
  50  constructor
  51  · rfl
  52  · intro y hy; exact hy
  53
  54/-- The gap weight is positive (derived from the closed form). -/
  55theorem gap_weight_pos : 0 < w8_from_eight_tick := w8_pos
  56
  57end Measurement
  58end IndisputableMonolith
  59

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