Documentation

Tdaf.Analysis.Convex.LinearInequalities

Finite systems of linear inequalities #

Gale's theorem of the alternative for a finite system of weak linear inequalities and Motzkin's transposition theorem for a mixed system of strict and weak ones, the characterisation of the consequences of a consistent system, and Farkas' Lemma.

Farkas' Lemma is the bipolar identity K°° = K for the cone K generated by the coefficient vectors, which is closed because it is finitely generated (Minkowski–Weyl). Gale's theorem follows from it by homogenisation: the system ⟨aᵢ, x⟩ ≤ αᵢ is inconsistent exactly when (0, -1) lies in the cone of F × ℝ generated by the (aᵢ, αᵢ) together with (0, 1), since a point of the polar with a negative last coordinate rescales to a solution. Motzkin's theorem is then derived from the alternative for a system of convex inequalities with affine side constraints.

Main results #

References #

Conical combinations of a finite family #

theorem Tdaf.ConvexAnalysis.mem_pointedCone_hull_range_iff {F : Type u_1} [AddCommGroup F] [Module ℝ F] {ι : Type u_2} [Fintype ι] {a : ι → F} {x : F} :
x ∈ PointedCone.hull ℝ (Set.range a) ↔ ∃ (l : ι → ℝ), (∀ (i : ι), 0 ≤ l i) ∧ ∑ i : ι, l i • a i = x

Membership in the pointed-cone hull of a finite family, unfolded to a non-negative combination.

