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

neutralWindow

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

open explainer

Read the cached plain-language explainer.

open lean source

IndisputableMonolith.Algebra.LedgerAlgebra on GitHub at line 123.

browse module

All declarations in this module, on Recognition.

explainer page

A cached Ask Recognition explainer exists for this declaration.

open explainer

depends on

used by

formal source

 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
 142/-- A **graded ledger** assigns events to vertices of a graph.
 143    The grading ensures conservation at each node:
 144    inflow = outflow at every vertex. -/
 145structure GradedLedger where
 146  /-- Number of vertices -/
 147  n : ℕ
 148  /-- Events on edges (indexed by source, target) -/
 149  edges : Fin n → Fin n → ℤ
 150  /-- Conservation at each vertex: inflow = outflow -/
 151  conservation : ∀ v : Fin n,
 152    (Finset.univ.sum fun u => edges u v) =
 153    (Finset.univ.sum fun w => edges v w)