AFTD Auto-Formalizing Theoretical Domains

is_feasible_flow

def

A signed flow F on Fin k is feasible for a demand vector a : Fin k → ℝ if F is skew-symmetric (F i j = -F j i for all i, j) and the net outgoing flow at each vertex i is ∑ j, F i j = a i.

Statement

def is_feasible_flow {k : ℕ} (F : Fin k → Fin k → ℝ) (a : Fin k → ℝ) : Prop
Defined in
arXiv:2611.05669, Section 4.1
Verified
06 Nov 2026
Axioms
none listed
Used by 2
  • is_feasible_flow_zeroFor any natural number k, the zero flow (fun _ _ => 0) on Fin k is a feasible flow for the zero demand vector 0 : Fin k → ℝ.
  • electrical_energyThe electrical energy E(a) of a demand vector a : Fin k → ℝ with respect to resistances d is the infimum of the flow energies…

Read back from the Lean

For a natural number $k$, a function $F : \mathrm{Fin}\ k \to \mathrm{Fin}\ k \to \mathbb{R}$, and a function $a : \mathrm{Fin}\ k \to \mathbb{R}$, is_feasible_flow F a asserts the conjunction of two conditions: 1. $F$ is skew-symmetric: for all $i, j \in \mathrm{Fin}\ k$, $F(i, j) = -F(j, i)$. 2. For all $i \in \mathrm{Fin}\ k$, the sum over all $j \in \mathrm{Fin}\ k$ of $F(i, j)$ equals $a(i)$ (i.e., $\sum_{j : \mathrm{Fin}\ k} F(i, j) = a(i)$).

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 flow F is feasible for demand vector a if F is skew-symmetric and has divergence a. -/
def is_feasible_flow {k : ℕ} (F : Fin k → Fin k → ℝ) (a : Fin k → ℝ) : Prop := (∀ i j : Fin k, F i j = -F j i) ∧ (∀ i : Fin k, ∑ j : Fin k, F i j = a i)
See it in the graphDiscuss this resultChallenge it