Documentation

EconCSLib.Math.LinearProgramming.StrongDuality

EconCSLib.Math.LinearProgramming.StrongDuality #

Formalises LP strong duality [MFoGT, Section 2.8, Exercise 9] over any linearly ordered field.

For the standard-form LP 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 the primal is feasible and bounded below by d𝕜, there exists a dual-feasible u with ⟨u, b⟩ ≥ d. Combined with weak duality this yields equal primal/dual optima.

Proof strategy #

Apply Farkas (#69) to the augmented system that merges A xb with the non-negativity constraints x0. The augmented row index is IFin n: the original I rows are unchanged, and each Fin n row is the unit row x_{j'} ≥ 0. The primal lower-bound hypothesis becomes a Farkas primal bound on the augmented system, and the Farkas certificate decomposes into (u, v) where u : I𝕜 is the dual feasible point and v : Fin n𝕜 is the slack on the non-negativity constraints (with uᵀA + v = c, hence uᵀA ≤ c).

Blueprint #

Standard-form primal / dual predicates #

def EconCSLib.LinearProgramming.PrimalFeasible {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] {I : Type u_2} {n : } (A : IFin n𝕜) (b : I𝕜) :

Primal feasibility: ∃ x, A xbx0.

Equations
Instances For
    def EconCSLib.LinearProgramming.DualFeasible {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] {I : Type u_2} [Fintype I] {n : } (A : IFin n𝕜) (c : Fin n𝕜) (u : I𝕜) :

    Dual feasibility of u: u0 ∧ uᵀA ≤ c.

    Equations
    Instances For

      Weak duality #

      For any primal-feasible x and dual-feasible u, ⟨c, x⟩ ≥ ⟨u, b⟩.

      theorem EconCSLib.LinearProgramming.lp_weak_duality {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {I : Type u_2} [Fintype I] [DecidableEq I] {n : } (A : IFin n𝕜) (b : I𝕜) (c : Fin n𝕜) {x : Fin n𝕜} (hxA : ∀ (i : I), b i j : Fin n, A i j * x j) (hxnn : ∀ (j : Fin n), 0 x j) {u : I𝕜} (hu_du : DualFeasible A c u) :
      i : I, u i * b i j : Fin n, c j * x j

      Augmented system for strong duality #

      To reduce LP strong duality to Farkas, augment the primal A xb with unit rows x_{j'} ≥ 0. The augmented row index is IFin n.

      @[reducible, inline]

      Augmented row index for the LP-Farkas reduction.

      Equations
      Instances For
        def EconCSLib.LinearProgramming.dualAugA {𝕜 : Type u_1} [Field 𝕜] {I : Type u_2} {n : } (A : IFin n𝕜) :
        DualAugRow I nFin n𝕜

        Augmented matrix combining A rows with x0 unit rows.

        Equations
        Instances For
          def EconCSLib.LinearProgramming.dualAugB {𝕜 : Type u_1} [Field 𝕜] {I : Type u_2} {n : } (b : I𝕜) :
          DualAugRow I n𝕜

          Augmented RHS.

          Equations
          Instances For
            @[simp]
            theorem EconCSLib.LinearProgramming.dualAugA_inl {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {I : Type u_2} [Fintype I] [DecidableEq I] {n : } (A : IFin n𝕜) (i : I) (j : Fin n) :
            dualAugA A (Sum.inl i) j = A i j
            @[simp]
            theorem EconCSLib.LinearProgramming.dualAugA_inr {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {I : Type u_2} [Fintype I] [DecidableEq I] {n : } (A : IFin n𝕜) (j' j : Fin n) :
            dualAugA A (Sum.inr j') j = if j = j' then 1 else 0
            @[simp]
            theorem EconCSLib.LinearProgramming.dualAugB_inl {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {I : Type u_2} [Fintype I] [DecidableEq I] {n : } (b : I𝕜) (i : I) :
            dualAugB b (Sum.inl i) = b i
            @[simp]
            theorem EconCSLib.LinearProgramming.dualAugB_inr {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {I : Type u_2} [Fintype I] [DecidableEq I] {n : } (b : I𝕜) (j' : Fin n) :
            dualAugB b (Sum.inr j') = 0
            theorem EconCSLib.LinearProgramming.isFeasible_dualAug_iff {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {I : Type u_2} [Fintype I] [DecidableEq I] {n : } (A : IFin n𝕜) (b : I𝕜) :

            Augmented feasibility is the primal feasibility (with x0).

            Strong duality #

            theorem EconCSLib.LinearProgramming.lp_strong_duality {𝕜 : Type u_1} [Field 𝕜] [LinearOrder 𝕜] [IsStrictOrderedRing 𝕜] {I : Type u_2} [Fintype I] [DecidableEq I] {n : } (A : IFin n𝕜) (b : I𝕜) (c : Fin n𝕜) (d : 𝕜) (hP_feas : PrimalFeasible A b) (hP_bound : ∀ (x : Fin n𝕜), (∀ (i : I), b i j : Fin n, A i j * x j)(∀ (j : Fin n), 0 x j)d j : Fin n, c j * x j) :
            ∃ (u : I𝕜), DualFeasible A c u d i : I, u i * b i

            LP Strong Duality [MFoGT, Section 2.8, Exercise 9]: if the primal LP min ⟨c, x⟩ s.t. A x ≥ b, x0 is feasible and bounded below by d, then there exists a dual-feasible u with ⟨u, b⟩ ≥ d.