Lemma nil_matrix_invertible {n : nat} (A : Matrix R 0 0): matrix_inverse A. Proof. exists identity_matrix. use tpair. - etrans. apply matrunax2. apply funextfun; intro i. now apply(@iscontr_nil_row_matrix _ 0). - etrans. apply matlunax2. apply funextfun; intro. now apply (@iscontr_nil_row_matrix _ 0). 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.