(R : Ring) (m n p : nat) : LeftHeteroDistribute (@matrix_mult R m n p) matrix_plus matrix_plus. Proof. intros M N P; apply path_matrix; intros i j Hi Hj. rewrite !entry_Build_Matrix, !entry_Build_Vector. change (?x = ?y + ?z) with (x = sg_op y z). rewrite <- ab_sum_plus. nrapply path_ab_sum. intros k Hk. rewrite entry_Build_Matrix. apply rng_dist_l. Defined.
Require Import Basics.Overture Basics.Trunc Basics.Tactics Basics.Decidable. Require Import Types.Sigma. Require Import Spaces.List.Core Spaces.List.Theory Spaces.List.Paths. Require Import Algebra.Rings.Ring Algebra.Rings.Module Algebra.Rings.CRing Require Import abstract_algebra. Require Import WildCat.Core WildCat.Paths. Require Import Modalities.ReflectiveSubuniverse.