AFTD Auto-Formalizing Theoretical Domains

is_stationary_current

def

A current j on the edges of an oriented finite simple graph G is stationary if at every vertex, the sum of currents leaving the vertex minus the sum of currents entering the vertex is zero.

Statement

def is_stationary_current {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (o : SimpleGraphOrientation G) (j : G.edgeFinset → ℝ) : Prop
Defined in
Bollobás, Modern Graph Theory (1998), Chapter II.1
Verified
11 Nov 2026
Axioms
none listed
Built on 1
  • SimpleGraphOrientationAn orientation of a finite simple graph G assigns to each edge an ordered pair of its endpoints.
Used by 4

Read back from the Lean

Given a finite type V with decidable equality, a simple graph G on V with decidable adjacency, an orientation o : SimpleGraphOrientation G, and a real-valued function on edges j : G.edgeFinset → ℝ, is_stationary_current G o j is the proposition that for every vertex v : V, the sum over all edges e ∈ G.edgeFinset of: (if (o.dir e).1 = v then j e else 0) - (if (o.dir e).2 = v then j e else 0) equals 0 (that is, the net current out of every vertex is zero, satisfying Kirchhoff's current law).

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- A current on an oriented simple graph is stationary (a circulation) if the net outgoing current at each vertex is zero. -/
def is_stationary_current {V : Type*} [Fintype V] [DecidableEq V]
    (G : SimpleGraph V) [DecidableRel G.Adj]
    (o : SimpleGraphOrientation G) (j : G.edgeFinset → ℝ) : Prop := ∀ v : V, ∑ e : G.edgeFinset,
    ((if (o.dir e).1 = v then j e else 0) - (if (o.dir e).2 = v then j e else 0)) = 0
See it in the graphDiscuss this resultChallenge it