Documentation

CslibFrontier.Foundations.Analysis.Convex.ExtendedFormulation

Extended formulations and Yannakakis's factorization theorem #

Let K be a linearly ordered field and P ⊆ K ^ ι a polytope described both by inequalities and as a convex hull: P = {x | A *ᵥ x ≤ b} = conv (range V) for A : Matrix μ ι K, b : μ → K and finitely many points V : ν → ι → K. Its slack matrix with respect to these descriptions is S i j = b i - A i ⬝ᵥ V j (Matrix.slackMatrix), which is entrywise nonnegative (Matrix.slackMatrix_nonneg).

An extended formulation (EF) of a set P ⊆ K ^ ι is a system of linear inequalities E *ᵥ x + F *ᵥ y ≤ g and linear equations E' *ᵥ x + F' *ᵥ y = g' in the original variables x and finitely many extra variables y, such that x ∈ P exactly when some y satisfies the system (IsExtendedFormulation). Its size is the number of inequalities; equations are free. The extension complexity xc P is the least size of an EF of P, or ⊤ if there is none (extensionComplexity). These are definition (1) and item 3 of Section 3 of [FMP+15].

Yannakakis's factorization theorem [Yan91] says that the extension complexity of a polytope is the nonnegative rank of its slack matrix: xc P = rank₊ S (extensionComplexity_eq_nonnegRank_slackMatrix). We follow the statement and proof of [FioriniMassarPokuttaTiwaryDeWolf2015, Theorem 3], equivalence of (i) and (iii) (arXiv version 1111.0837v4), which assumes dim P ≥ 1; here this is P.Nontrivial.

Both conventions matter. Equations must be free: the segment P = conv {0, e₀} ⊆ K ^ 2 has a slack matrix of nonnegative rank 2 (an EF x₁ = 0, 0 ≤ x₀, x₀ ≤ 1), but no system of only two inequalities and no equations in x and extra variables projects onto a nonempty bounded subset of K ^ 2. And the dimension hypothesis is needed for the equality in ℕ∞: for the point P = {0} ⊆ K described by x ≤ 0, -x ≤ 0 and the redundant x ≤ 1, the slack matrix has nonnegative rank 1, while the EF x = 0 has no inequalities, so xc P = 0. FMPTW state the equivalence for a positive number r of inequalities, and in that form it needs no dimension hypothesis, since the slack matrix of a set with at most one point has nonnegative rank at most 1 (extensionComplexity_le_iff_nonnegRank_slackMatrix_le); the point example fails only at r = 0.

Main definitions #

Main results #

References #

def Matrix.slackMatrix {K : Type u_1} {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Ring K] [Fintype ι] (A : Matrix μ ι K) (b : μ → K) (V : ν → ι → K) :
Matrix μ ν K

The slack matrix of the system A *ᵥ x ≤ b with respect to the points V j: the entry at i and j is the slack b i - A i ⬝ᵥ V j of the i-th inequality at the j-th point [FioriniMassarPokuttaTiwaryDeWolf2015, Section 3].

