Basic solution carried by a nonsingular square subsystem
ProvedSmaleNinth.exists_square_subsystemEvery consistent linear system has a basic solution carried by a nonsingular square subsystem.
Let , , let be a set of row indices, and suppose the subsystem has a solution. Then there are an integer , a solution of the same subsystem, and selections of rows and columns such that
- the submatrix is nonsingular;
- the restricted vector solves that square system against the corresponding entries of ;
- vanishes at every coordinate outside the chosen columns.
What it is for. This is the structural half of every size estimate in linear programming. A general consistent system says nothing about how large its solutions must be, but a square nonsingular system is governed by Cramer's rule, and over integer data that immediately bounds the solution. This lemma is what reduces the former to the latter; the arithmetic is then SmaleNinth.cramer_solution_bound.
The argument. Among all solutions of the subsystem, choose one, , whose set of zero coordinates is as large as possible; this is possible because that set is a subset of a finite index set. Let be the support of .
The columns of indexed by are then linearly independent. Otherwise some nonzero supported in satisfies ; then solves the subsystem for every , and choosing to cancel one of the nonzero coordinates of produces a solution with a strictly larger zero set, contradicting the choice of . (When is empty the statement holds with .)
Write . Since the selected columns are independent, the matrix has rank ; as row rank equals column rank, its rows span , so of them form a basis. Selecting those rows gives an submatrix whose rows are linearly independent, hence invertible, hence of nonzero determinant. Restricting the identity to those rows, and using that vanishes off , gives exactly the square system in (2).
import Mathlib import Definitions.Def_Polyhedron open Matrix LinearOptimization
theorem SmaleNinth.exists_square_subsystem {m n : ℕ}
(A : Matrix (Fin m) (Fin n) ℝ) (b : Fin m → ℝ) (I : Finset (Fin m))
(x : Fin n → ℝ) (hx : ∀ i ∈ I, A.mulVec x i = b i) :
∃ (r : ℕ) (y : Fin n → ℝ) (row : Fin r → Fin m) (col : Fin r → Fin n),
(∀ i ∈ I, A.mulVec y i = b i) ∧
r ≤ n ∧
(A.submatrix row col).det ≠ 0 ∧
(A.submatrix row col).mulVec (fun k => y (col k)) = (fun k => b (row k)) ∧
(∀ j, j ∉ Set.range col → y j = 0) := by sorry