Duality theory in linear optimization and its extensions -- formally verified

Duality theory in linear optimization and its extensions -- formally verified
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Farkas established that a system of linear inequalities has a solution if and only if we cannot obtain a contradiction by taking a linear combination of the inequalities. We state and formally prove several Farkas-like theorems over linearly ordered fields in Lean 4. Furthermore, we extend duality theory to the case when some coefficients are allowed to take “infinite values”.


💡 Research Summary

The paper presents a fully formalized treatment of classic duality results in linear optimization, extending them to settings where coefficients may take infinite values. Using the Lean 4 proof assistant and the Mathlib library, the authors mechanize proofs of several Farkas‑type theorems and strong duality, and they introduce a new framework for linear programs over an “extended” linearly ordered field that includes two distinguished elements, ⊤ (positive infinity) and ⊥ (negative infinity).

The first contribution revisits the well‑known Farkas lemmas (equalityFarkas and inequalityFarkas). While the traditional statements assume a finite matrix A : (I × J) → F over a linearly ordered field F, the authors adopt Bartl’s more abstract viewpoint: A is an R‑linear map from (I → R) to (J → R) and b is an R‑linear map from (I → R) to R, where R is a linearly ordered division ring. This formulation allows I to be an arbitrary (possibly infinite) type, while J remains finite. The paper proves a “coordinateFarkasBartl” theorem that exactly mirrors the classical alternative, and then derives further generalizations (almostFarkasBartl and fintypeFarkasBartl) by replacing the domain with a general R‑module W and allowing the codomain of b to be a linearly ordered R‑module V whose order is compatible with scalar multiplication by non‑negative elements. These results subsume the classical matrix‑based lemmas and demonstrate that the alternative holds in a much broader algebraic context.

The second major contribution is the definition of an extended linearly ordered field F∞ = F ∪ {⊥, ⊤}. The ordering is ⊥ < p < ⊤ for all p ∈ F. Arithmetic is defined so that ⊥ + ⊤ = ⊥ and 0·⊥ = ⊥, while all other operations behave as in the underlying field when both arguments are finite. Although F∞ is not a field (it lacks additive inverses for ⊥ and ⊤), it is a densely ordered abelian monoid with characteristic zero, sufficient for the authors’ purposes. Within this setting they prove an “extendedFarkas” theorem. The theorem requires four safety conditions on the matrix A and vector b: no row or column may contain both ⊥ and ⊤, and rows containing ⊤ (resp. ⊥) must not have a corresponding entry ⊤ (resp. ⊥) in b. Under these hypotheses, exactly one of the following holds: (i) there exists a non‑negative vector x with A·x ≤ b, or (ii) there exists a non‑negative vector y with (−Aᵀ)·y ≤ 0 and b·y < 0. The sign reversal on Aᵀ is essential because, with infinities, the usual condition Aᵀ·y ≥ 0 is no longer equivalent.

Building on this, the authors define an “extended linear program” (ELP) over F∞. An ELP consists of a matrix A, a right‑hand side vector b, and a cost vector c, all possibly containing ⊤ or ⊥. Feasibility, unboundedness, and optimal value are re‑interpreted: if the program is infeasible the optimum is ⊤; if it is unbounded the optimum is ⊥; otherwise the optimum is a finite real number. A program is called “valid” if it satisfies six conditions mirroring those of extendedFarkas, now also involving the cost vector c (e.g., no ⊤ in any column where c has ⊥, etc.). The dual of a valid program P = (A, b, c) is defined as D = (−Aᵀ, c, b). The central theorem, “ValidELP.strongDuality”, states that for any valid ELP, both primal and dual optima are defined, and if at least one is feasible then the primal optimum equals the negative of the dual optimum (P⋆ = −D⋆). This is the analogue of the classic strong duality theorem, but it holds under the minimal set of safety conditions required for infinite coefficients. The authors also show that dropping any of the six conditions yields counter‑examples, confirming the necessity of each.

To illustrate the theory, the paper revisits the classic diet problem (minimizing cost of rice and lentils subject to protein and calorie requirements). By assigning an infinite cost to a commodity that is out of stock, the original linear program automatically forces the corresponding decision variable to zero, without manually removing columns or inserting arbitrarily large constants. The dual program reflects the same infinite coefficient, and the optimal values of primal and dual match the prediction of ValidELP.strongDuality, confirming that the extended framework behaves as intended in a concrete scenario.

The remainder of the paper details the formal development: Section 2 reviews the algebraic type‑classes (additive semigroups, monoids, division rings, modules) used in the Lean formalization; Section 3 translates the informal statements into precise Lean definitions; Sections 4–6 contain the mechanized proofs of fintypeFarkasBartl, extendedFarkas, and ValidELP.strongDuality respectively; Section 7 presents counter‑examples when safety conditions are omitted; and an accompanying GitHub repository provides the full Lean source code. The authors emphasize that the only logical axioms invoked are propositional extensionality, classical choice, and quotient soundness, underscoring the constructive nature of the development.

In summary, the paper makes three substantive advances: (1) it formalizes classic Farkas lemmas and strong LP duality in a proof assistant, guaranteeing their logical correctness; (2) it generalizes these results to a highly abstract algebraic setting (arbitrary modules, ordered division rings); and (3) it introduces a novel extension of linear programming that accommodates infinite coefficients, together with a rigorously proved strong duality theorem. This work bridges formal methods and optimization theory, opening the door to verified algorithms that can safely handle “hard” constraints modeled by infinities.


Comments & Academic Discussion

Loading comments...

Leave a Comment