proposition: Lemma gauss_clear_column_inv1 { m n : nat } (k_i : (⟦ m ⟧%stn)) (k_j : stn n) (r : stn m) (iter : ⟦ S m ⟧%stn) (p' : r ≤ k_i) (mat : Matrix F m n) : (gauss_clear_column mat k_i k_j iter) r = mat r.
proof: Proof. unfold gauss_clear_column. destruct iter as [sep p]. induction sep as [| sep IH]. { easy. } unfold gauss_clear_column. apply funextfun. intros q. rewrite nat_rect_step. destruct (natgthorleh _ _)as [gt | ?]; try reflexivity. rewrite gauss_clear_column_step_inv3. 2 : { now refine (natgthgehtrans _ _ _ gt _). } unfold gauss_clear_column in IH. now rewrite IH. Defined.
imports: UniMath.Foundations.PartA UniMath.Foundations.NaturalNumbers UniMath.MoreFoundations.PartA UniMath.MoreFoundations.Nat UniMath.MoreFoundations.Tactics UniMath.Combinatorics.StandardFiniteSets UniMath.Combinatorics.FiniteSequences UniMath.Combinatorics.Vectors UniMath.Combinatorics.Maybe UniMath.Algebra.BinaryOperations UniMath.Algebra.IteratedBinaryOperations UniMath.Algebra.RigsAndRings UniMath.Algebra.Matrix UniMath.Algebra.Domains_and_Fields UniMath.Algebra.GaussianElimination.Auxiliary UniMath.Algebra.GaussianElimination.Vectors UniMath.Algebra.GaussianElimination.Matrices UniMath.Algebra.GaussianElimination.RowOps