Lemma matrix_left_inverse_to_transpose_right_inverse {m n} (A : Matrix CR m n) (inv: @matrix_left_inverse CR m n A) : (@matrix_right_inverse CR n m (@transpose CR n m A)). Proof. destruct inv as [inv isinv]. exists (transpose inv). etrans. { apply pathsinv0, matrix_product_transpose. } etrans. { apply maponpaths, isinv. } apply identity_matrix_symmetric. 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.