On Monday, August 17, 2020 at 6:04:41 AM UTC-7, John Cremona wrote: > > I'm sure this used to work: > > sage: F = GF(2) > sage: r = 5/3 > sage: F(1)*r > TypeError: unsupported operand parent(s) for *: 'Finite Field of size > 2' and 'Rational Field' > > Of course I know that the could not be a coercion from QQ to GF(2) but > there is a conversion which works fine (when the denominator is odd): >
It would surprise me if this used to work. Perhaps a LONG time ago? It shouldn't work, because of the reason you mention [conversions aren't used for figuring out common parents]. What *does* work is F(1)*5/3 because it's parsed as (F(1)*5)/3: dividing by integers is something that GF(2) allows. If one would absolutely be intent on making it work, I guess one solution could be to have a (partial) multiplicative action of Q on GF(q); or more generally: on ZZ-modules. It would just have to be a lower priority solution than common parent finding. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/7bf29720-d8da-402b-9e0a-fdb295e6aca4o%40googlegroups.com.