On 29 February 2016 at 14:19, Ben Hutz <bn4...@gmail.com> wrote: > I was exploring some quotient ring operations and came across the following: > > {{{ > R.<y>=QQ[] > K.<w>=NumberField(y^3 + 2*y - 2401) > k.<v>=K.quo(K.prime_factors(7)[1]) > R.<x,y>=PolynomialRing(k) > R.monomial_divides(y,x^3*y) > Error > }}} > > {{{ > R.<y>=QQ[] > K.<w>=NumberField(y^3 + 2*y - 2401) > k.<v>=K.residue_field(K.prime_factors(7)[1]) > R.<x,y>=PolynomialRing(k) > R.monomial_divides(y,x^3*y) > True > }}} > > The second works, the first does not. I came across this since > .monomial_divides is used is a groebner basis computation. So played around
I am not sure what you are expecting to get by doing K.quo(P) where P is an ideal of the ring oif integers of K. The result seems to know lottle about itself and have no functionality, while K.residue_field(P) does what you would expect. > a little more and the following seems weirder > > {{{ > A.<x,y,z> = PolynomialRing(Zmod(42)) > A.monomial_divides(y,x^2*y) > True > }}} > > {{{ > A.<x,y,z> = PolynomialRing(Zmod(2521515232)) #but one less digit works > A.monomial_divides(y,x^2*y) > Error > }} > > The first works, but the 2nd does not, even though neither is prime. It > seems to have to do with what type of polynomial ring they are initialized > as, but I had a hard time tracking down where that code lived and how it > decided. Is there someone familiar with polynomial rings in Sage who could > shed some light on whether this is expected behavior? I don't know about this one but do not find it surprising that Zmod(n) should give a different type of object depending on the value of n. For one thing, n may or may not be prime, and it may or may not b sensible to take the time to check that. John > > Thanks, > Ben > > -- > 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 post to this group, send email to sage-devel@googlegroups.com. > Visit this group at https://groups.google.com/group/sage-devel. > For more options, visit https://groups.google.com/d/optout. -- 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 post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.