Lemma upper_triangular_iff_transpose_lower_triangular { m n : nat } ( iter : ⟦ n ⟧%stn ) (mat : Matrix R m n) : is_upper_triangular mat <-> is_lower_triangular (transpose mat). Proof. unfold is_upper_triangular, is_lower_triangular, transpose, flip. split. - intros inv i j i_lt_j. rewrite inv; try assumption; reflexivity. - intros inv i j i_gt_j. rewrite inv; try assumption; reflexivity. 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.RigsAndRings. Require Import UniMath.Algebra.IteratedBinaryOperations. Require Import UniMath.Algebra.Matrix. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.GaussianElimination.Auxiliary. Require Import UniMath.Algebra.GaussianElimination.Vectors.