Smale's 9th problem: polynomial-time LP feasibility over
OpenSmaleNinth.smale_ninth_problemConsider the decision problem: given a matrix and a vector of arbitrary real numbers, decide whether the system of linear inequalities has a solution, that is, whether
where the inequality is componentwise. The instance is presented to a machine over the real numbers as tape cells (the two dimensions, the entries of in row-major order, then ), and the cost of a computation is the number of instructions it executes, each arithmetic operation, comparison and shift costing one unit regardless of the magnitude of the reals involved.
The assertion. There exist a single program , and constants , such that for every , every , every and every , the program started on the encoded instance halts with the correct verdict within
steps: it accepts if is nonempty, and rejects otherwise.
Reading the quantifiers. The program and both constants are chosen once, before any instance is seen; only the verdict and the actual halting time depend on the instance. The algorithm is therefore required to be uniform — one finite instruction list for all dimensions — and its running time to be bounded by a fixed polynomial in the number of input reals. In particular the bound may not depend on the magnitudes, the bit lengths, or any conditioning of and ; every algorithm currently known for this problem violates exactly this, its iteration count being governed by a quantity that is unbounded over real instances of fixed dimension.
What the statement deliberately leaves unfixed. Neither the degree , nor the constant , nor any structure of the program is prescribed: the claim is only that some polynomial bound holds, so it is invariant under future quantitative improvements and cannot be invalidated by a sharper analysis. Conversely, an algorithm is here a finite program in the fixed instruction set, not an arbitrary function of the input reals — a set-theoretic decision function always exists, and would make the statement vacuous.
This is Problem 9 on Smale's list of mathematical problems for the next century, and it is open.
import Definitions.Def_Polyhedron
import Definitions.Def_SmaleNinth_BSSMachine
/-!
Smale's 9th problem: polynomial-time linear programming feasibility over
the real numbers.
Source: S. Smale, *Mathematical problems for the next century*, Mathematical
Intelligencer 20(2):7–15, 1998, Problem 9: "Is there a polynomial-time
algorithm over the real numbers which decides the feasibility of the linear
system of inequalities $Ax \ge b$?" — in the machine model of Blum–Shub–
Smale (Bull. AMS 21(1):1–46, 1989), formalized in
`Definitions.Def_SmaleNinth_BSSMachine`.
The statement asks for a single BSS program `P` (one uniform algorithm, with
arbitrary real machine constants) and constants `C, d` such that on every
instance — every `m`, `n`, every real `A : m × n` and `b : m` — the program,
run on the standard input encoding, halts within `C·(mn + m + 2)^d` steps
(unit cost per arithmetic operation, comparison, or shift; `mn + m + 2` is
the number of input cells) and accepts exactly when `{x | Ax ≥ b}` is
nonempty.
-/
open LinearOptimization
/-- **Smale's 9th problem** (Smale 1998, Problem 9; Blum–Shub–Smale model).
There is a uniform BSS program over `ℝ` deciding the feasibility of
`Ax ≥ b` in a number of steps polynomial in the number `mn + m + 2` of
input reals. -/theorem SmaleNinth.smale_ninth_problem :
∃ (P : BSSProgram) (C d : ℕ),
∀ (m n : ℕ) (A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ),
∃ result : Bool,
BSSDecidesInTime P (encodeLP A b) (C * (m * n + m + 2) ^ d) result ∧
(result = true ↔ (polyhedron A b).Nonempty) := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5
Read-back: SmaleNinth.smale_ninth_problem
The machine model referenced by the statement. A BSS program is a finite list of instructions, each of one of the following kinds, where every address is a fixed integer hard-coded in the instruction and the machine's memory is a two-way-infinite tape of real registers:
- for an arbitrary fixed real constant (real machine constants are allowed);
- , , , or (division is total, with );
- shift-left (new old for every ) and shift-right (new old );
- a conditional jump on register : if (non-strict), set the program counter to a fixed target index; otherwise fall through to the next instruction;
- two halting instructions, accept and reject.
Execution starts with program counter on a given initial tape; each step executes the instruction at the current program counter and (except for jumps and halts) advances the counter by one. A configuration whose counter points at accept, at reject, or outside the program list is a fixed point of the step function (nothing further changes).
The predicate " decides on input within steps with output " (the unfolding of ) asserts:
Note is non-strict, and merely running off the end of the program never counts as either output: the counter must sit on an actual accept/reject instruction.
The input encoding. For , a matrix and a vector , the tape is:
- cell holds the real number ; cell holds the real number ;
- cells hold the entries of in row-major order (cell holds ; if or the offset is out of range, the row-major lookup returns the junk value , so this segment is empty when );
- cells hold ;
- every other cell — including all negative cells — holds .
The feasibility set. , where is componentwise: with . "Nonempty" means satisfying all inequalities.
What the theorem asserts. There exist a single finite BSS program (with whatever real constants its instructions carry) and natural numbers — all three chosen once, uniformly, before any instance is seen — such that for every , every , and every , there exists a Boolean (chosen per instance, after ) with both:
- , started on the tape , reaches an accept (if ) or reject (if ) instruction within at most
steps, each step being one instruction execution (one arithmetic operation, constant load, shift, jump, at unit cost); and 2. if and only if is nonempty.
So the program and the polynomial bound are uniform over all dimensions and all real data, while the output bit and the halting time may depend on the instance. The two conjuncts together force to halt with the correct answer on every instance within the stated bound.
Edge cases the quantifiers silently include.
- : there are no constraints; is the empty vector, and every (including the unique empty vector when ) satisfies the empty system vacuously, so the polyhedron is all of and is always nonempty — the program must accept, within steps (the bound evaluates to ). The input tape then holds , , no -segment and no -segment.
- : the only candidate point is the empty vector, and , so the polyhedron is nonempty iff for all ; the tape holds no -entries and the bound is .
- and range over all of , including ; since , the bound is exactly when (in which case halting would have to occur at step , which is impossible for a nonempty requirement — but are the prover's choice, so this only restricts which witnesses can work).
- Division by zero inside the machine yields rather than being undefined, and the branch test is the non-strict .
Confirmed by the mission captain (proposal self-audit).