[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 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 Citro wrote: >> >

[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 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 = pol

[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@googleg

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

[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 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 I if I is no