AFTD Auto-Formalizing Theoretical Domains

ssss_primal_feasible

def

For a finite vertex set V with decidable equality, a set of directed edges E : Finset (V × V), terminals s, t ∈ V, and an integer k : ℕ, a flow vector x : V × V → ℝ is feasible for the LP relaxation (SSSS-P) if: (1) x(e) ≥ 0 for all e ∈ E; (2) for every vertex v ∈ V, the net inflow (sum of x(e) for e ∈ E entering v minus sum of x(e) for e ∈ E leaving v) equals -k if v = s, k if v = t, and 0 otherwise; and (3) for every non-empty subset U ⊆ V \ {s, t}, the sum of x(e) over all edges e ∈ E crossing U in either direction (having exactly one endpoint in U, i.e. (e.1 ∈ U ∧ e.2 ∉ U) ∨ (e.1 ∉ U ∧ e.2 ∈ U)) is at least 2.

Statement

def ssss_primal_feasible {V : Type*} [Fintype V] [DecidableEq V]
    (E : Finset (V × V)) (s t : V) (k : ℕ) (x : V × V → ℝ) : Prop
Defined in
arXiv:2611.26188, Section 3
Verified
20 Nov 2026
Axioms
none listed
Built on 1
  • ssss_cutsFor a finite vertex set V and vertices s, t ∈ V, ssss_cuts s t is the set of all non-empty subsets of V \ {s, t}.
Used by 2
  • ssss_weak_dualityFor any edge set E : Finset (V × V), edge costs c : V × V → ℝ, distinct terminals s ≠ t in V, and integer k : ℕ, if x : V × V → ℝ is…
  • ssss_is_primal_opt_valA real number LP is the optimal value of the LP relaxation (SSSS-P) for an edge set E : Finset (V × V), edge costs c : V × V → ℝ,…

Read back from the Lean

Given a finite type V with decidable equality, a set of directed edges E : Finset (V × V), vertices s, t : V, a natural number k, and an edge-weight function x : V × V → ℝ, ssss_primal_feasible E s t k x asserts that all three of the following conditions hold: 1. **Non-negativity on edges**: For every edge e ∈ E, x e ≥ 0. 2. **Flow conservation**: For every vertex v : V, the net inflow minus outflow along edges in E satisfies: ∑_{e ∈ E, e.2 = v} x e - ∑_{e ∈ E, e.1 = v} x e = (if v = s then -(k : ℝ) else if v = t then (k : ℝ) else 0). That is, s has net outflow k, t has net inflow k (when s ≠ t), and every other vertex has balanced inflow and outflow. 3. **Cut capacity lower bound**: For every non-empty subset U ⊆ V such that s ∉ U and t ∉ U (i.e., U ∈ ssss_cuts s t), the total weight of edges in E crossing the cut between U and V \ U (in either direction) is at least 2: 2 ≤ ∑_{e ∈ E, (e.1 ∈ U ∧ e.2 ∉ U) ∨ (e.1 ∉ U ∧ e.2 ∈ U)} x e.

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

/-- Primal feasibility for the Single-Source Single-Sink Multi-Path LP relaxation (SSSS-P). -/
def ssss_primal_feasible {V : Type*} [Fintype V] [DecidableEq V]
    (E : Finset (V × V)) (s t : V) (k : ℕ) (x : V × V → ℝ) : Prop :=
  (∀ e ∈ E, 0 ≤ x e) ∧
  (∀ v : V,
    (∑ e ∈ E.filter (fun e => e.2 = v), x e) - (∑ e ∈ E.filter (fun e => e.1 = v), x e) =
      if v = s then - (k : ℝ) else if v = t then (k : ℝ) else 0) ∧
  (∀ U ∈ ssss_cuts s t,
    2 ≤ ∑ e ∈ E.filter (fun e => (e.1 ∈ U ∧ e.2 ∉ U) ∨ (e.1 ∉ U ∧ e.2 ∈ U)), x e)
See it in the graphDiscuss this resultChallenge it