proposition: Lemma matrix_mult_ldistr {m n p} (mat1 : Matrix R m n) (mat2 : Matrix R n p) (mat3 : Matrix R n p) : mat1 ** (mat2 ++' mat3) = (mat1 ** mat2) ++' (mat1 ** mat3).
proof: Proof. intros. rewrite matrix_mult_eq. unfold matrix_mult_unf, matrix_add , entrywise, pointwise. apply funextfun. intros i. apply funextfun. intros j. etrans. { apply maponpaths, funextfun; intros k. rewrite rigldistr; apply idpath. } apply vecsum_add. Defined.
imports: UniMath.Foundations.All UniMath.MoreFoundations.All UniMath.Combinatorics.StandardFiniteSets UniMath.Combinatorics.Vectors UniMath.Algebra.RigsAndRings UniMath.Algebra.IteratedBinaryOperations UniMath.Algebra.Matrix UniMath.Algebra.Domains_and_Fields UniMath.Algebra.GaussianElimination.Auxiliary UniMath.Algebra.GaussianElimination.Vectors