Hi,

in the definition of a QuotientRing there is the following assumption

    ASSUMPTION:

    ``I`` has a method ``I.reduce(x)`` returning the normal form
    of elements `x\in R`. In other words, it is required that
    ``I.reduce(x)==I.reduce(y)`` `\iff x-y \in I`, and
    ``x-I.reduce(x) in I``, for all `x,y\in R`.

On the other hand, the default definition of reduce in 
sage/rings/ideal.py says
    def reduce(self, f):
        return f       # default

Wouldn't it be better to raise a NotImplementedError?

These are the consequences:

sage: Z16x.<x> = Integers(16)[]
sage: GR.<y> =  Z16x.quotient(x**2 + x+1 )
sage: I = GR.ideal(4)
sage: I.reduce(GR(6))
6 # should be reduced mod 4

another example is
sage: J = Z16x.ideal([x+1, x+1]) # just to avoid that the ideal is 
identified as a principal ideal
sage: R.<z> = Z16x.quotient(J)
sage: R(x) # should be 15

Best,
Thomas

-- 
-- 
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



Reply via email to