@@ -2598,8 +2598,8 @@ HB.instance Definition _ :=
25982598
25992599End fct_zmodType.
26002600
2601- Section fct_ringType .
2602- Variables (T : pointedType ) (M : ringType ).
2601+ Section fct_pzRingType .
2602+ Variables (T : Type ) (M : pzRingType ).
26032603Implicit Types f g h : T -> M.
26042604
26052605Let mulrA : associative (fun f g => f \* g).
@@ -2617,24 +2617,38 @@ Proof. by move=> f g h; rewrite funeqE=> x/=; rewrite mulrDl. Qed.
26172617Let mulrDr : right_distributive (fun f g => f \* g) +%R.
26182618Proof . by move=> f g h; rewrite funeqE=> x/=; rewrite mulrDr. Qed .
26192619
2620+ HB.instance Definition _ := @GRing.Zmodule_isPzRing.Build (T -> M) (cst 1)
2621+ (fun f g => f \* g) mulrA mul1r mulr1 mulrDl mulrDr.
2622+
2623+ End fct_pzRingType.
2624+
2625+ Section fct_nzRingType.
2626+ Variables (T : pointedType) (M : nzRingType).
2627+
26202628Let oner_neq0 : cst 1 != 0 :> (T -> M).
26212629Proof . by apply/eqP; rewrite funeqE => /(_ point) /eqP; rewrite oner_eq0. Qed .
26222630
2623- HB.instance Definition _ := @GRing.Zmodule_isRing.Build (T -> M) (cst 1)
2624- ( fun f g => f \* g) mulrA mul1r mulr1 mulrDl mulrDr oner_neq0.
2631+ HB.instance Definition _ :=
2632+ @GRing.PzSemiRing_isNonZero.Build (T -> M) oner_neq0.
26252633
2626- End fct_ringType .
2634+ End fct_nzRingType .
26272635
2628- Program Definition fct_comRingType (T : pointedType) (M : comRingType) :=
2629- GRing.Ring_hasCommutativeMul.Build (T -> M) _.
2630- Next Obligation .
2631- by move=> T M f g; rewrite funeqE => x; rewrite /GRing.mul/= mulrC.
2632- Qed .
2633- HB.instance Definition _ (T : pointedType) (M : comRingType) :=
2634- fct_comRingType T M.
2636+ Section fct_comPzRingType.
2637+ Variables (T : Type) (M : comPzRingType).
2638+
2639+ Let mulrC : commutative (@GRing.mul (T -> M)).
2640+ Proof . by move=> f g; rewrite funeqE => x; rewrite /GRing.mul/= mulrC. Qed .
2641+
2642+ HB.instance Definition _ :=
2643+ GRing.PzRing_hasCommutativeMul.Build (T -> M) mulrC.
2644+
2645+ End fct_comPzRingType.
2646+
2647+ HB.instance Definition _ (T : pointedType) (M : comNzRingType) :=
2648+ GRing.ComPzRing.on (T -> M).
26352649
26362650Section fct_lmod.
2637- Variables (U : Type) (R : ringType ) (V : lmodType R).
2651+ Variables (U : Type) (R : pzRingType ) (V : lmodType R).
26382652Program Definition fct_lmodMixin := @GRing.Zmodule_isLmodule.Build R (U -> V)
26392653 (fun k f => k \*: f) _ _ _ _.
26402654Next Obligation . by move=> k f v; rewrite funeqE=> x; exact: scalerA. Qed .
@@ -2652,12 +2666,12 @@ Lemma fct_sumE (I T : Type) (M : nmodType) r (P : {pred I}) (f : I -> T -> M) :
26522666 \sum_(i <- r | P i) f i = fun x => \sum_(i <- r | P i) f i x.
26532667Proof . by apply/funext => ?; elim/big_rec2: _ => //= i y ? Pi <-. Qed .
26542668
2655- Lemma fct_prodE (I : Type ) (T : pointedType) (M : ringType ) r (P : {pred I})
2669+ Lemma fct_prodE (I : Type ) (T : pointedType) (M : pzRingType ) r (P : {pred I})
26562670 (f : I -> T -> M) :
26572671 \prod_(i <- r | P i) f i = fun x => \prod_(i <- r | P i) f i x.
26582672Proof . by apply/funext => ?; elim/big_rec2: _ => //= i y ? Pi <-. Qed .
26592673
2660- Lemma mul_funC (T : Type ) {R : comSemiRingType } (f : T -> R) (r : R) :
2674+ Lemma mul_funC (T : Type ) {R : comPzSemiRingType } (f : T -> R) (r : R) :
26612675 r \*o f = r \o* f.
26622676Proof . by apply/funext => x/=; rewrite mulrC. Qed .
26632677
@@ -2675,7 +2689,7 @@ Lemma sumrfctE (T : Type) (K : nmodType) (s : seq (T -> K)) :
26752689 \sum_(f <- s) f = (fun x => \sum_(f <- s) f x).
26762690Proof . exact: fct_sumE. Qed .
26772691
2678- Lemma prodrfctE (T : pointedType) (K : ringType ) (s : seq (T -> K)) :
2692+ Lemma prodrfctE (T : pointedType) (K : pzRingType ) (s : seq (T -> K)) :
26792693 \prod_(f <- s) f = (fun x => \prod_(f <- s) f x).
26802694Proof . exact: fct_prodE. Qed .
26812695
@@ -2686,19 +2700,19 @@ Proof. by elim: n => [//|n h]; rewrite funeqE=> ?; rewrite !mulrSr h. Qed.
26862700Lemma opprfctE (T : Type) (K : zmodType) (f : T -> K) : - f = (fun x => - f x).
26872701Proof . by []. Qed .
26882702
2689- Lemma mulrfctE (T : pointedType) (K : ringType ) (f g : T -> K) :
2703+ Lemma mulrfctE (T : pointedType) (K : pzRingType ) (f g : T -> K) :
26902704 f * g = (fun x => f x * g x).
26912705Proof . by []. Qed .
26922706
2693- Lemma scalrfctE (T : Type ) (K : ringType ) (L : lmodType K)
2707+ Lemma scalrfctE (T : Type ) (K : pzRingType ) (L : lmodType K)
26942708 k (f : T -> L) :
26952709 k *: f = (fun x : T => k *: f x).
26962710Proof . by []. Qed .
26972711
26982712Lemma cstE (T T': Type) (x : T) : cst x = fun _: T' => x.
26992713Proof . by []. Qed .
27002714
2701- Lemma exprfctE (T : pointedType) (K : ringType ) (f : T -> K) n :
2715+ Lemma exprfctE (T : pointedType) (K : pzRingType ) (f : T -> K) n :
27022716 f ^+ n = (fun x => f x ^+ n).
27032717Proof . by elim: n => [|n h]; rewrite funeqE=> ?; rewrite ?expr0 ?exprS ?h. Qed .
27042718
0 commit comments