EconCSLib.Math.LinearProgramming.StrongComplementarity #
Formalises LP strong complementary slackness [MFoGT, Section 2.8, Exercise 11] over any linearly ordered field.
For the standard-form primal/dual pair
Primal P: min ⟨c, x⟩ subject to A x ≥ b and x ≥ 0 Dual D: max ⟨u, b⟩ subject to uᵀ A ≤ c and u ≥ 0
if both are feasible, then there exist optimal x and u such that
(Ax − b)_i > 0 ⟺ u_i = 0, for every row i, (c − uᵀA)_j > 0 ⟺ x_j = 0, for every column j.
That is, for every complementary pair (primal slack on row i, dual variable u_i; resp. dual slack on column j, primal variable x_j), exactly one of the two is strictly positive in some optimal pair.
Proof strategy #
The hard direction (strong content) follows from LP strong duality applied to a perturbed LP, then combined across all constraints by convex aggregation. The easy direction is weak complementary slackness, which is a direct consequence of any optimal pair.
This file proves:
lp_weak_complementarity— the easy direction (strict slack ⇒ zero variable), holds for every optimal primal-dual pair.exists_lp_strong_complementarity— the existence form of the full bidirectional strong complementarity.
Blueprint #
docs/knowledge/nodes/core/linear_programming.strong_complementarity.md
Weak complementary slackness #
For any optimal primal-dual pair (x, u) with matching objective
values, the standard CS identities hold:
(Ax − b)_i · u_i = 0 for every row i, (c − uᵀA)_j · x_j = 0 for every column j.
Equivalently: strict primal slack forces the corresponding dual variable to vanish, and strict dual slack forces the corresponding primal variable to vanish.
Weak complementary slackness, row form.
Weak complementary slackness, column form.
Optimality-augmented system #
For the per-index strong-CS dichotomy we apply Farkas to the system
encoding "primal-optimal x": A x ≥ b, x ≥ 0, ⟨c, x⟩ ≤ v. The
augmented row index is (I ⊕ Fin n) ⊕ Unit:
Optimality-augmented matrix.
Equations
- EconCSLib.LinearProgramming.optAugA A c (Sum.inl (Sum.inl i)) x✝ = A i x✝
- EconCSLib.LinearProgramming.optAugA A c (Sum.inl (Sum.inr j')) x✝ = if x✝ = j' then 1 else 0
- EconCSLib.LinearProgramming.optAugA A c (Sum.inr PUnit.unit) x✝ = -c x✝
Instances For
Optimality-augmented RHS.
Equations
- EconCSLib.LinearProgramming.optAugB b v (Sum.inl (Sum.inl i)) = b i
- EconCSLib.LinearProgramming.optAugB b v (Sum.inl (Sum.inr val)) = 0
- EconCSLib.LinearProgramming.optAugB b v (Sum.inr PUnit.unit) = -v
Instances For
An x satisfies optAugA · x ≥ optAugB iff x is primal-feasible and
has objective at most v.
Per-row dichotomy #
For each fixed row i₀, there exists an optimal primal-dual pair
(x, u) with the row complementarity sum (Ax - b)_{i₀} + u_{i₀}
strictly positive.
This is the key step that upgrades weak CS to strong CS at one specific row. The proof is by classical case analysis:
Per-row strict-CS witness: for each row i₀, there exists an
optimal primal-dual pair with (Ax - b)_{i₀} + u_{i₀} > 0.
Hypotheses:
hx₀—x₀is primal-feasible with⟨c, x₀⟩ = v(primal-optimal).hu₀—u₀is dual-feasible with⟨u₀, b⟩ = v(dual-optimal).
Both x₀ and u₀ exist by LP strong duality when both P and D are
feasible.
Per-column dichotomy #
For each fixed column j₀, there exists an optimal primal-dual pair
(x, u) with the column complementarity sum x_{j₀} + (c - uᵀA)_{j₀}
strictly positive.
We reuse the primal augmented system optAugA/optAugB (so the
variable type stays Fin n as required by farkas_lemma), with cost
vector -e_{j₀} on the primal-feasibility set:
Per-column strict-CS witness: for each column j₀, there exists
an optimal primal-dual pair with x_{j₀} + (c - uᵀA)_{j₀} > 0.
Strong complementarity: main theorem #
Given an optimal primal-dual pair (x₀, u₀) with common value v, the
per-index dichotomies produce Fintype.card I + n witness pairs, one
strict at each row and each column. Convex combination (averaging)
preserves optimality and gives a single pair strict at every index.
LP Strong Complementarity [MFoGT, Section 2.8, Exercise 11]:
given an optimal primal-dual pair (x₀, u₀) with common value v,
there exists an optimal pair (x*, u*) such that for every row
i ∈ I and column j ∈ Fin n, the row complementarity sum
(Ax* - b)_i + u*_i and the column complementarity sum
x*_j + (c - u*ᵀA)_j are strictly positive. Combined with weak
complementary slackness, this is the strict biconditional form.