Cramer–Hadamard solution bound for integer systems
ProvedSmaleNinth.integer_polyhedron_solution_boundA feasible system of linear inequalities with integer coefficients cannot have all its solutions astronomically far from the origin: feasibility already forces a solution of controlled size, with a bound depending only on the number of variables and the size of the coefficients.
The assertion. Let be an integer, let and satisfy for all and for all , and suppose the system has at least one real solution. Then it has a real solution with
What the bound does and does not involve. It is a bound on each coordinate, hence on the sup-norm, and it depends only on the number of variables and the coefficient bound — the number of inequalities does not appear, however large it is. The solution produced is real; no rationality or integrality of is claimed, and none holds in general. Both and are bounded by the same , and is required, so the hypotheses never force the data to vanish.
Why it matters here. This is the step that converts a geometric question into a question of bounded size. A feasible integer system is guaranteed to meet an explicit box , so a search may be confined to that box, and the resulting volumes and radii are described by numbers whose logarithms are polynomial in and . Every polynomial-time algorithm for linear feasibility in the bit model rests on an estimate of this kind, and it is the first place where the magnitude of the data enters the complexity — which is precisely what the real-number formulation of the problem forbids.
Sharpness. The constant is the classical generous one and is not claimed to be optimal; only its logarithm's polynomial growth is used downstream, so any sharpening is a strengthening of this statement rather than a correction to it.
import Definitions.Def_Polyhedron
/-!
The Cramer–Hadamard bound: a nonempty linear system with integer data has a
solution of explicitly bounded size.
Source: the classical size estimate underlying Khachiyan's theorem —
B. Korte, J. Vygen, *Combinatorial Optimization*, 6th ed., Springer, §4.1
(Size of Vertices and Faces), and Bertsimas–Tsitsiklis, *Introduction to
Linear Optimization*, §8.4; cf. A. Schrijver, *Theory of Linear and Integer
Programming*, Wiley 1986, Chapter 10. A point of a minimal face of
`{x | Ax ≥ b}` solves a nonsingular integer subsystem, so by Cramer's rule
and the crude expansion bound `|det| ≤ r!·Uʳ` on `r × r` integer matrices
with entries bounded by `U` (and `|det| ≥ 1` for a nonsingular integer
matrix), its components are bounded by `n!·Uⁿ`.
The bound `n!·Uⁿ` is the generous classical one; only its polynomial bit
size matters downstream.
-/
open Matrix LinearOptimization
/-- **Cramer–Hadamard solution bound** (Korte–Vygen §4.1;
Bertsimas–Tsitsiklis §8.4). If the system `Ax ≥ b` with integer entries
bounded by `U ≥ 1` has a real solution, it has one with every component
bounded by `n!·Uⁿ`. -/theorem SmaleNinth.integer_polyhedron_solution_bound {m n : ℕ} (U : ℕ) (hU : 1 ≤ U)
(A : Matrix (Fin m) (Fin n) ℤ) (b : Fin m → ℤ)
(hA : ∀ i j, |A i j| ≤ (U : ℤ)) (hb : ∀ i, |b i| ≤ (U : ℤ))
(hne : (polyhedron (A.map (Int.cast : ℤ → ℝ))
(fun i => (b i : ℝ))).Nonempty) :
∃ x ∈ polyhedron (A.map (Int.cast : ℤ → ℝ)) (fun i => (b i : ℝ)),
∀ j, |x j| ≤ (n.factorial : ℝ) * (U : ℝ) ^ n := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5
Read-back: SmaleNinth.integer_polyhedron_solution_bound
What the statement literally asserts. Fix natural numbers and (both implicit, so they range over all values including ), a natural number with the hypothesis , an matrix with integer entries (rows indexed by , columns by ), and a vector . Two entry-bound hypotheses are stated as inequalities between integers, with cast into :
where is the ordinary absolute value on .
The final hypothesis concerns the set
where and are the entrywise casts of and from into , and means the componentwise (pointwise) inequality — this is the unfolding of the custom definition polyhedron, the "general-form polyhedron" over . The hypothesis is that is nonempty, i.e. the real linear system has at least one real solution.
Conclusion. Under these hypotheses the theorem asserts the existence of a point (so satisfying componentwise) such that every component is bounded:
where the bound is the real number obtained by casting the natural number (the factorial of the column dimension ) to and multiplying by the -th power of the real cast of . The inequality is non-strict (), the existential is plain existence (not uniqueness), and the bound uses the same (the number of variables/columns) in both the factorial and the exponent; (the number of constraints) does not appear in the bound.
Edge and degenerate cases silently included by the quantifiers.
- : the space contains exactly one point (the empty vector). is nonempty exactly when for every (each row of is an empty sum, equal to ), and in that case the conclusion holds vacuously: the componentwise bound quantifies over , so there is nothing to check (the bound itself would be , but it is never invoked).
- : there are no constraints, so and the nonemptiness hypothesis holds automatically; the theorem then asserts the existence of some with all (e.g. any point works only if it meets the bound; the claim is just that one such point exists).
- is a natural number constrained by , so is excluded by hypothesis; the entry bounds therefore cannot force or to be zero.
- The hypotheses bound the entries of and by the same , and the nonemptiness is required over (a real solution), not over or ; likewise the bounded solution produced is a real vector, with no rationality or integrality claim.
Confirmed by the mission captain (proposal self-audit).