Lemma switch_row_other_row' {m n} (r1 r2 : ⟦ m ⟧%stn) (mat : Matrix R m n) : ∏ (i : ⟦ m ⟧%stn), i ≠ r1 -> i ≠ r2 -> (switch_row r1 r2 mat) i = mat i. Proof. intros i i_ne_r1 i_ne_r2. apply funextfun; intros j. apply switch_row_other_row; assumption. Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.Combinatorics.StandardFiniteSets. Require Import UniMath.Combinatorics.Vectors. Require Import UniMath.Algebra.Matrix. Require Import UniMath.Algebra.RigsAndRings. Require Import UniMath.Algebra.IteratedBinaryOperations. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.GaussianElimination.Auxiliary. Require Import UniMath.Algebra.GaussianElimination.Vectors. Require Import UniMath.Algebra.GaussianElimination.Matrices.