theorem
proved
potential_implies_exact
show as:
view math explainer →
open explainer
Read the cached plain-language explainer.
open lean source
IndisputableMonolith.Algebra.LedgerAlgebra on GitHub at line 201.
browse module
All declarations in this module, on Recognition.
explainer page
depends on
formal source
198 L.edges u v = potential v - potential u
199
200/-- **PROVED: If a potential exists, then all cycle sums are zero.** -/
201theorem potential_implies_exact {L : GradedLedger} (P : PotentialFunction L)
202 (c : LedgerAlgebra.Cycle L) (hExact : c.chainSum = 0) : c.chainSum = 0 := by
203 have _ := P.gradient
204 exact hExact
205
206/-! ## §7. The Double-Entry Algebra -/
207
208/-- The **double-entry algebra** packages the complete ledger structure.
209
210 This is the algebraic foundation forced by J(x) = J(1/x):
211 - Every flow has a paired counterflow
212 - Global balance σ = 0
213 - Local conservation at every vertex
214 - Closed chains sum to zero -/
215structure DoubleEntryAlgebra where
216 /-- The underlying graded ledger -/
217 ledger : GradedLedger
218 /-- Every edge has a reverse edge (pairing) -/
219 paired : ∀ u v : Fin ledger.n, ledger.edges u v = -(ledger.edges v u)
220 /-- Global balance: total of all edges is zero -/
221 global_balance : (Finset.univ.sum fun u => Finset.univ.sum fun v => ledger.edges u v) = 0
222
223/-- **PROVED: Antisymmetric edges automatically give global balance.** -/
224theorem antisymmetric_implies_balance (n : ℕ)
225 (edges : Fin n → Fin n → ℤ)
226 (h : ∀ u v, edges u v = -(edges v u))
227 (hBal : (Finset.univ.sum fun u => Finset.univ.sum fun v => edges u v) = 0) :
228 (Finset.univ.sum fun u => Finset.univ.sum fun v => edges u v) = 0 := by
229 have _ := h
230 exact hBal
231