[sage-devel] Re: Need help with coercion

2010-07-13 Thread Volker Braun
I see, there is an inheritance chain QuotientRing_generic -> IntegerModRing_generic -> FiniteField_prime_modn and they all circumvent the "official" coercion model. That at least explains why polynomials over finite fields break when changing QuotientRing_generic! Volker -- To post to this gro

[sage-devel] Re: Need help with coercion

2010-07-11 Thread Simon King
On 11 Jul., 02:29, Andrey Novoseltsev wrote: > So - what's going on in this example? _element_constructor_ is > improperly bound so that a wrong version gets called?.. I don't think so.I tried to insert some print statements in the element constructor, and it seems that the right constructor *is*

[sage-devel] Re: Need help with coercion

2010-07-10 Thread Andrey Novoseltsev
On Jul 7, 2:51 pm, Simon King wrote: > Hi Volker! > > On 7 Jul., 20:30, Volker Braun wrote: > > > sage: FF = FiniteField(7) > > sage: P. = PolynomialRing(FiniteField(7)) > > sage: x+1 > > Apparently the problem is in the _element_constructor_: > > sage: P(1) > ... > /home/king/SAGE/sage-4.4.2/loc

[sage-devel] Re: Need help with coercion

2010-07-07 Thread Simon King
Hi Volker! On 7 Jul., 20:30, Volker Braun wrote: > sage: FF = FiniteField(7) > sage: P. = PolynomialRing(FiniteField(7)) > sage: x+1 Apparently the problem is in the _element_constructor_: sage: P(1) ... /home/king/SAGE/sage-4.4.2/local/lib/python2.6/site-packages/sage/ rings/polynomial/polynom