Subject: Ssreflect Users Discussion List
List archive
- From: Florent Hivert <>
- To: "" <>
- Subject: [ssreflect] algebras and module over two base ring
- Date: Wed, 23 Oct 2019 19:01:45 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:G2DFHhfz0kcUCuj4CiXjfZkClGMj4u6mDksu8pMizoh2WeGdxcu+YB7h7PlgxGXEQZ/co6odzbaP6OawCCdZucjJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanbr5+MRu7oR/Su8QSjoduN7o9xxrUqXZUZupawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnFVguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hCoBKjU09nzchM5tg6JBuB+vqRxxzZDJbo+WO/VxYr7Sct0BSGpdQspdSzBNDp+mYocRCecKIOZWr5P6p1sLtRawBQ2sBOT1yjBWgH/2wbAx3eYgEQHYwgMgBc4Ou2nTodv1MKcSVvq1w7fOzTXfdf9Y2zb96JbWfRA7vfGBRrZwcdDQyUU1GQPFlEydpIr4ND2WzuQAq3WX4/RkWO61lmIqqQF8riKyysoskIXFm54Zx1bZ/itj2ok1P8e3SEtjbN6kDpRQsyaaOpNzQsw4QmFovDg1y7IauZKheCgK0pUnywTRa/yda4SI4xTjW/iNITpgmX5pZrayiwyv/UWiyuDwTNS43VZQoiZYjtXArnUN2AbS6siDRPt95ECh2TOX2g7T7uFEJlo0mrTdK5492LI+lJsTsVrdES/shEX7l6uWdl8l+uSy5eTneK3qpoWAOI9slgH+LqMul9SkAeQjKAgBQWab+eCi27L/4U30W65Kj/0zkqnBqp/WP8UbpqijAw9UyIkv8Ri/Dy31mOgfyDMcN0hIdhaKhJTBPkrUZfH+F/a2xVWqijZigf7cdPW1GY7XI3bHnbz9VbNm8QtdzhAyxJZe4YhVA/cPOqSgdFX2sYn2ChgjPgqoi8bmFthnystKd2aIGKKfLOXysEGF/P4HJ/ONIoEP7mWuY8M57uLj2Cdq0WQWerOkiMNOOSKIW89+KkDcWkLCx9IIEGMEpA07HL7uklzEXyQBPi/uDZJ53SkyDcedNamGXpqk0O6Fxib9EIcEPjkbWGDJKm/hcsC/Y9lJaC+WJZY/wDkNVLysW5Nn0Quv8gHgmeJq
Dear all,
I'd like to build polynomials or series whose coefficients are polynomials or
series themself. More generally, if A is an R-algebra, then any module over A
is automatically a R-module. Here is a formalization of this fact:
Variable (R : ringType) (A : lalgType R) (B : lmodType A).
Definition scale_algmod (r : R) (b : B) : B := r%:A *: b.
Lemma scale_algmodE r b : scale_algmod r b = in_alg A r *: b.
Proof. by rewrite /scale_algmod -!in_algE. Qed.
Program Definition algmod_lmodMixin :=
@LmodMixin R [zmodType of B] scale_algmod _ _ _ _.
Next Obligation. by rewrite !scale_algmodE scalerA -rmorphM in_algE. Qed.
Next Obligation. by move=> b; rewrite scale_algmodE rmorph1 scale1r. Qed.
Next Obligation. by move=> r b1 b2; rewrite scale_algmodE -scalerDr. Qed.
Next Obligation. by move=> r1 r2; rewrite scale_algmodE -scalerDl raddfD.
Qed.
Canonical algmod_lmodType := Eval hnf in LmodType R B algmod_lmodMixin.
However after that
Variable (R : ringType).
Let Truc := [lmodType R of {poly {poly R}}].
I get the error
Error:
In environment
R : ringType
x : phantom (GRing.Lmodule.class_of R ?cT) (GRing.Lmodule.class ?cT)
The term "x" has type
"phantom (GRing.Lmodule.class_of R ?cT) (GRing.Lmodule.class ?cT)"
while it is expected to have type
"phantom (GRing.Lmodule.class_of R {poly {poly R}}) ?c".
which I interpret as "I can't manage to find an R-module structure for the
type {poly {poly R}}". Is that interpretation correct ? This seems to be
confirmed by
Canonical bla_lmodType :=
Eval hnf in LmodType R {poly {poly R}}
(algmod_lmodMixin [lmodType {poly R} of {poly {poly
R}}]).
leading to the warning
Warning: Ignoring canonical projection to poly_of by GRing.Lmodule.sort in
bla_lmodType: redundant with poly_lmodType
Is my understanding correct that There Can Be Only One(tm) *-mod structure for
a type, even with different ring ? If so, is there a simple way to get around
this limitation. I imagine that one can define two trivially isomorphic
objects one for each structure, but I don't know how robust and practical this
can be. Any example of that ?
Best,
Florent
- [ssreflect] algebras and module over two base ring, Florent Hivert, 10/23/2019
- Re: [ssreflect] algebras and module over two base ring, Cyril Cohen, 10/23/2019
Archive powered by MHonArc 2.6.18.