Skip to content

Commit f8506ef

Browse files
authored
Merge pull request math-comp#1280 from hivert/morph-notations
Cleanup doc + standardize ssralg morphism notations
2 parents 1a73455 + 9aeaba7 commit f8506ef

File tree

7 files changed

+26
-18
lines changed

7 files changed

+26
-18
lines changed

mathcomp/algebra/mxpoly.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ have bij_phi: bijective phi.
494494
by case: leqP => // P_le_k; rewrite nth_default ?mxE.
495495
pose phiaM := GRing.isAdditive.Build _ _ phi phi_is_additive.
496496
pose phimM := GRing.isMultiplicative.Build _ _ phi phi_is_multiplicative.
497-
pose phiRM : GRing.RMorphism.type _ _ := HB.pack phi phiaM phimM.
497+
pose phiRM : {rmorphism _ -> _} := HB.pack phi phiaM phimM.
498498
exists phiRM; split=> // [p | A]; apply/polyP=> k; apply/matrixP=> i j.
499499
by rewrite coef_phi coef_map !mxE coefMn.
500500
by rewrite coef_phi !mxE !coefC; case k; last rewrite /= mxE.

mathcomp/algebra/rat.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ Lemma rat_linear U V (f : U -> V) : additive f -> scalable f.
839839
Proof.
840840
move=> fB a u.
841841
pose aM := GRing.isAdditive.Build U V f fB.
842-
pose phi : GRing.Additive.type U V := HB.pack f aM.
842+
pose phi : {additive U -> V} := HB.pack f aM.
843843
rewrite -[f]/(phi : _ -> _) -{2}[a]divq_num_den mulrC -scalerA.
844844
apply: canRL (scalerK _) _; first by rewrite intr_eq0 denq_neq0.
845845
rewrite 2!scaler_int -3!raddfMz /=.

mathcomp/algebra/ssralg.v