The cone generated by a finite family is closed: it is finitely generated, hence polyhedral (Weyl's half of Minkowski–Weyl), hence an intersection of finitely many closed half-spaces.

Farkas' Lemma #

theorem Tdaf.ConvexAnalysis.farkas_of_pairing {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {ι : Type u_3} [Fintype ι] (A : F →ₗ[ℝ] E →ₗ[ℝ] ℝ) [IsCompatiblePairing A] (a : ι → F) (a₀ : F) :
(∀ (x : E), (∀ (i : ι), (A (a i)) x ≤ 0) → (A a₀) x ≤ 0) ↔ ∃ (l : ι → ℝ), (∀ (i : ι), 0 ≤ l i) ∧ ∑ i : ι, l i • a i = a₀

Farkas' Lemma in the form the pairing calls for: an inequality ⟨a₀, x⟩ ≤ 0 is a consequence of the homogeneous system ⟨aᵢ, x⟩ ≤ 0 exactly when a₀ is a non-negative combination of the aᵢ. This is Rockafellar's remark that Farkas' Lemma is K°° = K for the cone K generated by the aᵢ. The coefficient vectors sit in the first space of the pairing, the orientation in which epiPairing's instances are found.

The alternative for a weak system #

theorem Tdaf.ConvexAnalysis.farkas {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {ι : Type u_3} [Fintype ι] [IsCompatiblePairing B.flip] (a : ι → F) (a₀ : F) :
(∀ (x : E), (∀ (i : ι), (B x) (a i) ≤ 0) → (B x) a₀ ≤ 0) ↔ ∃ (l : ι → ℝ), (∀ (i : ι), 0 ≤ l i) ∧ ∑ i : ι, l i • a i = a₀

Farkas' Lemma, in the orientation the rest of the development uses: the solution variable lives in E and the coefficient vectors in F.

theorem Tdaf.ConvexAnalysis.exists_multipliers_of_infeasible {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {ι : Type u_3} [Fintype ι] [IsCompatiblePairing B.flip] (a : ι → F) (α : ι → ℝ) (hno : ¬∃ (x : E), ∀ (i : ι), (B x) (a i) ≤ α i) :
∃ (l : ι → ℝ), (∀ (i : ι), 0 ≤ l i) ∧ ∑ i : ι, l i • a i = 0 ∧ ∑ i : ι, l i * α i < 0

The substantial half of Gale's theorem: an inconsistent finite system of weak linear inequalities carries non-negative multipliers that annihilate the coefficient vectors while making the right-hand sides negative. This is Farkas' Lemma applied in F × ℝ to the vectors (aᵢ, αᵢ) together with the extra generator (0, 1).

theorem Tdaf.ConvexAnalysis.alternative_linear_system {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] [FiniteDimensional ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {ι : Type u_3} [Fintype ι] [IsCompatiblePairing B.flip] (a : ι → F) (α : ι → ℝ) :
(∃ (x : E), ∀ (i : ι), (B x) (a i) ≤ α i) ↔ ¬∃ (l : ι → ℝ), (∀ (i : ι), 0 ≤ l i) ∧ ∑ i : ι, l i • a i = 0 ∧ ∑ i : ι, l i * α i < 0

Gale's theorem of the alternative. For a₁, …, a_m and α₁, …, α_m, one and only one of the following holds: the system ⟨aᵢ, x⟩ ≤ αᵢ has a solution, or there are non-negative λ₁, …, λ_m with ∑ λᵢaᵢ = 0 and ∑ λᵢαᵢ < 0. "One and only one" is recorded as an Iff with a negation on the right: the forward direction is the elementary exclusivity, the backward direction exists_multipliers_of_infeasible.

The alternative for a mixed system #

The affine function x ↦ ⟨x, y⟩ - c of a pairing, bundled as an AffineMap. The alternative for a convex system keeps its affine constraints as E →ᵃ[ℝ] ℝ, and this is the bundling that presents a linear inequality to it. affineFn is the same function read in EReal.

Equations
Instances For
    @[simp]
    theorem Tdaf.ConvexAnalysis.affineMapOfPairing_apply {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (y : F) (c : ℝ) (x : E) :
    (affineMapOfPairing B y c) x = (B x) y - c
    theorem Tdaf.ConvexAnalysis.pairing_sum_smul {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {ι : Type u_3} [Fintype ι] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (l : ι → ℝ) (a : ι → F) (x : E) :
    (B x) (∑ i : ι, l i • a i) = ∑ i : ι, l i * (B x) (a i)

    Pulling a non-negative combination of coefficient vectors through the pairing.

    theorem Tdaf.ConvexAnalysis.combined_value {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F] {ι : Type u_3} {κ : Type u_4} [Fintype ι] [Fintype κ] (B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ) (l : ι → ℝ) (a : ι → F) (α : ι → ℝ) (μ : κ → ℝ) (b : κ → F) (β : κ → ℝ) (x : E) :
    ∑ i : ι, l i * ((B x) (a i) - α i) + ∑ j : κ, μ j * ((B x) (b j) - β j) = (B x) (∑ i : ι, l i • a i + ∑ j : κ, μ j • b j) - (∑ i : ι, l i * α i + ∑ j : κ, μ j * β j)

    The value of a weighted mixed system at x, as one affine function of the pairing: the coefficient vector is ∑ λᵢaᵢ + ∑ μⱼbⱼ and the constant is ∑ λᵢαᵢ + ∑ μⱼβⱼ.

    theorem Tdaf.ConvexAnalysis.eq_zero_of_forall_pairing_eq_zero {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} [IsCompatiblePairing B.flip] {c : F} (h : ∀ (x : E), (B x) c = 0) :
    c = 0

    A pairing whose flip is compatible separates its second variable: only 0 pairs to 0 against every x. This is Hahn–Banach on F plus the surjectivity that IsCompatiblePairing asserts.

    theorem Tdaf.ConvexAnalysis.eq_zero_and_nonpos_of_forall_nonneg {E : Type u_1} {F : Type u_2} [AddCommGroup E] [Module ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} [IsCompatiblePairing B.flip] {c : F} {γ : ℝ} (h : ∀ (x : E), 0 ≤ (B x) c - γ) :
    c = 0 ∧ γ ≤ 0

    An affine function of the pairing that is non-negative on all of E is a non-negative constant: its linear part vanishes. This is the step that turns the multiplier alternative for a convex system into the multiplier condition of Motzkin's theorem.

    theorem Tdaf.ConvexAnalysis.alternative_linear_system_strict {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {ι : Type u_3} {κ : Type u_4} [Fintype ι] [Fintype κ] [IsCompatiblePairing B.flip] (a : ι → F) (α : ι → ℝ) (b : κ → F) (β : κ → ℝ) (hcons : ∃ (x : E), ∀ (j : κ), (B x) (b j) ≤ β j) :
    (∃ (x : E), (∀ (i : ι), (B x) (a i) < α i) ∧ ∀ (j : κ), (B x) (b j) ≤ β j) ↔ ¬∃ (l : ι → ℝ) (μ : κ → ℝ), (∀ (i : ι), 0 ≤ l i) ∧ (∀ (j : κ), 0 ≤ μ j) ∧ (∃ (i : ι), l i ≠ 0) ∧ ∑ i : ι, l i • a i + ∑ j : κ, μ j • b j = 0 ∧ ∑ i : ι, l i * α i + ∑ j : κ, μ j * β j ≤ 0

    Motzkin's transposition theorem. If the weak subsystem ⟨bⱼ, x⟩ ≤ βⱼ is consistent, then one and only one of the following holds: the mixed system ⟨aᵢ, x⟩ < αᵢ, ⟨bⱼ, x⟩ ≤ βⱼ has a solution, or there are non-negative multipliers with at least one of the λᵢ non-zero, ∑ λᵢaᵢ + ∑ μⱼbⱼ = 0 and ∑ λᵢαᵢ + ∑ μⱼβⱼ ≤ 0.

    theorem Tdaf.ConvexAnalysis.le_consequence_iff {E : Type u_1} {F : Type u_2} [NormedAddCommGroup E] [NormedSpace ℝ E] [FiniteDimensional ℝ E] [NormedAddCommGroup F] [NormedSpace ℝ F] {B : E →ₗ[ℝ] F →ₗ[ℝ] ℝ} {ι : Type u_3} [Fintype ι] [IsCompatiblePairing B.flip] (a : ι → F) (α : ι → ℝ) (a₀ : F) (α₀ : ℝ) (hcons : ∃ (x : E), ∀ (i : ι), (B x) (a i) ≤ α i) :
    (∀ (x : E), (∀ (i : ι), (B x) (a i) ≤ α i) → (B x) a₀ ≤ α₀) ↔ ∃ (l : ι → ℝ), (∀ (i : ι), 0 ≤ l i) ∧ ∑ i : ι, l i • a i = a₀ ∧ ∑ i : ι, l i * α i ≤ α₀

    The consequences of a consistent system. For a system ⟨aᵢ, x⟩ ≤ αᵢ with a solution, the inequality ⟨a₀, x⟩ ≤ α₀ is a consequence of the system exactly when a₀ is a non-negative combination ∑ λᵢaᵢ whose right-hand side ∑ λᵢαᵢ does not exceed α₀. The inequality fails to be a consequence exactly when the mixed system ⟨-a₀, x⟩ < -α₀, ⟨aᵢ, x⟩ ≤ αᵢ is solvable, so Motzkin's theorem applies and its multiplier on the strict inequality can be divided out.