Commit 2026-11-17 16:29 d5671e17

View on Github →

refactor(LinearAlgebra/Matrix/Rank): remove commutativity and finiteness requirements from Matrix.rank (#45133) We have Matrix.cRank (Cardinal) / Matrix.eRank (ENat) / Matrix.rank (Nat), but the last one is defined differently (finrank mulVecLin.range) and so requires [CommSemiring R] and [Fintype n]. This redefines Matrix.rank as cRank.toNat (equivalently, the finrank of the column space). This unifies the three rank definitions and lets us use similar proofs and keep similar APIs.

Estimated changes

modified theorem Matrix.cRank_toNat_eq_rank
modified theorem Matrix.eRank_reindex
modified theorem Matrix.eRank_toNat_eq_rank
modified theorem Matrix.rank_conjTranspose
modified theorem Matrix.rank_le_card_height
modified theorem Matrix.rank_le_card_width
modified theorem Matrix.rank_le_height
modified theorem Matrix.rank_le_width
modified theorem Matrix.rank_mul_ge
modified theorem Matrix.rank_mul_le
modified theorem Matrix.rank_mul_le_left
modified theorem Matrix.rank_mul_le_right
modified theorem Matrix.rank_of_isUnit
modified theorem Matrix.rank_one
modified theorem Matrix.rank_reindex
modified theorem Matrix.rank_submatrix
modified theorem Matrix.rank_submatrix_le
modified theorem Matrix.rank_subsingleton
modified theorem Matrix.rank_transpose
modified theorem Matrix.rank_unit
modified theorem Matrix.rank_vecMulVec_le
modified theorem Matrix.rank_zero
added theorem Matrix.toENat_cRank