proposition: Lemma switch_row_equal_rows {m n} (r1 r2 : ⟦ m ⟧%stn) (mat : Matrix R m n) : (mat r1) = (mat r2) -> (switch_row r1 r2 mat) = mat.
proof: Proof. intros m_eq. unfold switch_row. apply funextfun. intros i'. destruct (stn_eq_or_neq _ _) as [eq | neq]. - destruct (stn_eq_or_neq _ _) as [eq' | neq']. + now apply maponpaths. + etrans. apply m_eq. now apply maponpaths. - destruct (stn_eq_or_neq _ _) as [eq | cec]. + cbn. etrans. apply(!m_eq). apply maponpaths, (!eq). + apply idpath. Qed.
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