Lower-triangular Bruhat factorization of a square matrix
ProvedIntMul.OpenAI.lower_triangular_factorizationLet be a field and an matrix over of rank . Then there is a factorization
where are lower triangular with nonzero diagonal entries (hence invertible), and is a partial permutation matrix. That is, every entry of is or , each row and each column contains at most one , and has exactly entries equal to .
This is Lemma 9 of the OpenAI preprint Integer multiplication below . It is the Bruhat factorization of a possibly singular matrix with the coordinate order reversed (Grigor'ev, Proposition 14(c)), arranged so that both triangular factors act on tape fields in the direction a streaming pass can update. In Lemma 10 of the preprint it turns a rational address shear into exactly interchanges of digit fields plus linear work. This is the source of the rank saving behind every bound in the campaign.
Formalization Note "Lower triangular" means for in the order of Fin m. The paper states the result over ; here it is stated over any field.
import Mathlib
namespace IntMul.OpenAI
theorem lower_triangular_factorization {m : ℕ} {K : Type*} [Field K] [DecidableEq K]
(A : Matrix (Fin m) (Fin m) K) :
∃ E₁ P E₂ : Matrix (Fin m) (Fin m) K,
(∀ i j, i < j → E₁ i j = 0) ∧ (∀ i, E₁ i i ≠ 0) ∧
(∀ i j, i < j → E₂ i j = 0) ∧ (∀ i, E₂ i i ≠ 0) ∧
(∀ i j, P i j = 0 ∨ P i j = 1) ∧
(∀ i j j', P i j = 1 → P i j' = 1 → j = j') ∧
(∀ i i' j, P i j = 1 → P i' j = 1 → i = i') ∧
(Finset.univ.filter fun x : Fin m × Fin m => P x.1 x.2 = 1).card = A.rank ∧
A = E₁ * P * E₂ := by sorry
end IntMul.OpenAI