def IsExtendedFormulation {K : Type u_1} {ι : Type u_2} {σ : Type u_5} {κ : Type u_6} {τ : Type u_7} [Semiring K] [PartialOrder K] [Fintype ι] [Fintype κ] (P : Set (ι → K)) (E : Matrix σ ι K) (F : Matrix σ κ K) (g : σ → K) (E' : Matrix τ ι K) (F' : Matrix τ κ K) (g' : τ → K) :

The system E *ᵥ x + F *ᵥ y ≤ g, E' *ᵥ x + F' *ᵥ y = g' in the variables x : ι → K and the extra variables y : κ → K is an extended formulation of P: x ∈ P exactly when some y satisfies it [FioriniMassarPokuttaTiwaryDeWolf2015, definition (1)]. Its size is the number of inequalities, the cardinality of σ.

def HasExtendedFormulation {K : Type u_1} {ι : Type u_2} [Semiring K] [PartialOrder K] [Fintype ι] (P : Set (ι → K)) (r : ℕ) :

P has an extended formulation with r inequalities (and any finite numbers of extra variables and equations).

noncomputable def extensionComplexity {K : Type u_1} {ι : Type u_2} [Semiring K] [PartialOrder K] [Fintype ι] (P : Set (ι → K)) :

The extension complexity xc P: the least number of inequalities in an extended formulation of P, or ⊤ if P has none [FioriniMassarPokuttaTiwaryDeWolf2015, Section 3].

@[simp]
theorem Matrix.slackMatrix_apply {K : Type u_1} {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Ring K] [Fintype ι] (A : Matrix μ ι K) (b : μ → K) (V : ν → ι → K) (i : μ) (j : ν) :
A.slackMatrix b V i j = b i - A i ⬝ᵥ V j
theorem Matrix.slackMatrix_nonneg {K : Type u_1} {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Ring K] [PartialOrder K] [IsOrderedAddMonoid K] [Fintype ι] {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} (hV : ∀ (j : ν), A.mulVec (V j) ≤ b) (i : μ) (j : ν) :
0 ≤ A.slackMatrix b V i j

The slack matrix is nonnegative when the points satisfy the inequalities.

theorem IsExtendedFormulation.reindex {K : Type u_1} [Semiring K] [PartialOrder K] {ι : Type u_2} {σ : Type u_3} {κ : Type u_4} {τ : Type u_5} {σ' : Type u_6} {κ' : Type u_7} {τ' : Type u_8} [Fintype ι] [Fintype κ] [Fintype κ'] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} (h : IsExtendedFormulation P E F g E' F' g') (eσ : σ ≃ σ') (eκ : κ ≃ κ') (eτ : τ ≃ τ') :
IsExtendedFormulation P (E.submatrix (⇑eσ.symm) id) (F.submatrix ⇑eσ.symm ⇑eκ.symm) (g ∘ ⇑eσ.symm) (E'.submatrix (⇑eτ.symm) id) (F'.submatrix ⇑eτ.symm ⇑eκ.symm) (g' ∘ ⇑eτ.symm)

Renaming the inequalities, extra variables and equations of an extended formulation gives an extended formulation.

theorem IsExtendedFormulation.hasExtendedFormulation {K : Type u_1} [Semiring K] [PartialOrder K] {ι : Type u_2} {σ : Type u_3} {κ : Type u_4} {τ : Type u_5} [Fintype ι] [Fintype κ] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} [Fintype σ] [Finite τ] (h : IsExtendedFormulation P E F g E' F' g') :

An extended formulation with inequalities indexed by σ shows that P has one with |σ| inequalities.

theorem IsExtendedFormulation.extensionComplexity_le {K : Type u_1} [Semiring K] [PartialOrder K] {ι : Type u_2} {σ : Type u_3} {κ : Type u_4} {τ : Type u_5} [Fintype ι] [Fintype κ] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} [Fintype σ] [Finite τ] (h : IsExtendedFormulation P E F g E' F' g') :

An extended formulation with inequalities indexed by σ bounds the extension complexity by |σ|.

theorem le_extensionComplexity_iff {K : Type u_1} [Semiring K] [PartialOrder K] {ι : Type u_2} [Fintype ι] {P : Set (ι → K)} {c : ℕ∞} :

Lower bounds on the extension complexity are lower bounds on the number of inequalities of every extended formulation.

theorem isExtendedFormulation_setOf_mulVec_le {K : Type u_1} [Semiring K] [PartialOrder K] {ι : Type u_2} [Fintype ι] {μ : Type u_9} (A : Matrix μ ι K) (b : μ → K) :
IsExtendedFormulation {x : ι → K | A.mulVec x ≤ b} A 0 b 0 0 0

A polyhedron {x | A *ᵥ x ≤ b} is its own extended formulation, with no extra variables.

theorem extensionComplexity_setOf_mulVec_le_le {K : Type u_1} [Semiring K] [PartialOrder K] {ι : Type u_2} [Fintype ι] {μ : Type u_9} [Fintype μ] (A : Matrix μ ι K) (b : μ → K) :

The extension complexity of a polyhedron is at most its number of inequalities.

theorem IsExtendedFormulation.exists_nonneg_dotProduct_eq {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {σ : Type u_5} {κ : Type u_6} {τ : Type u_7} [Fintype ι] [Fintype σ] [Fintype κ] [Finite τ] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} (hEF : IsExtendedFormulation P E F g E' F' g') (hne : P.Nonempty) (c : ι → K) (δ : K) (hc : ∀ x ∈ P, c ⬝ᵥ x ≤ δ) :
∃ (w : σ → K), 0 ≤ w ∧ ∃ δ' ≤ δ, ∀ (x : ι → K) (y : κ → K), E'.mulVec x + F'.mulVec y = g' → w ⬝ᵥ (g - (E.mulVec x + F.mulVec y)) = δ' - c ⬝ᵥ x

Valid inequalities are derived from an extended formulation, up to a constant: if c ⬝ᵥ x ≤ δ on a nonempty set P with an extended formulation, then some nonnegative combination w of the slacks g - (E *ᵥ x + F *ᵥ y) of its inequalities equals δ' - c ⬝ᵥ x with δ' ≤ δ, whenever the equations hold. This is the affine Farkas lemma (Matrix.exists_dual_le_of_forall_le) for the system in the variables x and y.

theorem IsExtendedFormulation.exists_nonneg_dotProduct_eq_one {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {σ : Type u_5} {κ : Type u_6} {τ : Type u_7} [Fintype ι] [Fintype σ] [Fintype κ] [Finite τ] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} (hEF : IsExtendedFormulation P E F g E' F' g') (u : ι → K) {β β' : K} (hu : ∀ x ∈ P, u ⬝ᵥ x ≤ β) (hu' : ∀ x ∈ P, β' ≤ u ⬝ᵥ x) {x₁ x₂ : ι → K} (hx₁ : x₁ ∈ P) (hx₂ : x₂ ∈ P) (hlt : u ⬝ᵥ x₁ < u ⬝ᵥ x₂) :
∃ (w : σ → K), 0 ≤ w ∧ ∀ (x : ι → K) (y : κ → K), E'.mulVec x + F'.mulVec y = g' → w ⬝ᵥ (g - (E.mulVec x + F.mulVec y)) = 1

The constant 1 is derived from an extended formulation of a set on which some linear functional u is bounded above and below but not constant: some nonnegative combination of the slacks of its inequalities is identically 1 whenever the equations hold.

theorem IsExtendedFormulation.exists_nonneg_dotProduct_eq_sub {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {σ : Type u_5} {κ : Type u_6} {τ : Type u_7} [Fintype ι] [Fintype σ] [Fintype κ] [Finite τ] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} (hEF : IsExtendedFormulation P E F g E' F' g') (u : ι → K) {β β' : K} (hu : ∀ x ∈ P, u ⬝ᵥ x ≤ β) (hu' : ∀ x ∈ P, β' ≤ u ⬝ᵥ x) {x₁ x₂ : ι → K} (hx₁ : x₁ ∈ P) (hx₂ : x₂ ∈ P) (hlt : u ⬝ᵥ x₁ < u ⬝ᵥ x₂) (c : ι → K) (δ : K) (hc : ∀ x ∈ P, c ⬝ᵥ x ≤ δ) :
∃ (w : σ → K), 0 ≤ w ∧ ∀ (x : ι → K) (y : κ → K), E'.mulVec x + F'.mulVec y = g' → w ⬝ᵥ (g - (E.mulVec x + F.mulVec y)) = δ - c ⬝ᵥ x

Valid inequalities are derived exactly from an extended formulation of a set on which some linear functional u is bounded above and below but not constant: if c ⬝ᵥ x ≤ δ on P, some nonnegative combination of the slacks of the inequalities equals δ - c ⬝ᵥ x whenever the equations hold [FioriniMassarPokuttaTiwaryDeWolf2015, Lemma 2].

theorem dotProduct_le_of_mem_convexHull {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {ν : Type u_4} [Fintype ι] {V : ν → ι → K} {c : ι → K} {δ : K} (hV : ∀ (j : ν), c ⬝ᵥ V j ≤ δ) {x : ι → K} (hx : x ∈ (convexHull K) (Set.range V)) :
c ⬝ᵥ x ≤ δ

A linear functional bounded on the points V j is bounded on their convex hull.

theorem convexHull_range_subset_setOf_mulVec_le {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} (hV : ∀ (j : ν), A.mulVec (V j) ≤ b) :
(convexHull K) (Set.range V) ⊆ {x : ι → K | A.mulVec x ≤ b}

The convex hull of points satisfying A *ᵥ x ≤ b satisfies it.

theorem isExtendedFormulation_of_mul_eq_slackMatrix {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} {ρ : Type u_8} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Fintype ρ] [DecidableEq ρ] (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) {T : Matrix μ ρ K} {U : Matrix ρ ν K} (hT : ∀ (i : μ) (k : ρ), 0 ≤ T i k) (hU : ∀ (k : ρ) (j : ν), 0 ≤ U k j) (hTU : T * U = A.slackMatrix b V) :
IsExtendedFormulation P 0 (-1) 0 A T b

Nonnegative factorizations give extended formulations: if S = T * U is a nonnegative factorization of the slack matrix of P = {x | A *ᵥ x ≤ b} = conv (range V), then A *ᵥ x + T *ᵥ y = b, y ≥ 0 is an extended formulation of P in slack form, with one inequality per column of T [FioriniMassarPokuttaTiwaryDeWolf2015, proof of Theorem 3, (i) ⇒ (ii)].

theorem IsExtendedFormulation.hasNonnegFactorization_slackMatrix_of_forall_le {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} {σ : Type u_5} {κ : Type u_6} {τ : Type u_7} [Fintype ι] [Fintype σ] [Fintype κ] [Finite τ] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite ν] (hEF : IsExtendedFormulation P E F g E' F' g') (hA : ∀ x ∈ P, A.mulVec x ≤ b) (hV : P = (convexHull K) (Set.range V)) (hP : P.Nontrivial) :

Extended formulations give nonnegative factorizations, even when (A, b) is only a family of valid inequalities for P rather than a complete inequality description: an extended formulation of a nontrivial polytope P = conv (range V) with valid inequalities A *ᵥ x ≤ b on P gives a nonnegative factorization of A.slackMatrix b V through σ.

theorem IsExtendedFormulation.hasNonnegFactorization_slackMatrix {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} {σ : Type u_5} {κ : Type u_6} {τ : Type u_7} [Fintype ι] [Fintype σ] [Fintype κ] [Finite τ] {P : Set (ι → K)} {E : Matrix σ ι K} {F : Matrix σ κ K} {g : σ → K} {E' : Matrix τ ι K} {F' : Matrix τ κ K} {g' : τ → K} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite ν] (hEF : IsExtendedFormulation P E F g E' F' g') (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) (hP : P.Nontrivial) :

Extended formulations give nonnegative factorizations: an extended formulation of a nontrivial polytope P = {x | A *ᵥ x ≤ b} = conv (range V) with inequalities indexed by σ gives a nonnegative factorization of its slack matrix through σ [FioriniMassarPokuttaTiwaryDeWolf2015, proof of Theorem 3, (iii) ⇒ (i)].

theorem extensionComplexity_le_nonnegRank_slackMatrix {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite μ] (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) :

Extension complexity is at most the nonnegative rank of the slack matrix, for any P = {x | A *ᵥ x ≤ b} = conv (range V).

theorem nonnegRank_slackMatrix_le_extensionComplexity_of_forall_le {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite ν] (hA : ∀ x ∈ P, A.mulVec x ≤ b) (hV : P = (convexHull K) (Set.range V)) (hP : P.Nontrivial) :

The nonnegative rank of a slack matrix of valid inequalities is at most the extension complexity, for any nontrivial polytope P = conv (range V) with A *ᵥ x ≤ b valid on P.

theorem nonnegRank_slackMatrix_le_extensionComplexity {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite ν] (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) (hP : P.Nontrivial) :

The nonnegative rank of the slack matrix is at most the extension complexity, for a nontrivial polytope P = {x | A *ᵥ x ≤ b} = conv (range V).

theorem extensionComplexity_eq_nonnegRank_slackMatrix {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite μ] [Finite ν] (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) (hP : P.Nontrivial) :

Yannakakis's factorization theorem. The extension complexity of a nontrivial polytope P = {x | A *ᵥ x ≤ b} = conv (range V), with finitely many inequalities and points, is the nonnegative rank of its slack matrix [Yan91]; [FioriniMassarPokuttaTiwaryDeWolf2015, Theorem 3, (i) ⇔ (iii)]. The hypothesis P.Nontrivial is their dim P ≥ 1. FMPTW quantify over a positive number r of inequalities; this equality also covers r = 0, where the hypothesis cannot be dropped (see the module docstring). For positive r and any P, see extensionComplexity_le_iff_nonnegRank_slackMatrix_le.

theorem nonnegRank_slackMatrix_le_one {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) (hP : P.Subsingleton) :

The slack matrix of a set P = {x | A *ᵥ x ≤ b} = conv (range V) with at most one point has nonnegative rank at most 1: all its columns are equal and nonnegative.

theorem extensionComplexity_le_iff_nonnegRank_slackMatrix_le {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite μ] [Finite ν] (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) {r : ℕ} (hr : 0 < r) :

Yannakakis's factorization theorem, for a positive number of inequalities. A polytope P = {x | A *ᵥ x ≤ b} = conv (range V), with finitely many inequalities and points, has an extended formulation with at most r > 0 inequalities exactly when its slack matrix has nonnegative rank at most r [Yan91]; [FioriniMassarPokuttaTiwaryDeWolf2015, Theorem 3, (i) ⇔ (iii)]. Unlike extensionComplexity_eq_nonnegRank_slackMatrix, this needs no dimension hypothesis: when P has at most one point, both sides hold (nonnegRank_slackMatrix_le_one).

theorem extensionComplexity_le_card_points {K : Type u_1} [Field K] [LinearOrder K] [IsStrictOrderedRing K] {ι : Type u_2} {μ : Type u_3} {ν : Type u_4} [Fintype ι] {P : Set (ι → K)} {A : Matrix μ ι K} {b : μ → K} {V : ν → ι → K} [Finite μ] [Fintype ν] (hA : P = {x : ι → K | A.mulVec x ≤ b}) (hV : P = (convexHull K) (Set.range V)) :

The extension complexity of P = {x | A *ᵥ x ≤ b} = conv (range V) is at most the number of points V j.