Theorem (Matrix.PosSemidef.choleskyLower_choleskyPivotPerm_apply_self_pos_iff). Rank detection by pivoted Cholesky. Exactly the first \operatorname{rank} \mathbf{A} pivots of the computed factor are positive, including for singular positive semidefinite inputs. [Higham2002, Theorem 10.9].
Headline
Lean statement and details
Matrix.PosSemidef.choleskyLower_choleskyPivotPerm_apply_self_pos_iff.{u_1} {๐ : Type u_1} [RCLike ๐]
{n : โ} {A : Matrix (Fin n) (Fin n) ๐} (hA : A.PosSemidef) (i : Fin n) :
0 < choleskyLower (A.submatrix โ(choleskyPivotPerm A) โ(choleskyPivotPerm A)) i i โ โi < A.rank