proposition: Lemma left_invertible_upper_triangular_to_diagonal_all_nonzero {n : nat } (A : Matrix F n n) (p : @is_upper_triangular F _ _ A) (p': @matrix_left_inverse F _ _ A) : (@diagonal_all_nonzero F _ A).
proof: Proof. destruct (@vector_all_nonzero_compute_internal _ _ (@diagonal_sq F _ A)) as [l | r]. { unfold diagonal_all_nonzero; intros; unfold diagonal_sq in l; apply l. } unfold diagonal_sq in r; apply fromempty; now apply (@back_sub_zero _ _ A p). Defined.
imports: UniMath.MoreFoundations.PartA UniMath.MoreFoundations.Nat UniMath.MoreFoundations.Tactics UniMath.Algebra.Matrix UniMath.Algebra.Domains_and_Fields UniMath.Algebra.Matrix UniMath.Algebra.RigsAndRings UniMath.Algebra.IteratedBinaryOperations UniMath.Algebra.GaussianElimination.Auxiliary UniMath.Algebra.GaussianElimination.Vectors UniMath.Algebra.GaussianElimination.Matrices UniMath.Algebra.GaussianElimination.Elimination