proposition: Lemma m2lmulP m1 m2 : m2lmx (m2lmul m1 m2) = m2lmx m1 * m2lmx m2.
proof: Proof. rewrite /m2lmul /m2lmx. set a := nth Z0 m1 0. set b := nth Z0 m1 1. set c := nth Z0 m2 0. set d := nth Z0 m2 1. apply/matrixP=> [][[ | [ | i]] ip] // [[ | [ | j]] jp] //. rewrite !mxE /= 2!big_ord_recr /= big_ord0 add0r !mxE /=. rewrite !(ZtoRM, ZtoRD) !(mulrDr, mulrDl) !addrA. rewrite !(addrAC _ (ZtoR a * ZtoR c)); congr (_ + _ + _). by rewrite addrAC. rewrite !mxE /= 2!big_ord_recr /= big_ord0 add0r !mxE /=. rewrite !(ZtoRM, ZtoRD) !(mulrDr, mulrDl). by rewrite addrAC. rewrite !mxE /= 2!big_ord_recr /= big_ord0 add0r !mxE /=. by rewrite !(ZtoRM, ZtoRD) !(mulrDr, mulrDl). rewrite !mxE /= 2!big_ord_recr /= big_ord0 add0r !mxE /=. by rewrite !(ZtoRM, ZtoRD). Qed.
imports: Coq(Extraction ZArith Lia) mathcomp(all_ssreflect all_algebra)