proposition: Lemma id_pointwise_prod { n : nat } (v : Vector R n) (i : ⟦ n ⟧%stn) : (@identity_matrix R n i) *pw v = (@scalar_lmult_vec R (v i) n (identity_matrix i)).
proof: Proof. unfold identity_matrix, scalar_lmult_vec, pointwise, vector_fmap. apply funextfun. intros k. destruct (stn_eq_or_neq i k) as [eq | neq]. - now rewrite riglunax2, rigrunax2, eq. - now rewrite rigmultx0, rigmult0x. 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