Lemma zero_row_to_non_invertibility { n : nat } (A : Matrix R n n) (i : ⟦ n ⟧%stn) (zero_row : A i = (const_vec 0%ring)) : (@matrix_inverse R n A) -> empty. Proof. intros invA. apply matrix_inverse_to_right_and_left_inverse in invA. destruct invA as [? rinvA]. apply (zero_row_to_non_right_invertibility A i); 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.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.