Documentation

LeanPool.Duality.LinearProgrammingB

We prove properties of "normal" linear programs as a corollary of properties of extended linear programs. The only exception is the weak duality theorem, which is proved separately, to allow weaker assumptions.

structure StandardLP (I : Type u_1) (J : Type u_2) (R : Type u_3) :
Type (max (max u_1 u_2) u_3)

Linear program in the standard form. Variables are of type J. Conditions are indexed by type I. The objective function is intended to be minimized.

  • A : Matrix I J R

    The left-hand-side matrix

  • b : IR

    The right-hand-side vector

  • c : JR

    The objective function coefficients

Instances For
    def coeNN {I : Type u_1} {R : Type u_2} [Zero R] [LE R] :
    (IR≥0)IR

    Coerce a vector of nonnegative values into a vector of the underlying ring.

    Equations
    Instances For
      @[implicit_reducible]
      instance instCoeForallNNegForall {I : Type u_1} {R : Type u_2} [Zero R] [LE R] :
      Coe (IR≥0) (IR)
      Equations
      def StandardLP.IsSolution {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Semiring R] [PartialOrder R] (P : StandardLP I J R) (x : JR≥0) :

      A nonnegative vector x is a solution to a linear program P iff its multiplication by matrix A from the left yields a vector whose all entries are less or equal to corresponding entries of the vector b.

      Equations
      Instances For
        def StandardLP.Reaches {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Semiring R] [PartialOrder R] (P : StandardLP I J R) (r : R) :

        Linear program P reaches objective value r iff there is a solution x such that, when its entries are elementwise multiplied by the the coefficients c and summed up, the result is the value r.

        Equations
        Instances For
          def StandardLP.IsFeasible {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Semiring R] [PartialOrder R] (P : StandardLP I J R) :

          Linear program P is feasible iff there exists a solution to P.

          Equations
          Instances For
            def StandardLP.IsBoundedBy {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Semiring R] [PartialOrder R] (P : StandardLP I J R) (r : R) :

            Linear program P is bounded by r iff every value reached by P is greater or equal to r (i.e., P is bounded by r from below).

            Equations
            Instances For
              def StandardLP.IsUnbounded {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Semiring R] [PartialOrder R] (P : StandardLP I J R) :

              Linear program P is unbounded iff values reached by P have no lower bound.

              Equations
              Instances For
                def StandardLP.dualize {I : Type u_1} {R : Type u_2} {J : Type u_3} [Ring R] (P : StandardLP I J R) :

                Dualize a linear program in the standard form. The matrix gets transposed and its values flip signs. The original objective function becomes the new right-hand-side vector. The original right-hand-side vector becomes the new objective function. Both linear programs are intended to be minimized.

                Equations
                Instances For
                  theorem Matrix.transpose_mulVec_dotProduct {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Fintype I] [CommSemiring R] (M : Matrix I J R) (v : IR) (w : JR) :
                  theorem StandardLP.weakDuality {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Fintype I] [CommRing R] [PartialOrder R] [IsOrderedRing R] {P : StandardLP I J R} {p : R} (hP : P.Reaches p) {q : R} (hQ : P.dualize.Reaches q) :
                  0 p + q
                  noncomputable def StandardLP.optimum {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Field R] [LinearOrder R] (P : StandardLP I J R) :

                  The "optimum" of "minimization LP" (the less the better).

                  Equations
                  Instances For
                    theorem StandardLP.optimum_neq_none {I : Type u_1} {R : Type u_2} {J : Type u_3} [Fintype J] [Field R] [LinearOrder R] [IsStrictOrderedRing R] [Finite I] (P : StandardLP I J R) :