+17-9
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,24 @@ From mathcomp Require Import choice fintype finfun bigop prime binomial.
9696
(* such that val is a ring morphism *)
9797
(* The HB class is called SubField. *)
9898
(* *)
99-
(* Morphisms between the above structures: *)
99+
(* Morphisms between the above structures (see below for details): *)
100100
(* *)
101-
(* Additive.type U V == semi additive (resp. additive) functions between *)
102-
(* nmodType (resp. zmodType) instances U and V *)
103-
(* RMorphism.type R S == semi ring (resp. ring) morphism between *)
104-
(* semiRingType (resp. ringType) instances R and S *)
101+
(* {additive U -> V} == semi additive (resp. additive) functions between *)
102+
(* nmodType (resp. zmodType) instances U and V. This *)
103+
(* is a notation for the HB type Additive.type U V *)
104+
(* {rmorphism R -> S} == semi ring (resp. ring) morphism between *)
105+
(* semiRingType (resp. ringType) instances R and S. *)
106+
(* notation for RMorphism.type R S *)
105107
(* GRing.Scale.law R V == scaling morphism : R -> V -> V *)
106108
(* The HB class is called GRing.Scale.Law. *)
107-
(* Linear.type R U V == linear functions : U -> V *)
108-
(* LRMorphism.type R A B == linear ring morphisms, i.e., algebra morphisms *)
109+
(* {linear U -> V} == linear functions : U -> V, notation for *)
110+
(* @Linear.type R U V s where the base ring R and *)
111+
(* the scaling map s are inferred from the L-module *)
112+
(* structure of U and V *)
113+
(* {lrmorphism A -> B} == linear ring morphisms, i.e., algebra morphisms *)
114+
(* notation for @LRMorphism.type R A B s where the *)
115+
(* base ring R and scaling map s are inferred from *)
116+
(* L-algebra structures of A and B *)
109117
(* *)
110118
(* Closedness predicates for the algebraic structures: *)
111119
(* *)
@@ -141,7 +149,7 @@ From mathcomp Require Import choice fintype finfun bigop prime binomial.
141149
(* The HB class is called DivalgClosed. *)
142150
(* *)
143151
(* Canonical properties of the algebraic structures: *)
144-
(* * nmodType (additive abelian monoids): *)
152+
(* * NmodType (additive abelian monoids): *)
145153
(* 0 == the zero (additive identity) of a Nmodule *)
146154
(* x + y == the sum of x and y (in a Nmodule) *)
147155
(* x *+ n == n times x, with n in nat (non-negative), i.e., *)
@@ -157,7 +165,7 @@ From mathcomp Require Import choice fintype finfun bigop prime binomial.
157165
(* base type is a nmodType and whose predicate's is *)
158166
(* a nmodClosed *)
159167
(* *)
160-
(* * zmodType (additive abelian groups): *)
168+
(* * ZmodType (additive abelian groups): *)
161169
(* - x == the opposite (additive inverse) of x *)
162170
(* x - y == the difference of x and y; this is only notation *)
163171
(* for x + (- y) *)

mathcomp/field/algebraics_fundamentals.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ have some_realC: realC.
610610
exact: can2_rmorphism (inj_can_sym QfK (fmorph_inj _)) QfK.
611611
pose faM := GRing.isAdditive.Build _ _ _ fA.
612612
pose fmM := GRing.isMultiplicative.Build _ _ _ fM.
613-
pose fRM : GRing.RMorphism.type _ _ := HB.pack f faM fmM.
613+
pose fRM : {rmorphism _ -> _} := HB.pack f faM fmM.
614614
by exists 0, rat; exact: fRM.
615615
have /Fadjoin1_polyP/sig_eqW[q]: x \in <<1; 0>>%VS by rewrite -sQof2 rmorph0.
616616
by exists q.[0]; rewrite -horner_map rmorph0.
@@ -886,7 +886,7 @@ have conjM : multiplicative conj.
886886
by rewrite /conj -/n1 -(rmorph1 (ofQ (z_ n1))) /conj_ ofQ_K !rmorph1.
887887
have conjaM := GRing.isAdditive.Build _ _ _ conjA.
888888
have conjmM := GRing.isMultiplicative.Build _ _ _ conjM.
889-
pose conjRM : GRing.RMorphism.type _ _ := HB.pack conj conjaM conjmM.
889+
pose conjRM : {rmorphism _ -> _} := HB.pack conj conjaM conjmM.
890890
exists conjRM => [z | /(_ i)/eqP/idPn[]] /=.
891891
by have [n [/conjE-> /(conjK (n_ z))->]] := maxn3 (n_ (conj z)) (n_ z) 0.
892892
rewrite /conj/conj_ cj_i rmorphN inQ_K // eq_sym -addr_eq0 -mulr2n -mulr_natl.

mathcomp/field/algnum.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ have nu0m : multiplicative nu0.
218218
by rewrite !rmorphM /= !QnC_nu0.
219219
pose nu0aM := GRing.isAdditive.Build Qn Qn nu0 nu0a.
220220
pose nu0mM := GRing.isMultiplicative.Build Qn Qn nu0 nu0m.
221-
pose nu0RM : GRing.RMorphism.type _ _ := HB.pack nu0 nu0aM nu0mM.
221+
pose nu0RM : {rmorphism _ -> _} := HB.pack nu0 nu0aM nu0mM.
222222
pose nu0lM := GRing.isScalable.Build rat Qn Qn *:%R nu0 (fmorph_numZ nu0RM).
223223
pose nu0LRM : {lrmorphism _ -> _} := HB.pack nu0 nu0aM nu0mM nu0lM.
224224
by exists nu0LRM.
@@ -496,7 +496,7 @@ have pzn_zk0: root (map_poly \1%VF (minPoly 1 zn)) (zn ^+ k).
496496
have phim : multiplicative phi.
497497
by apply/kHom_lrmorphism; rewrite -genQn span_seq1 /= kHomExtendP.
498498
pose phimM := GRing.isMultiplicative.Build _ _ phi phim.
499-
pose phiRM : GRing.RMorphism.type _ _ := HB.pack (fun_of_lfun phi) phimM.
499+
pose phiRM : {rmorphism _ -> _} := HB.pack (fun_of_lfun phi) phimM.
500500
have [nu Dnu] := extend_algC_subfield_aut QnC phiRM.
501501
exists nu => _ /(prim_rootP prim_z)[i ->].
502502
rewrite rmorphXn /= exprAC -Dz -Dnu /= -{1}[zn]hornerX /phi.

mathcomp/field/closed_field.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ have EtoKMul i : multiplicative (EtoK i : E i -> Kfield).
882882
by split=> [x y|]; rewrite ?EtoK_M ?EtoK_1.
883883
pose EtoKMa i := GRing.isAdditive.Build _ _ _ (EtoKAdd i).
884884
pose EtoKMm i := GRing.isMultiplicative.Build _ _ _ (EtoKMul i).
885-
pose EtoKM i : GRing.RMorphism.type _ _ :=
885+
pose EtoKM i : {rmorphism _ -> _} :=
886886
HB.pack (EtoK i : E i -> Kfield) (EtoKMa i) (EtoKMm i).
887887
have EtoK_E: EtoK _ = EtoKM _ by [].
888888
have toEtoKp := @eq_map_poly _ Kring _ _(toEtoK _ _ _).

mathcomp/field/galois.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Lemma kAutf_lker0 K f : kHom K {:L} f -> lker f == 0%VS.
278278
Proof.
279279
move/(kHomSl (sub1v _))/kHom_lrmorphism=> fM.
280280
pose fmM := GRing.isMultiplicative.Build _ _ _ fM.
281-
pose fRM : GRing.RMorphism.type _ _ := HB.pack (fun_of_lfun f) fmM.
281+
pose fRM : {rmorphism _ -> _} := HB.pack (fun_of_lfun f) fmM.
282282
by apply/lker0P; apply: (fmorph_inj fRM).
283283
Qed.
284284

@@ -496,7 +496,7 @@ rewrite -DhomEz; apply/kAHomP => _ /Fadjoin_polyP[q Eq ->].
496496
have homLfj: kHom E {:L} fj := comp_kHom (inv_kHomf homLfi) homLf.
497497
have /kHom_lrmorphism fjM := kHomSl (sub1v _) homLfj.
498498
pose fjmM := GRing.isMultiplicative.Build _ _ _ fjM.
499-
pose fjRM : GRing.RMorphism.type _ _ := HB.pack (fun_of_lfun fj) fjmM.
499+
pose fjRM : {rmorphism _ -> _} := HB.pack (fun_of_lfun fj) fjmM.
500500
rewrite -[fj _](horner_map fjRM) (kHom_poly_id homLfj) //=.
501501
by rewrite (@lfunE _ _ L) /= Dfz -fi_z lker0_lfunK.
502502
Qed.

0 commit comments

Comments
 (0)