This sounds reasonable to me. I know that in general we do not want to try to coerce from Z/nZ to GF(n) for prime n since we do not want to prove primality except deliberately. The reverse coercion is a forgetful functor, so safe. But i nyour example, both GF(p) and Z/pZ already exist, in which case it is surely good to coerce from the ring to the field.
Of course I may have missed a lot of the point of your suggestion... John On Wed, Nov 24, 2010 at 12:53 PM, Simon King <simon.k...@uni-jena.de> wrote: > On 24 Nov., 12:54, Simon King <simon.k...@uni-jena.de> wrote: >> But since the __mul__ method also covers the case of matrix times >> vector etc, the existing __mul__ method should be split into a _mul_ >> method and a _act_on_ method. > > Or like this: In the existing __mul__ method, it is first tested > whether the parents are the same, and otherwise the coercion model is > used. Hence, the solution could be to play with construction functors > and stuff, which I kind of like. > > So, if that works, I'll do it so. > > Cheers, > Simon > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org