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

PotentialFunction

definition
show as:
view math explainer →
module
IndisputableMonolith.Algebra.LedgerAlgebra
domain
Algebra
line
193 · 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 193.

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

 190
 191    This is the algebraic statement: w = ∇φ, where φ : V → ℤ is unique
 192    up to an additive constant on each connected component. -/
 193structure PotentialFunction (L : GradedLedger) where
 194  /-- The potential at each vertex -/
 195  potential : Fin L.n → ℤ
 196  /-- Edge weight = potential difference -/
 197  gradient : ∀ u v : Fin L.n,
 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.** -/