An infeasible integer system has an integral Farkas certificate with
ProvedSmaleNinth.exists_integral_farkas_certificateAn infeasible integer system has an integral Farkas certificate of bounded norm.
Let be an integer system in variables, every entry bounded by in absolute value, and suppose it has no real solution. Then there is an integer vector with
Why each clause. Farkas' lemma — already Proved on this platform as LinearOptimization.farkas_lemma — supplies a real with and . That is not enough for Khachiyan's argument, which needs the certificate to be quantitatively bounded: the perturbation is calibrated against exactly this bound, and against nothing else.
The two upgrades are:
-
Integrality, hence . A positive real number is not bounded below; a positive integer is. Scaling the certificate to clear denominators turns into , and this is the only place the gap between "positive" and "at least one" is bought.
-
The bound. This is the mathematical content and it is not formal. One must first replace the certificate by a basic solution of the cone , whose support therefore has at most elements; its nonzero entries are then given by Cramer's rule applied to a nonsingular square subsystem of , whose data are integers bounded by . Clearing the common denominator (a determinant) leaves entries that are themselves determinants of integer matrices with entries bounded by , so each is at most by the permutation-expansion bound, and there are at most of them.
What the platform already provides. The determinant estimates are done: SmaleNinth.abs_det_le_factorial_mul_pow and SmaleNinth.cramer_solution_bound are both Proved, as is LinearOptimization.farkas_lemma. What is missing — in Mathlib as well as here — is the existence of a basic solution: that a nonempty polyhedron whose lineality space is trivial has a basic feasible solution, equivalently that a pointed cone is generated by its extreme rays. Mathlib has Polytope/extremePoints material but nothing that produces a basic solution of an explicit inequality system with the support bound. That gap is the real work here, and it is why this is a separate statement rather than an inlined step.
The constant is deliberately generous. The sharper bound also holds and would give . The bound stated here yields , which is all the parent needs, and it is the bound that falls straight out of the permutation expansion without a further refinement of the submatrix size. Anyone proving the sharper version should feel free to strengthen the statement.
Where it is used. This is the sole remaining gap in SmaleNinth.khachiyan_nonempty_imp, the Farkas direction of the Khachiyan feasibility equivalence: given a point of the relaxed-and-boxed system, , a contradiction. That assembly is proved outright.
import Definitions.Def_Polyhedron import Definitions.Def_SmaleNinth_Khachiyan open Matrix LinearOptimization
theorem SmaleNinth.exists_integral_farkas_certificate {m n : ℕ} (U : ℕ) (hU : 1 ≤ U) (hn : 1 ≤ n)
(A : Matrix (Fin m) (Fin n) ℤ) (b : Fin m → ℤ)
(hA : ∀ i j, |A i j| ≤ (U : ℤ)) (hb : ∀ i, |b i| ≤ (U : ℤ))
(hempty : polyhedron (A.map (Int.cast : ℤ → ℝ)) (fun i => (b i : ℝ)) = ∅) :
∃ y : Fin m → ℤ, (∀ i, 0 ≤ y i) ∧
(∀ j, ∑ i, y i * A i j = 0) ∧
1 ≤ ∑ i, y i * b i ∧
(∑ i, y i) ≤ ((n + 1) * (n + 1).factorial * U ^ (n + 1) : ℤ) := by
sorry