[sage-devel] Re: f in ZZ[x] mod p gives ZZ[x]

2009-04-24 Thread William Stein
On Fri, Apr 24, 2009 at 9:03 AM, Robert Miller rlmills...@gmail.com wrote: sage: x = polygen(ZZ) sage: f = 2*x^2 sage: f.mod(2)==0 False You should do f.mod? and read the docstring, which says: Return a representative for self modulo the ideal I (or the ideal generated by the elements of

[sage-devel] Re: f in ZZ[x] mod p gives ZZ[x]

2009-04-24 Thread Robert Miller
Worse still: sage: x = polygen(QQ) sage: h = 4*x sage: h%3 0 --~--~-~--~~~---~--~~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit

[sage-devel] Re: f in ZZ[x] mod p gives ZZ[x]

2009-04-24 Thread Craig Citro
Worse still: sage: x = polygen(QQ) sage: h = 4*x sage: h%3 0 Over QQ[x], isn't 4*x = 3 * (4/3*x) ? Over ZZ, it's fine: sage: x = polygen(ZZ) sage: h = 4*x sage: h%3 x -cc --~--~-~--~~~---~--~~ To post to this group, send email to

[sage-devel] Re: f in ZZ[x] mod p gives ZZ[x]

2009-04-24 Thread Robert Miller
Yeah, I should have mentioned that my point was that maybe h%3 should raise an error over QQ. On Apr 24, 11:00 am, Craig Citro craigci...@gmail.com wrote: Worse still: sage: x = polygen(QQ) sage: h = 4*x sage: h%3 0 Over QQ[x], isn't 4*x = 3 * (4/3*x) ? Over ZZ, it's fine: sage: x

[sage-devel] Re: f in ZZ[x] mod p gives ZZ[x]

2009-04-24 Thread William Stein
On Fri, Apr 24, 2009 at 11:53 AM, Robert Miller rlmills...@gmail.com wrote: Yeah, I should have mentioned that my point was that maybe h%3 should raise an error over QQ. Over QQ, the number 3 generates the unit ideal, so everything is 0 modulo it :-). William On Apr 24, 11:00 am, Craig