proposition: Lemma add_row_mult_source_row_zero {m n} (r1 r2 : ⟦ m ⟧%stn) (s : R) (mat : Matrix R m n) : mat r1 = const_vec 0%ring -> add_row_mult r1 r2 s mat = mat.
proof: Proof. intros eq0. apply funextfun; intros i'; apply funextfun; intros j'. unfold add_row_mult. destruct (stn_eq_or_neq _ _ ) as [i'_eq_j' | i'_neq_j']; simpl; try reflexivity. rewrite <- i'_eq_j', eq0. unfold const_vec ; simpl. rewrite (@rigmultx0 R). apply (@rigrunax1 R). Defined.
imports: UniMath.Foundations.All UniMath.MoreFoundations.All UniMath.Combinatorics.StandardFiniteSets UniMath.Combinatorics.Vectors UniMath.Algebra.Matrix UniMath.Algebra.RigsAndRings UniMath.Algebra.IteratedBinaryOperations UniMath.Algebra.Domains_and_Fields UniMath.Algebra.GaussianElimination.Auxiliary UniMath.Algebra.GaussianElimination.Vectors UniMath.Algebra.GaussianElimination.Matrices