fact: Fixpoint rank_elim {m n : nat} : 'M[F]_(m, n) -> nat := if n is p.+1 then fun (M : 'M_(m, 1 + p)) => if find_pivot M is Some k then let a := fun_of_matrix M k 0 in let u := rsubmx (row k M) in let R := row' k M in let v := a^-1 *: lsubmx R in let R := rsubmx R - v *m u in (1 + rank_elim R)%N else rank_elim (rsubmx M) else fun => 0%N.
imports: mathcomp(ssreflect ssrfun ssrbool eqtype ssrnat div seq) mathcomp(ssralg fintype fingroup perm) mathcomp(matrix bigop zmodp mxalgebra) gauss