It seemed weird to me to move the functions from 
MPolynomialRing_polydict_domain to
their parent MPolynomialRing_polydict as they were probably implemented 
their for a particular reason, but in looking at the functions it didn't 
seem like losing the domain property would cause any issues, but as I said 
above, I'm not super confident on what types of poly rings end up in which 
classes. All tests pass, so I didn't break any doc tests...

#20152 is ready for review.

just as an fyi and it seems like they were programmed knowing this already, 
but you get some weird behavior with bad inputs:

{{{
A.<x,y,z> = PolynomialRing(GF(17))
A.monomial_quotient(y,x^2*y)
x^1048574*y^1048575*z^1048575
}}}

On Tuesday, March 1, 2016 at 11:27:17 AM UTC-6, Ben Hutz wrote:
>
> ok. I can do that later this week.
>
> On Tuesday, March 1, 2016 at 11:22:04 AM UTC-6, David Roe wrote:
>>
>> The only reason that monomial_divides is unimplemented there is that 
>> nobody has done it yet.  :-)
>> David
>>
>> On Tue, Mar 1, 2016 at 12:20 PM, Ben Hutz <bn4...@gmail.com> wrote:
>>
>>> ok, so that is what the logic is.
>>>
>>> Not begin familiar with the different polynomial ring classes: is there 
>>> a reason not to implement the monomial_divides function in that class? I 
>>> think the current function just checks the exponents and it's lack is 
>>> preventing the groebner basis from running.
>>>
>>> On Monday, February 29, 2016 at 2:25:45 PM UTC-6, David Roe wrote:
>>>>
>>>>
>>>>
>>>> On Mon, Feb 29, 2016 at 9:19 AM, 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 
>>>>> 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?
>>>>>
>>>>
>>>> The difference is that we use singular over Z/n for small enough n.  
>>>> You can detect this in the types of the polynomial rings:
>>>>
>>>> sage: A.<x,y,z> = PolynomialRing(Zmod(42))
>>>> sage: type(A)
>>>> <type 
>>>> 'sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular'>
>>>> sage: A.<x,y,z> = PolynomialRing(Zmod(2521515232))
>>>> sage: type(A)
>>>> <class 
>>>> 'sage.rings.polynomial.multi_polynomial_ring.MPolynomialRing_polydict_with_category'>
>>>>
>>>> The monomial_divides method just isn't implemented 
>>>> for MPolynomialRing_polydict.
>>>> David
>>>>
>>>>>
>>>>> 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+...@googlegroups.com.
>>>>> To post to this group, send email to sage-...@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.

Reply via email to