If a hyperplane contains no optimal point, all optimal points lie on one side of it
ProvedMegiddoLP.FixedDim.optimal_set_one_sideConsider the linear program
and a hyperplane that contains no optimal solution of the program. Then either every optimal solution satisfies , or every optimal solution satisfies .
The set of optimal solutions is convex, which gives the claim. It means that the oracle's answer for such a hyperplane does not depend on which optimal solution is taken as . So Megiddo's pruning is valid even when the program has multiple optima.
Formalization Note "Optimal" is IsLpOptimal c (polyhedron A b): feasible and of least cost among feasible points. If the program has no optimal solution, both alternatives hold vacuously.
import Mathlib import Definitions.Def_Polyhedron
/-!
Megiddo, J. ACM 31 (1984), §4 p. 123: if a hyperplane contains no optimal point of a linear
program, all optimal points lie on one side of it (convexity of the optimal set).
-/
open Matrix LinearOptimization
namespace MegiddoLP.FixedDim
/-- **Optimal points on one side.** For the program `minimize cᵀx subject to Ax ≥ b` and a
hyperplane `{a ⬝ᵥ x = β}` containing no optimal solution, either every optimal solution has
`a ⬝ᵥ x < β` or every optimal solution has `a ⬝ᵥ x > β`. -/
theorem optimal_set_one_side {n d : ℕ} (A : Matrix (Fin n) (Fin d) ℝ) (b : Fin n → ℝ)
(c a : Fin d → ℝ) (β : ℝ)
(hmiss : ∀ x, IsLpOptimal c (polyhedron A b) x → a ⬝ᵥ x ≠ β) :
(∀ x, IsLpOptimal c (polyhedron A b) x → a ⬝ᵥ x < β) ∨
(∀ x, IsLpOptimal c (polyhedron A b) x → β < a ⬝ᵥ x) := by sorry
end MegiddoLP.FixedDim
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Let , let be a real matrix, and let . Let and .
Imported notions. Two notions come from an imported definition file whose text is not included here, so I refer to them by name only:
- denotes the set ;
- " is optimal" means that satisfies the imported predicate "LP-optimal for objective over ".
The names suggest and optimality of over that set. The direction of optimization, and whether optimality includes membership in the set, are fixed by the unseen definition.
Hypothesis. Every optimal satisfies .
Claim. One of two alternatives holds:
- every optimal satisfies ; or
- every optimal satisfies .
Degenerate cases.
- No optimal point. This would be the case, for example, if is empty or the objective is unbounded, under the unseen definition. Then the hypothesis and both alternatives hold vacuously.
- . The hypothesis says that either or there are no optimal points. The conclusion then follows from the sign of .
- or . These are allowed, and their meaning depends on the unseen definitions.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.