Nonnegative equality form of a linear inequality system #
Matrix.nonnegForm A = [A, -A, I] replaces unrestricted variables by positive and negative
parts and inequalities by equalities with nonnegative slack variables. The transformation
works over ordered rings, including the integers, without division.
theorem Matrix.nonnegForm_map {m : Type u_1} {n : Type u_2} {R : Type u_3} [DecidableEq m] [Ring R] {S : Type u_4} [Ring S] (A : Matrix m n R) (f : R →+* S) :
Changing coefficients by a ring homomorphism commutes with the nonnegative-form matrix.
theorem Matrix.nonnegForm_solution {m : Type u_1} {n : Type u_2} {R : Type u_3} [Fintype m] [Fintype n] [DecidableEq m] [Ring R] [LinearOrder R] [IsStrictOrderedRing R] {A : Matrix m n R} {b : m → R} {x : n → R} (hx : A.mulVec x ≤ b) :
An inequality solution yields a nonnegative equality solution by splitting variables into positive and negative parts and introducing the residual as slack.