Lemma 2.4 — solvability of a system a(ij) ≤ yᵢ + yⱼ ≤ b(ij) via walks
ProvedLovaszSchrijver.OddHole.two_var_system_infeasible_iffLet be a finite graph, let two values be associated with each edge , and let . Then the linear system
has no solution if and only if there exists a walk in (vertices not necessarily distinct, ) such that one of the following holds:
- (a) is odd and ;
- (b) is even, , and ;
- (c) is even, , and ;
- (d) is odd, , and .
The paper calls this a folklore lemma, "a criterion for the solvability of such a system, more combinatorial than the Farkas lemma". It is applied to the system on the entries of in the proof of Theorem 2.3.
Formalization Note Edge values are functions on unordered pairs, so . In (a)–(c) the alternating sum starts with on the first edge and alternates; in (d) it starts with . The hypothesis is stated as printed, although the application in the paper uses lower bounds that can be negative.
import Mathlib import Definitions.Def_LovaszSchrijver_OddHole_AlternatingWalk
namespace LovaszSchrijver.OddHole
/-- Lemma 2.4 (p. 178): for a finite graph `H = (W, F)` with values `0 ≤ a(ij) ≤ b(ij)` on its
edges and `U ⊆ W`, the system `a(ij) ≤ yᵢ + yⱼ ≤ b(ij)` (ij ∈ F), `yᵢ ≥ 0` (i ∈ W),
`yᵢ = 0` (i ∈ U) has no solution iff there is a walk `v₀, …, v_p` of one of the types
(a)–(d). -/
theorem two_var_system_infeasible_iff {W : Type} [Fintype W] (H : SimpleGraph W)
(a b : Sym2 W → ℝ) (hab : ∀ e ∈ H.edgeSet, 0 ≤ a e ∧ a e ≤ b e) (U : Finset W) :
(¬ ∃ y : W → ℝ,
(∀ i j, H.Adj i j → a s(i, j) ≤ y i + y j ∧ y i + y j ≤ b s(i, j)) ∧
(∀ i, 0 ≤ y i) ∧ (∀ i ∈ U, y i = 0)) ↔
∃ (p : ℕ) (v : Fin (p + 1) → W), IsWalkSeq H v ∧
((Odd p ∧ altB a b v < 0) ∨
(Even p ∧ v 0 = v (Fin.last p) ∧ altB a b v < 0) ∨
(Even p ∧ v (Fin.last p) ∈ U ∧ altB a b v < 0) ∨
(Odd p ∧ v 0 ∈ U ∧ v (Fin.last p) ∈ U ∧ altA a b v < 0)) := by sorry
end LovaszSchrijver.OddHole
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let be a simple graph on a finite vertex type . Let be real-valued functions on unordered pairs of vertices, and assume for every edge of . The values of and on non-edges are arbitrary and unconstrained. Let be a finite set of vertices.
The system. It asks for satisfying:
- for every edge ;
- for all ;
- for all .
The alternating sums. For a vertex sequence :
- , where edge number (counting from ) contributes if is even and if is odd;
- , where even-numbered edges contribute and odd-numbered edges contribute .
The statement. The system has no solution if and only if there exist and a walk in (consecutive vertices adjacent, repetitions allowed) satisfying at least one of:
- (a) is odd and ;
- (b) is even, , and ;
- (c) is even, , and ;
- (d) is odd, , , and .
Degenerate cases.
- . Both sums are , so no single-vertex walk witnesses any of (a)–(d).
- empty. The system is trivially solvable and no walk exists, so both sides are false.
- empty. Types (c) and (d) cannot occur.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.