Theorem (Matrix.finrank_ker_toBlock_eq_finrank_ker_inv_toBlock_not).Complementary nullities. For an invertible \mathbf{A} and sets of indices r (rows) and c (columns), the block of \mathbf{A} on rows r and columns c and the block of \mathbf{A}^{-1} on rows outside c and columns outside r have kernels of the same dimension. The blocks need not be square. [HornJohnson2013, §0.7.5]; here over any field.
Headline (provisional)
Lean statement and details
Matrix.finrank_ker_toBlock_eq_finrank_ker_inv_toBlock_not.{u_1, u_4} {K : Type u_1} [Field K]
{n : Type u_4} [Fintype n] [DecidableEq n] (A : Matrix n n K) (hA : IsUnit A) (r c : n → Prop)
[DecidablePred r] [DecidablePred c] :
Module.finrank K ↥(A.toBlock r c).mulVecLin.ker =
Module.finrank K ↥(A⁻¹.toBlock (fun i ↦ ¬c i) fun i ↦ ¬r i).mulVecLin.ker
Theorem (Matrix.rank_toBlock_add_card_eq_rank_inv_toBlock_not_add_card).Law of complementary nullities. The rank form, stated additively: the rank of the block of \mathbf{A} on rows r and columns c, plus the number of indices outside r, equals the rank of the complementary block of \mathbf{A}^{-1} (rows outside c, columns outside r) plus the number of indices in c. [HornJohnson2013, §0.7.5].
General form: sizes are index types
Lean statement and details
Matrix.rank_toBlock_add_card_eq_rank_inv_toBlock_not_add_card.{u_1, u_4} {K : Type u_1} [Field K]
{n : Type u_4} [Fintype n] [DecidableEq n] (A : Matrix n n K) (hA : IsUnit A) (r c : n → Prop)
[DecidablePred r] [DecidablePred c] :
(A.toBlock r c).rank + Fintype.card { j // ¬r j } =
(A⁻¹.toBlock (fun i ↦ ¬c i) fun i ↦ ¬r i).rank + Fintype.card { j // c j }
General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.