pith. machine review for the scientific record. sign in
structure

Window8

definition
show as:
view math explainer →
module
IndisputableMonolith.Algebra.LedgerAlgebra
domain
Algebra
line
111 · github
papers citing
none yet

open explainer

Generate a durable explainer page for this declaration.

open lean source

IndisputableMonolith.Algebra.LedgerAlgebra on GitHub at line 111.

browse module

All declarations in this module, on Recognition.

explainer page

Tracked in the explainer inventory; generation is lazy so crawlers do not trigger LLM jobs.

open explainer

depends on

used by

formal source

 108/-! ## §3. The Eight-Window Constraint -/
 109
 110/-- A **window** is a contiguous block of 8 events. -/
 111structure Window8 where
 112  /-- The 8 events in this window -/
 113  events : Fin 8 → LedgerEvent
 114
 115/-- The sum over a window. -/
 116def Window8.sum (w : Window8) : ℤ :=
 117  (Finset.univ.sum fun i => (w.events i).flow)
 118
 119/-- A window is **neutral** if its sum is zero. -/
 120def Window8.isNeutral (w : Window8) : Prop := w.sum = 0
 121
 122/-- **Construction: A neutral window from 4 paired events.** -/
 123def neutralWindow (e₁ e₂ e₃ e₄ : LedgerEvent) : Window8 where
 124  events := fun i =>
 125    match i with
 126    | ⟨0, _⟩ => e₁
 127    | ⟨1, _⟩ => e₁.conj
 128    | ⟨2, _⟩ => e₂
 129    | ⟨3, _⟩ => e₂.conj
 130    | ⟨4, _⟩ => e₃
 131    | ⟨5, _⟩ => e₃.conj
 132    | ⟨6, _⟩ => e₄
 133    | ⟨7, _⟩ => e₄.conj
 134
 135/-- **PROVED: A window of paired events is neutral.** -/
 136theorem neutralWindow_isNeutral (e₁ e₂ e₃ e₄ : LedgerEvent) :
 137    (neutralWindow e₁ e₂ e₃ e₄).isNeutral := by
 138  simp [Window8.isNeutral, Window8.sum, neutralWindow, LedgerEvent.conj, Fin.sum_univ_eight]
 139
 140/-! ## §4. The Graded Ledger -/
 141