@@ -914,65 +914,41 @@ Lemma mmapMNn n : {morph mmap f h: x / x *- n} . Proof. exact: raddfMNn. Qed.
914914
915915End Additive.
916916
917- Section CommrMultiplicative .
917+ Section Multiplicative .
918918
919- Context {K : monomType} {R S : pzSemiRingType }.
920- Context (f : {rmorphism R -> S}) ( h : {mmorphism K -> S}).
919+ Context {K : monomType} {R : pzSemiRingType} { S : semiAlgType R }.
920+ Context (h : {mmorphism K -> S}).
921921
922922Implicit Types (c : R) (g : {malg R[K]}).
923923
924- Lemma mmapZ c g : (c *: g)^[f,h] = f c * g^[f,h].
925- Proof .
926- rewrite (mmapEw (msuppZ_le _ _)) mmapE big_distrr /=.
927- by apply/eq_bigr=> k _; rewrite linearZ rmorphM /= mulrA.
928- Qed .
924+ Local Notation "g ^[ h ]" := (g ^[GRing.in_alg S, h]).
929925
930- Lemma mmapC c : c%:MP^[f, h] = f c .
926+ Lemma mmapC c : c%:MP^[h] = c%:A .
931927Proof . by rewrite mmapU mmorph1 mulr1. Qed .
932928
933- Lemma mmap1 : 1^[f,h] = 1.
934- Proof . by rewrite mmapC rmorph1. Qed .
935-
936- Hypothesis commr_f: forall g m m', GRing.comm (f g@_m) (h m').
929+ Lemma mmap1 : 1^[h] = 1.
930+ Proof . by rewrite mmapC scale1r. Qed .
937931
938- Lemma commr_mmap_is_multiplicative : multiplicative (mmap f h).
932+ Lemma mmap_is_multiplicative : multiplicative (mmap (GRing.in_alg S) h).
939933Proof .
940934split => [g1 g2|]; last by rewrite mmap1.
941935rewrite malgME raddf_sum mulr_suml /=; apply: eq_bigr=> i _.
942936rewrite raddf_sum mulr_sumr /=; apply: eq_bigr=> j _.
943- by rewrite mmapU /= rmorphM mmorphM -mulrA [X in _*X=_]mulrA commr_f !mulrA .
937+ by rewrite mmapU/= !mulr_algl -!(scalerAl, scalerCA) scalerA -mmorphM .
944938Qed .
945939
946- End CommrMultiplicative.
947-
948- (* -------------------------------------------------------------------- *)
949- Section Multiplicative.
950-
951- Context {K : monomType} {R : pzSemiRingType} {S : comPzSemiRingType}.
952- Context (f : {rmorphism R -> S}) (h : {mmorphism K -> S}).
953-
954- Lemma mmap_is_multiplicative : multiplicative (mmap f h).
955- Proof . by apply/commr_mmap_is_multiplicative=> g m m'; apply/mulrC. Qed .
956-
957940HB.instance Definition _ :=
958- GRing.isMultiplicative.Build {malg R[K]} S (mmap f h)
941+ GRing.isMultiplicative.Build {malg R[K]} S (mmap (GRing.in_alg S) h)
959942 mmap_is_multiplicative.
960943
961- End Multiplicative.
962-
963- (* -------------------------------------------------------------------- *)
964- Section Linear.
965-
966- Context {K : monomType} {R : comPzSemiRingType} (h : {mmorphism K -> R}).
967-
968- Lemma mmap_is_linear : scalable_for *%R (mmap idfun h).
969- Proof . by move=> /= c g; rewrite -mul_malgC rmorphM /= mmapC. Qed .
944+ Lemma mmapZ : scalable (mmap (@GRing.in_alg _ _) h).
945+ Proof . by move=> /= c g; rewrite -mul_malgC rmorphM/= mmapC mulr_algl. Qed .
970946
971947HB.instance Definition _ :=
972- GRing.isScalable.Build R {malg R[K]} R * %R (mmap idfun h)
973- mmap_is_linear .
948+ GRing.isScalable.Build R {malg R[K]} S *: %R (mmap (GRing.in_alg S) h)
949+ mmapZ .
974950
975- End Linear .
951+ End Multiplicative .
976952End MalgMorphism.
977953
978954(* -------------------------------------------------------------------- *)
0 commit comments