Fourier–Motzkin elimination

Lax109476.FourierMotzkin · concepts/Lax109476/FourierMotzkin.lean · lax-109476

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    One variable can be eliminated from a finite system of real linear inequalities by nonnegative combinations of its rows. Pair each row with positive coefficient of the eliminated variable with each row with negative coefficient, and retain the rows with zero coefficient. The resulting finite system describes exactly the projection of the original feasible set: a retained vector satisfies it exactly when some eliminated coordinate extends that same vector to a solution of the original system.

    Concept map
    1 concept
    100%
    Proven claimThis concept
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Mathlib.Data.Matrix.Mul
    2import Mathlib.Data.Real.Basic
    3
    4/-!
    5---
    6title: Fourier–Motzkin elimination
    7type: theorem
    8---
    9One variable can be eliminated from a finite system of real linear
    10inequalities by nonnegative combinations of its rows. Pair each row with
    11positive coefficient of the eliminated variable with each row with negative
    12coefficient, and retain the rows with zero coefficient. The resulting finite
    13system describes exactly the projection of the original feasible set: a
    14retained vector satisfies it exactly when some eliminated coordinate extends
    15that same vector to a solution of the original system.
    16
    17# Formalization notes
    18
    19The variables in this elimination step are unrestricted. Nonnegative
    20variables are represented by additional inequalities when deriving Farkas'
    21lemma. The matrix MM gives the nonnegative row combinations. Its last
    22column in MAMA is zero, and the remaining columns describe the reduced
    23system. This is an algebraic elimination theorem, with no polynomial-time
    24claim: repeated elimination may produce exponentially many inequalities.
    25-/
    26
    27namespace Lax109476.FourierMotzkin
    28
    29/-- Eliminate the last variable using nonnegative row combinations. -/
    30axiom exists_elimination :
    31 ∀ (m : Type) [Fintype m] (n : ℕ)
    32 (A : Matrix m (Fin (n + 1)) ℝ) (b : m → ℝ),
    33 ∃ κ : Type, ∃ _ : Fintype κ, ∃ M : Matrix κ m ℝ,
    34 (∀ i j, 0 ≤ M i j) ∧
    35 (∀ i, (M * A) i (Fin.last n) = 0) ∧
    36 (∀ x' : Fin n → ℝ,
    37 (M * (A.submatrix id Fin.castSucc)).mulVec x' ≤ M.mulVec b ↔
    38 ∃ t : ℝ, A.mulVec (Fin.lastCases t x') ≤ b)
    39
    40end Lax109476.FourierMotzkin
    41
    Show Proof
    Formalization notes

    The variables in this elimination step are unrestricted. Nonnegative variables are represented by additional inequalities when deriving Farkas' lemma. The matrix MM gives the nonnegative row combinations. Its last column in MAMA is zero, and the remaining columns describe the reduced system. This is an algebraic elimination theorem, with no polynomial-time claim: repeated elimination may produce exponentially many inequalities.

    Builds on

    none

    Used by

    none

    From Mathlib

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…