On Mon, Aug 17, 2009 at 9:41 PM, Ondrej Certik<ond...@certik.cz> wrote:
> On Mon, Aug 17, 2009 at 5:31 AM, William Stein<wst...@gmail.com> wrote:
>>
>> On Mon, Aug 17, 2009 at 3:20 AM, Ondrej Certik<ond...@certik.cz> wrote:
>>>
>>> On Mon, Aug 17, 2009 at 4:09 AM, Ondrej Certik<ond...@certik.cz> wrote:
>>>> On Mon, Aug 17, 2009 at 3:51 AM, William Stein<wst...@gmail.com> wrote:
>>>>>
>>>>> On Mon, Aug 17, 2009 at 2:40 AM, Ondrej Certik<ond...@certik.cz> wrote:
>>>>>>
>>>>>> On Mon, Aug 17, 2009 at 2:26 AM, William Stein<wst...@gmail.com> wrote:
>>>>>>>
>>>>>>> On Mon, Aug 17, 2009 at 1:14 AM, Ondrej Certik<ond...@certik.cz> wrote:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> at the scipy 09 conference I am going to compare Sage and sympy
>>>>>>>> approaches to factoring (and timings) and longer term approaches, so I
>>>>>>>> have a few questions about it, so that I understand things correctly.
>>>>>>>> If I do:
>>>>>>>>
>>>>>>>> sage: var("x y z")
>>>>>>>> (x, y, z)
>>>>>>>> sage: a = (x+y+z)**20
>>>>>>>> sage: b = a.expand()
>>>>>>>> sage: %time c = factor(b)
>>>>>>>> CPU times: user 0.14 s, sys: 0.00 s, total: 0.15 s
>>>>>>>> Wall time: 0.15 s
>>>>>>>>
>>>>>>>>
>>>>>>>> 1) it uses pari, right?
>>>>>>>
>>>>>>> NO.  Pari has no functionality at all for doing anything nontrivial
>>>>>>> with multivariate polynomials.    Do b.factor?? to see the source.
>>>>>>> Sage tries to convert b to a poly over QQ, this works, then it calls
>>>>>>> SINGULAR to factor that.  If conversion doesn't work, it falls back to
>>>>>>> Maxima right now.
>>>>>>
>>>>>> Thanks for all the clarifications, this answers all my questions. I
>>>>>> was looking into the function couple days ago and I don't know how I
>>>>>> got the impression that it uses pari -- when I looked now, it indeed
>>>>>> uses singular and spends most of the time in the conversion.
>>>>>>
>>>>>> We are now roughly on the level of maxima with our new not yet
>>>>>> reviewed poly patches to sympy:
>>>>>>
>>>>>> http://code.google.com/p/sympy/issues/detail?id=1598
>>>>>>
>>>>>> and with gmpy (but otherwise still pure python) it's only about 4x
>>>>>> slower than sage + singular, but that's because Sage also is pure
>>>>>> python here, so after cythonizing the conversion in Sage it will
>>>>>> probably be 100x faster (as you suggested) --- so I am curious how
>>>>>> fast sympy's factor will be after cythonizing it a bit too.
>>>>>> Essentially to make fair comparisons in the long term, I'll keep in
>>>>>> mind that singular is the potential top speed here (assuming you can
>>>>>> optimize the conversion back and forth). You also mentioned that
>>>>>> singular itself can be sped up, but I have no idea how much, as I am
>>>>>> not an expert in this multivariate factoring business at all (Mateusz
>>>>>> Paprocki, who wrote the sympy patches, is).
>>>>>
>>>>> I think that if you want to get a good sense of how fast multivariate
>>>>> factorization *should* be, it is valuable to benchmark Magma, Maple,
>>>>> and Mathematica.
>>>>>
>>>>> If you want some specific benchmarks for Magma, let me know and I can
>>>>> compute them (if you don't have access).  Maple and Mathematica are
>>>>> both on sage.math, so you have access.
>>>>
>>>> Yes, I tried Mathematica couple days ago on the above examples and
>>>> it's pretty fast. But singular seems to be faster on sage.math:
>>>>
>>>> In[9]:= Timing[Factor[b]]
>>>>
>>>>                          50
>>>> Out[9]= {0.07, (x + y + z)  }
>>>>
>>>> sage: a = (x+y+z)**50
>>>> sage: time factor(a)
>>>> CPU times: user 0.04 s, sys: 0.00 s, total: 0.04 s
>>>> Wall time: 0.04 s
>>>> (x + y + z)^50
>>>>
>>>> but one has to be fair, that mathematica converts back and forth
>>>> between the symbolic expression,
>>
>> Does it?  Who knows what Mathematica does?
>
> That's right -- what I meant is that mathematica kind of hides it,
> e.g. it behaves just like an expression, if you know what I mean. I
> have no idea what it does below the hood.
>
> Many thanks for the bechmarks and the long email. I'll use it in the
> presentation. So sympy can't yet expand and factor things like:
>
> (x+y)^2+1
>
> so for your example it only factors it to a a mul of two expressions,
> but that's now enough. We still need to improve it.

Ok, I was wrong, neither of those systems is doing it. So I tried the example:

 ((x+y+z)^20+1)*((x+y+z)^20+2)

in sympy and it takes about 5 minutes in sympy (I didn't try the one with ^30).

But arguably, the output of the factor (even in Sage) is quite
useless, just look at the expression:

sage: factor(b)
(x^2 + 2*x*y + 2*x*z + y^2 + 2*y*z + z^2 + 1)*(x^4 + 4*x^3*y + 4*x^3*z
+ 6*x^2*y^2 + 12*x^2*y*z + 6*x^2*z^2 + 4*x*y^3 + 12*x*y^2*z +
12*x*y*z^2 + 4*x*z^3 - x^2 + y^4 + 4*y^3*z + 6*y^2*z^2 + 4*y*z^3 -
2*x*z - y^2 + z^4 - 2*x*y - 2*y*z - z^2 + 1)*(x^8 + 8*x^7*y + 8*x^7*z
+ 28*x^6*y^2 + 56*x^6*y*z + 28*x^6*z^2 + 56*x^5*y^3 + 168*x^5*y^2*z +
168*x^5*y*z^2 + 56*x^5*z^3 + 70*x^4*y^4 + 280*x^4*y^3*z +
420*x^4*y^2*z^2 + 280*x^4*y*z^3 + 70*x^4*z^4 + 56*x^3*y^5 +
280*x^3*y^4*z + 560*x^3*y^3*z^2 + 560*x^3*y^2*z^3 + 280*x^3*y*z^4 +
56*x^3*z^5 + 28*x^2*y^6 + 168*x^2*y^5*z + 420*x^2*y^4*z^2 +
560*x^2*y^3*z^3 + 420*x^2*y^2*z^4 + 168*x^2*y*z^5 + 28*x^2*z^6 +
8*x*y^7 + 56*x*y^6*z + 168*x*y^5*z^2 + 280*x*y^4*z^3 + 280*x*y^3*z^4 +
168*x*y^2*z^5 + 56*x*y*z^6 + 8*x*z^7 - x^6 + x^4 - x^2 + y^8 + 8*y^7*z
+ 28*y^6*z^2 + 56*y^5*z^3 + 70*y^4*z^4 + 56*y^3*z^5 + 28*y^2*z^6 +
8*y*z^7 - 6*x^5*z - 30*x^4*y*z - 15*x^4*z^2 - 60*x^3*y^2*z -
60*x^3*y*z^2 - 20*x^3*z^3 - 60*x^2*y^3*z - 90*x^2*y^2*z^2 -
60*x^2*y*z^3 - 15*x^2*z^4 - 30*x*y^4*z - 60*x*y^3*z^2 - 60*x*y^2*z^3 -
30*x*y*z^4 - 6*x*z^5 - y^6 + 4*x^3*z + 12*x^2*y*z + 6*x^2*z^2 +
12*x*y^2*z + 12*x*y*z^2 + 4*x*z^3 + y^4 - 2*x*z - y^2 + z^8 - 6*x^5*y
- 15*x^4*y^2 - 20*x^3*y^3 - 15*x^2*y^4 - 6*x*y^5 - 6*y^5*z -
15*y^4*z^2 - 20*y^3*z^3 - 15*y^2*z^4 - 6*y*z^5 - z^6 + 4*x^3*y +
6*x^2*y^2 + 4*x*y^3 + 4*y^3*z + 6*y^2*z^2 + 4*y*z^3 + z^4 - 2*x*y -
2*y*z - z^2 + 1)*(x^16 + 16*x^15*y + 16*x^15*z + 120*x^14*y^2 +
240*x^14*y*z + 120*x^14*z^2 + 560*x^13*y^3 + 1680*x^13*y^2*z +
1680*x^13*y*z^2 + 560*x^13*z^3 + 1820*x^12*y^4 + 7280*x^12*y^3*z +
10920*x^12*y^2*z^2 + 7280*x^12*y*z^3 + 1820*x^12*z^4 + 4368*x^11*y^5 +
21840*x^11*y^4*z + 43680*x^11*y^3*z^2 + 43680*x^11*y^2*z^3 +
21840*x^11*y*z^4 + 4368*x^11*z^5 + 8008*x^10*y^6 + 48048*x^10*y^5*z +
120120*x^10*y^4*z^2 + 160160*x^10*y^3*z^3 + 120120*x^10*y^2*z^4 +
48048*x^10*y*z^5 + 8008*x^10*z^6 + 11440*x^9*y^7 + 80080*x^9*y^6*z +
240240*x^9*y^5*z^2 + 400400*x^9*y^4*z^3 + 400400*x^9*y^3*z^4 +
240240*x^9*y^2*z^5 + 80080*x^9*y*z^6 + 11440*x^9*z^7 + 12870*x^8*y^8 +
102960*x^8*y^7*z + 360360*x^8*y^6*z^2 + 720720*x^8*y^5*z^3 +
900900*x^8*y^4*z^4 + 720720*x^8*y^3*z^5 + 360360*x^8*y^2*z^6 +
102960*x^8*y*z^7 + 12870*x^8*z^8 + 11440*x^7*y^9 + 102960*x^7*y^8*z +
411840*x^7*y^7*z^2 + 960960*x^7*y^6*z^3 + 1441440*x^7*y^5*z^4 +
1441440*x^7*y^4*z^5 + 960960*x^7*y^3*z^6 + 411840*x^7*y^2*z^7 +
102960*x^7*y*z^8 + 11440*x^7*z^9 + 8008*x^6*y^10 + 80080*x^6*y^9*z +
360360*x^6*y^8*z^2 + 960960*x^6*y^7*z^3 + 1681680*x^6*y^6*z^4 +
2018016*x^6*y^5*z^5 + 1681680*x^6*y^4*z^6 + 960960*x^6*y^3*z^7 +
360360*x^6*y^2*z^8 + 80080*x^6*y*z^9 + 8008*x^6*z^10 + 4368*x^5*y^11 +
48048*x^5*y^10*z + 240240*x^5*y^9*z^2 + 720720*x^5*y^8*z^3 +
1441440*x^5*y^7*z^4 + 2018016*x^5*y^6*z^5 + 2018016*x^5*y^5*z^6 +
1441440*x^5*y^4*z^7 + 720720*x^5*y^3*z^8 + 240240*x^5*y^2*z^9 +
48048*x^5*y*z^10 + 4368*x^5*z^11 + 1820*x^4*y^12 + 21840*x^4*y^11*z +
120120*x^4*y^10*z^2 + 400400*x^4*y^9*z^3 + 900900*x^4*y^8*z^4 +
1441440*x^4*y^7*z^5 + 1681680*x^4*y^6*z^6 + 1441440*x^4*y^5*z^7 +
900900*x^4*y^4*z^8 + 400400*x^4*y^3*z^9 + 120120*x^4*y^2*z^10 +
21840*x^4*y*z^11 + 1820*x^4*z^12 + 560*x^3*y^13 + 7280*x^3*y^12*z +
43680*x^3*y^11*z^2 + 160160*x^3*y^10*z^3 + 400400*x^3*y^9*z^4 +
720720*x^3*y^8*z^5 + 960960*x^3*y^7*z^6 + 960960*x^3*y^6*z^7 +
720720*x^3*y^5*z^8 + 400400*x^3*y^4*z^9 + 160160*x^3*y^3*z^10 +
43680*x^3*y^2*z^11 + 7280*x^3*y*z^12 + 560*x^3*z^13 + 120*x^2*y^14 +
1680*x^2*y^13*z + 10920*x^2*y^12*z^2 + 43680*x^2*y^11*z^3 +
120120*x^2*y^10*z^4 + 240240*x^2*y^9*z^5 + 360360*x^2*y^8*z^6 +
411840*x^2*y^7*z^7 + 360360*x^2*y^6*z^8 + 240240*x^2*y^5*z^9 +
120120*x^2*y^4*z^10 + 43680*x^2*y^3*z^11 + 10920*x^2*y^2*z^12 +
1680*x^2*y*z^13 + 120*x^2*z^14 + 16*x*y^15 + 240*x*y^14*z +
1680*x*y^13*z^2 + 7280*x*y^12*z^3 + 21840*x*y^11*z^4 +
48048*x*y^10*z^5 + 80080*x*y^9*z^6 + 102960*x*y^8*z^7 +
102960*x*y^7*z^8 + 80080*x*y^6*z^9 + 48048*x*y^5*z^10 +
21840*x*y^4*z^11 + 7280*x*y^3*z^12 + 1680*x*y^2*z^13 + 240*x*y*z^14 +
16*x*z^15 + x^14 - x^10 - x^8 - x^6 + x^2 + y^16 + 16*y^15*z +
120*y^14*z^2 + 560*y^13*z^3 + 1820*y^12*z^4 + 4368*y^11*z^5 +
8008*y^10*z^6 + 11440*y^9*z^7 + 12870*y^8*z^8 + 11440*y^7*z^9 +
8008*y^6*z^10 + 4368*y^5*z^11 + 1820*y^4*z^12 + 560*y^3*z^13 +
120*y^2*z^14 + 16*y*z^15 + 14*x^13*z + 182*x^12*y*z + 91*x^12*z^2 +
1092*x^11*y^2*z + 1092*x^11*y*z^2 + 364*x^11*z^3 + 4004*x^10*y^3*z +
6006*x^10*y^2*z^2 + 4004*x^10*y*z^3 + 1001*x^10*z^4 + 10010*x^9*y^4*z
+ 20020*x^9*y^3*z^2 + 20020*x^9*y^2*z^3 + 10010*x^9*y*z^4 +
2002*x^9*z^5 + 18018*x^8*y^5*z + 45045*x^8*y^4*z^2 + 60060*x^8*y^3*z^3
+ 45045*x^8*y^2*z^4 + 18018*x^8*y*z^5 + 3003*x^8*z^6 + 24024*x^7*y^6*z
+ 72072*x^7*y^5*z^2 + 120120*x^7*y^4*z^3 + 120120*x^7*y^3*z^4 +
72072*x^7*y^2*z^5 + 24024*x^7*y*z^6 + 3432*x^7*z^7 + 24024*x^6*y^7*z +
84084*x^6*y^6*z^2 + 168168*x^6*y^5*z^3 + 210210*x^6*y^4*z^4 +
168168*x^6*y^3*z^5 + 84084*x^6*y^2*z^6 + 24024*x^6*y*z^7 +
3003*x^6*z^8 + 18018*x^5*y^8*z + 72072*x^5*y^7*z^2 +
168168*x^5*y^6*z^3 + 252252*x^5*y^5*z^4 + 252252*x^5*y^4*z^5 +
168168*x^5*y^3*z^6 + 72072*x^5*y^2*z^7 + 18018*x^5*y*z^8 +
2002*x^5*z^9 + 10010*x^4*y^9*z + 45045*x^4*y^8*z^2 +
120120*x^4*y^7*z^3 + 210210*x^4*y^6*z^4 + 252252*x^4*y^5*z^5 +
210210*x^4*y^4*z^6 + 120120*x^4*y^3*z^7 + 45045*x^4*y^2*z^8 +
10010*x^4*y*z^9 + 1001*x^4*z^10 + 4004*x^3*y^10*z + 20020*x^3*y^9*z^2
+ 60060*x^3*y^8*z^3 + 120120*x^3*y^7*z^4 + 168168*x^3*y^6*z^5 +
168168*x^3*y^5*z^6 + 120120*x^3*y^4*z^7 + 60060*x^3*y^3*z^8 +
20020*x^3*y^2*z^9 + 4004*x^3*y*z^10 + 364*x^3*z^11 + 1092*x^2*y^11*z +
6006*x^2*y^10*z^2 + 20020*x^2*y^9*z^3 + 45045*x^2*y^8*z^4 +
72072*x^2*y^7*z^5 + 84084*x^2*y^6*z^6 + 72072*x^2*y^5*z^7 +
45045*x^2*y^4*z^8 + 20020*x^2*y^3*z^9 + 6006*x^2*y^2*z^10 +
1092*x^2*y*z^11 + 91*x^2*z^12 + 182*x*y^12*z + 1092*x*y^11*z^2 +
4004*x*y^10*z^3 + 10010*x*y^9*z^4 + 18018*x*y^8*z^5 + 24024*x*y^7*z^6
+ 24024*x*y^6*z^7 + 18018*x*y^5*z^8 + 10010*x*y^4*z^9 +
4004*x*y^3*z^10 + 1092*x*y^2*z^11 + 182*x*y*z^12 + 14*x*z^13 + y^14 -
10*x^9*z - 90*x^8*y*z - 45*x^8*z^2 - 360*x^7*y^2*z - 360*x^7*y*z^2 -
120*x^7*z^3 - 840*x^6*y^3*z - 1260*x^6*y^2*z^2 - 840*x^6*y*z^3 -
210*x^6*z^4 - 1260*x^5*y^4*z - 2520*x^5*y^3*z^2 - 2520*x^5*y^2*z^3 -
1260*x^5*y*z^4 - 252*x^5*z^5 - 1260*x^4*y^5*z - 3150*x^4*y^4*z^2 -
4200*x^4*y^3*z^3 - 3150*x^4*y^2*z^4 - 1260*x^4*y*z^5 - 210*x^4*z^6 -
840*x^3*y^6*z - 2520*x^3*y^5*z^2 - 4200*x^3*y^4*z^3 - 4200*x^3*y^3*z^4
- 2520*x^3*y^2*z^5 - 840*x^3*y*z^6 - 120*x^3*z^7 - 360*x^2*y^7*z -
1260*x^2*y^6*z^2 - 2520*x^2*y^5*z^3 - 3150*x^2*y^4*z^4 -
2520*x^2*y^3*z^5 - 1260*x^2*y^2*z^6 - 360*x^2*y*z^7 - 45*x^2*z^8 -
90*x*y^8*z - 360*x*y^7*z^2 - 840*x*y^6*z^3 - 1260*x*y^5*z^4 -
1260*x*y^4*z^5 - 840*x*y^3*z^6 - 360*x*y^2*z^7 - 90*x*y*z^8 - 10*x*z^9
- y^10 - 8*x^7*z - 56*x^6*y*z - 28*x^6*z^2 - 168*x^5*y^2*z -
168*x^5*y*z^2 - 56*x^5*z^3 - 280*x^4*y^3*z - 420*x^4*y^2*z^2 -
280*x^4*y*z^3 - 70*x^4*z^4 - 280*x^3*y^4*z - 560*x^3*y^3*z^2 -
560*x^3*y^2*z^3 - 280*x^3*y*z^4 - 56*x^3*z^5 - 168*x^2*y^5*z -
420*x^2*y^4*z^2 - 560*x^2*y^3*z^3 - 420*x^2*y^2*z^4 - 168*x^2*y*z^5 -
28*x^2*z^6 - 56*x*y^6*z - 168*x*y^5*z^2 - 280*x*y^4*z^3 -
280*x*y^3*z^4 - 168*x*y^2*z^5 - 56*x*y*z^6 - 8*x*z^7 - y^8 - 6*x^5*z -
30*x^4*y*z - 15*x^4*z^2 - 60*x^3*y^2*z - 60*x^3*y*z^2 - 20*x^3*z^3 -
60*x^2*y^3*z - 90*x^2*y^2*z^2 - 60*x^2*y*z^3 - 15*x^2*z^4 - 30*x*y^4*z
- 60*x*y^3*z^2 - 60*x*y^2*z^3 - 30*x*y*z^4 - 6*x*z^5 - y^6 + 2*x*z +
y^2 + z^16 + 14*x^13*y + 91*x^12*y^2 + 364*x^11*y^3 + 1001*x^10*y^4 +
2002*x^9*y^5 + 3003*x^8*y^6 + 3432*x^7*y^7 + 3003*x^6*y^8 +
2002*x^5*y^9 + 1001*x^4*y^10 + 364*x^3*y^11 + 91*x^2*y^12 + 14*x*y^13
+ 14*y^13*z + 91*y^12*z^2 + 364*y^11*z^3 + 1001*y^10*z^4 +
2002*y^9*z^5 + 3003*y^8*z^6 + 3432*y^7*z^7 + 3003*y^6*z^8 +
2002*y^5*z^9 + 1001*y^4*z^10 + 364*y^3*z^11 + 91*y^2*z^12 + 14*y*z^13
+ z^14 - 10*x^9*y - 45*x^8*y^2 - 120*x^7*y^3 - 210*x^6*y^4 -
252*x^5*y^5 - 210*x^4*y^6 - 120*x^3*y^7 - 45*x^2*y^8 - 10*x*y^9 -
10*y^9*z - 45*y^8*z^2 - 120*y^7*z^3 - 210*y^6*z^4 - 252*y^5*z^5 -
210*y^4*z^6 - 120*y^3*z^7 - 45*y^2*z^8 - 10*y*z^9 - z^10 - 8*x^7*y -
28*x^6*y^2 - 56*x^5*y^3 - 70*x^4*y^4 - 56*x^3*y^5 - 28*x^2*y^6 -
8*x*y^7 - 8*y^7*z - 28*y^6*z^2 - 56*y^5*z^3 - 70*y^4*z^4 - 56*y^3*z^5
- 28*y^2*z^6 - 8*y*z^7 - z^8 - 6*x^5*y - 15*x^4*y^2 - 20*x^3*y^3 -
15*x^2*y^4 - 6*x*y^5 - 6*y^5*z - 15*y^4*z^2 - 20*y^3*z^3 - 15*y^2*z^4
- 6*y*z^5 - z^6 + 2*x*y + 2*y*z + z^2 + 1)*(x^30 + 30*x^29*y +
30*x^29*z + 435*x^28*y^2 + 870*x^28*y*z + 435*x^28*z^2 + 4060*x^27*y^3
+ 12180*x^27*y^2*z + 12180*x^27*y*z^2 + 4060*x^27*z^3 + 27405*x^26*y^4
+ 109620*x^26*y^3*z + 164430*x^26*y^2*z^2 + 109620*x^26*y*z^3 +
27405*x^26*z^4 + 142506*x^25*y^5 + 712530*x^25*y^4*z +
1425060*x^25*y^3*z^2 + 1425060*x^25*y^2*z^3 + 712530*x^25*y*z^4 +
142506*x^25*z^5 + 593775*x^24*y^6 + 3562650*x^24*y^5*z +
8906625*x^24*y^4*z^2 + 11875500*x^24*y^3*z^3 + 8906625*x^24*y^2*z^4 +
3562650*x^24*y*z^5 + 593775*x^24*z^6 + 2035800*x^23*y^7 +
14250600*x^23*y^6*z + 42751800*x^23*y^5*z^2 + 71253000*x^23*y^4*z^3 +
71253000*x^23*y^3*z^4 + 42751800*x^23*y^2*z^5 + 14250600*x^23*y*z^6 +
2035800*x^23*z^7 + 5852925*x^22*y^8 + 46823400*x^22*y^7*z +
163881900*x^22*y^6*z^2 + 327763800*x^22*y^5*z^3 +
409704750*x^22*y^4*z^4 + 327763800*x^22*y^3*z^5 +
163881900*x^22*y^2*z^6 + 46823400*x^22*y*z^7 + 5852925*x^22*z^8 +
14307150*x^21*y^9 + 128764350*x^21*y^8*z + 515057400*x^21*y^7*z^2 +
1201800600*x^21*y^6*z^3 + 1802700900*x^21*y^5*z^4 +
1802700900*x^21*y^4*z^5 + 1201800600*x^21*y^3*z^6 +
515057400*x^21*y^2*z^7 + 128764350*x^21*y*z^8 + 14307150*x^21*z^9 +
30045015*x^20*y^10 + 300450150*x^20*y^9*z + 1352025675*x^20*y^8*z^2 +
3605401800*x^20*y^7*z^3 + 6309453150*x^20*y^6*z^4 +
7571343780*x^20*y^5*z^5 + 6309453150*x^20*y^4*z^6 +
3605401800*x^20*y^3*z^7 + 1352025675*x^20*y^2*z^8 +
300450150*x^20*y*z^9 + 30045015*x^20*z^10 + 54627300*x^19*y^11 +
600900300*x^19*y^10*z + 3004501500*x^19*y^9*z^2 +
9013504500*x^19*y^8*z^3 + 18027009000*x^19*y^7*z^4 +
25237812600*x^19*y^6*z^5 + 25237812600*x^19*y^5*z^6 +
18027009000*x^19*y^4*z^7 + 9013504500*x^19*y^3*z^8 +
3004501500*x^19*y^2*z^9 + 600900300*x^19*y*z^10 + 54627300*x^19*z^11 +
86493225*x^18*y^12 + 1037918700*x^18*y^11*z + 5708552850*x^18*y^10*z^2
+ 19028509500*x^18*y^9*z^3 + 42814146375*x^18*y^8*z^4 +
68502634200*x^18*y^7*z^5 + 79919739900*x^18*y^6*z^6 +
68502634200*x^18*y^5*z^7 + 42814146375*x^18*y^4*z^8 +
19028509500*x^18*y^3*z^9 + 5708552850*x^18*y^2*z^10 +
1037918700*x^18*y*z^11 + 86493225*x^18*z^12 + 119759850*x^17*y^13 +
1556878050*x^17*y^12*z + 9341268300*x^17*y^11*z^2 +
34251317100*x^17*y^10*z^3 + 85628292750*x^17*y^9*z^4 +
154130926950*x^17*y^8*z^5 + 205507902600*x^17*y^7*z^6 +
205507902600*x^17*y^6*z^7 + 154130926950*x^17*y^5*z^8 +
85628292750*x^17*y^4*z^9 + 34251317100*x^17*y^3*z^10 +
9341268300*x^17*y^2*z^11 + 1556878050*x^17*y*z^12 +
119759850*x^17*z^13 + 145422675*x^16*y^14 + 2035917450*x^16*y^13*z +
13233463425*x^16*y^12*z^2 + 52933853700*x^16*y^11*z^3 +
145568097675*x^16*y^10*z^4 + 291136195350*x^16*y^9*z^5 +
436704293025*x^16*y^8*z^6 + 499090620600*x^16*y^7*z^7 +
436704293025*x^16*y^6*z^8 + 291136195350*x^16*y^5*z^9 +
145568097675*x^16*y^4*z^10 + 52933853700*x^16*y^3*z^11 +
13233463425*x^16*y^2*z^12 + 2035917450*x^16*y*z^13 +
145422675*x^16*z^14 + 155117520*x^15*y^15 + 2326762800*x^15*y^14*z +
16287339600*x^15*y^13*z^2 + 70578471600*x^15*y^12*z^3 +
211735414800*x^15*y^11*z^4 + 465817912560*x^15*y^10*z^5 +
776363187600*x^15*y^9*z^6 + 998181241200*x^15*y^8*z^7 +
998181241200*x^15*y^7*z^8 + 776363187600*x^15*y^6*z^9 +
465817912560*x^15*y^5*z^10 + 211735414800*x^15*y^4*z^11 +
70578471600*x^15*y^3*z^12 + 16287339600*x^15*y^2*z^13 +
2326762800*x^15*y*z^14 + 155117520*x^15*z^15 + 145422675*x^14*y^16 +
2326762800*x^14*y^15*z + 17450721000*x^14*y^14*z^2 +
81436698000*x^14*y^13*z^3 + 264669268500*x^14*y^12*z^4 +
635206244400*x^14*y^11*z^5 + 1164544781400*x^14*y^10*z^6 +
1663635402000*x^14*y^9*z^7 + 1871589827250*x^14*y^8*z^8 +
1663635402000*x^14*y^7*z^9 + 1164544781400*x^14*y^6*z^10 +
635206244400*x^14*y^5*z^11 + 264669268500*x^14*y^4*z^12 +
81436698000*x^14*y^3*z^13 + 17450721000*x^14*y^2*z^14 +
2326762800*x^14*y*z^15 + 145422675*x^14*z^16 + 119759850*x^13*y^17 +
2035917450*x^13*y^16*z + 16287339600*x^13*y^15*z^2 +
81436698000*x^13*y^14*z^3 + 285028443000*x^13*y^13*z^4 +
741073951800*x^13*y^12*z^5 + 1482147903600*x^13*y^11*z^6 +
2329089562800*x^13*y^10*z^7 + 2911361953500*x^13*y^9*z^8 +
2911361953500*x^13*y^8*z^9 + 2329089562800*x^13*y^7*z^10 +
1482147903600*x^13*y^6*z^11 + 741073951800*x^13*y^5*z^12 +
285028443000*x^13*y^4*z^13 + 81436698000*x^13*y^3*z^14 +
16287339600*x^13*y^2*z^15 + 2035917450*x^13*y*z^16 +
119759850*x^13*z^17 + 86493225*x^12*y^18 + 1556878050*x^12*y^17*z +
13233463425*x^12*y^16*z^2 + 70578471600*x^12*y^15*z^3 +
264669268500*x^12*y^14*z^4 + 741073951800*x^12*y^13*z^5 +
1605660228900*x^12*y^12*z^6 + 2752560392400*x^12*y^11*z^7 +
3784770539550*x^12*y^10*z^8 + 4205300599500*x^12*y^9*z^9 +
3784770539550*x^12*y^8*z^10 + 2752560392400*x^12*y^7*z^11 +
1605660228900*x^12*y^6*z^12 + 741073951800*x^12*y^5*z^13 +
264669268500*x^12*y^4*z^14 + 70578471600*x^12*y^3*z^15 +
13233463425*x^12*y^2*z^16 + 1556878050*x^12*y*z^17 +
86493225*x^12*z^18 + 54627300*x^11*y^19 + 1037918700*x^11*y^18*z +
9341268300*x^11*y^17*z^2 + 52933853700*x^11*y^16*z^3 +
211735414800*x^11*y^15*z^4 + 635206244400*x^11*y^14*z^5 +
1482147903600*x^11*y^13*z^6 + 2752560392400*x^11*y^12*z^7 +
4128840588600*x^11*y^11*z^8 + 5046360719400*x^11*y^10*z^9 +
5046360719400*x^11*y^9*z^10 + 4128840588600*x^11*y^8*z^11 +
2752560392400*x^11*y^7*z^12 + 1482147903600*x^11*y^6*z^13 +
635206244400*x^11*y^5*z^14 + 211735414800*x^11*y^4*z^15 +
52933853700*x^11*y^3*z^16 + 9341268300*x^11*y^2*z^17 +
1037918700*x^11*y*z^18 + 54627300*x^11*z^19 + 30045015*x^10*y^20 +
600900300*x^10*y^19*z + 5708552850*x^10*y^18*z^2 +
34251317100*x^10*y^17*z^3 + 145568097675*x^10*y^16*z^4 +
465817912560*x^10*y^15*z^5 + 1164544781400*x^10*y^14*z^6 +
2329089562800*x^10*y^13*z^7 + 3784770539550*x^10*y^12*z^8 +
5046360719400*x^10*y^11*z^9 + 5550996791340*x^10*y^10*z^10 +
5046360719400*x^10*y^9*z^11 + 3784770539550*x^10*y^8*z^12 +
2329089562800*x^10*y^7*z^13 + 1164544781400*x^10*y^6*z^14 +
465817912560*x^10*y^5*z^15 + 145568097675*x^10*y^4*z^16 +
34251317100*x^10*y^3*z^17 + 5708552850*x^10*y^2*z^18 +
600900300*x^10*y*z^19 + 30045015*x^10*z^20 + 14307150*x^9*y^21 +
300450150*x^9*y^20*z + 3004501500*x^9*y^19*z^2 +
19028509500*x^9*y^18*z^3 + 85628292750*x^9*y^17*z^4 +
291136195350*x^9*y^16*z^5 + 776363187600*x^9*y^15*z^6 +
1663635402000*x^9*y^14*z^7 + 2911361953500*x^9*y^13*z^8 +
4205300599500*x^9*y^12*z^9 + 5046360719400*x^9*y^11*z^10 +
5046360719400*x^9*y^10*z^11 + 4205300599500*x^9*y^9*z^12 +
2911361953500*x^9*y^8*z^13 + 1663635402000*x^9*y^7*z^14 +
776363187600*x^9*y^6*z^15 + 291136195350*x^9*y^5*z^16 +
85628292750*x^9*y^4*z^17 + 19028509500*x^9*y^3*z^18 +
3004501500*x^9*y^2*z^19 + 300450150*x^9*y*z^20 + 14307150*x^9*z^21 +
5852925*x^8*y^22 + 128764350*x^8*y^21*z + 1352025675*x^8*y^20*z^2 +
9013504500*x^8*y^19*z^3 + 42814146375*x^8*y^18*z^4 +
154130926950*x^8*y^17*z^5 + 436704293025*x^8*y^16*z^6 +
998181241200*x^8*y^15*z^7 + 1871589827250*x^8*y^14*z^8 +
2911361953500*x^8*y^13*z^9 + 3784770539550*x^8*y^12*z^10 +
4128840588600*x^8*y^11*z^11 + 3784770539550*x^8*y^10*z^12 +
2911361953500*x^8*y^9*z^13 + 1871589827250*x^8*y^8*z^14 +
998181241200*x^8*y^7*z^15 + 436704293025*x^8*y^6*z^16 +
154130926950*x^8*y^5*z^17 + 42814146375*x^8*y^4*z^18 +
9013504500*x^8*y^3*z^19 + 1352025675*x^8*y^2*z^20 +
128764350*x^8*y*z^21 + 5852925*x^8*z^22 + 2035800*x^7*y^23 +
46823400*x^7*y^22*z + 515057400*x^7*y^21*z^2 + 3605401800*x^7*y^20*z^3
+ 18027009000*x^7*y^19*z^4 + 68502634200*x^7*y^18*z^5 +
205507902600*x^7*y^17*z^6 + 499090620600*x^7*y^16*z^7 +
998181241200*x^7*y^15*z^8 + 1663635402000*x^7*y^14*z^9 +
2329089562800*x^7*y^13*z^10 + 2752560392400*x^7*y^12*z^11 +
2752560392400*x^7*y^11*z^12 + 2329089562800*x^7*y^10*z^13 +
1663635402000*x^7*y^9*z^14 + 998181241200*x^7*y^8*z^15 +
499090620600*x^7*y^7*z^16 + 205507902600*x^7*y^6*z^17 +
68502634200*x^7*y^5*z^18 + 18027009000*x^7*y^4*z^19 +
3605401800*x^7*y^3*z^20 + 515057400*x^7*y^2*z^21 + 46823400*x^7*y*z^22
+ 2035800*x^7*z^23 + 593775*x^6*y^24 + 14250600*x^6*y^23*z +
163881900*x^6*y^22*z^2 + 1201800600*x^6*y^21*z^3 +
6309453150*x^6*y^20*z^4 + 25237812600*x^6*y^19*z^5 +
79919739900*x^6*y^18*z^6 + 205507902600*x^6*y^17*z^7 +
436704293025*x^6*y^16*z^8 + 776363187600*x^6*y^15*z^9 +
1164544781400*x^6*y^14*z^10 + 1482147903600*x^6*y^13*z^11 +
1605660228900*x^6*y^12*z^12 + 1482147903600*x^6*y^11*z^13 +
1164544781400*x^6*y^10*z^14 + 776363187600*x^6*y^9*z^15 +
436704293025*x^6*y^8*z^16 + 205507902600*x^6*y^7*z^17 +
79919739900*x^6*y^6*z^18 + 25237812600*x^6*y^5*z^19 +
6309453150*x^6*y^4*z^20 + 1201800600*x^6*y^3*z^21 +
163881900*x^6*y^2*z^22 + 14250600*x^6*y*z^23 + 593775*x^6*z^24 +
142506*x^5*y^25 + 3562650*x^5*y^24*z + 42751800*x^5*y^23*z^2 +
327763800*x^5*y^22*z^3 + 1802700900*x^5*y^21*z^4 +
7571343780*x^5*y^20*z^5 + 25237812600*x^5*y^19*z^6 +
68502634200*x^5*y^18*z^7 + 154130926950*x^5*y^17*z^8 +
291136195350*x^5*y^16*z^9 + 465817912560*x^5*y^15*z^10 +
635206244400*x^5*y^14*z^11 + 741073951800*x^5*y^13*z^12 +
741073951800*x^5*y^12*z^13 + 635206244400*x^5*y^11*z^14 +
465817912560*x^5*y^10*z^15 + 291136195350*x^5*y^9*z^16 +
154130926950*x^5*y^8*z^17 + 68502634200*x^5*y^7*z^18 +
25237812600*x^5*y^6*z^19 + 7571343780*x^5*y^5*z^20 +
1802700900*x^5*y^4*z^21 + 327763800*x^5*y^3*z^22 +
42751800*x^5*y^2*z^23 + 3562650*x^5*y*z^24 + 142506*x^5*z^25 +
27405*x^4*y^26 + 712530*x^4*y^25*z + 8906625*x^4*y^24*z^2 +
71253000*x^4*y^23*z^3 + 409704750*x^4*y^22*z^4 +
1802700900*x^4*y^21*z^5 + 6309453150*x^4*y^20*z^6 +
18027009000*x^4*y^19*z^7 + 42814146375*x^4*y^18*z^8 +
85628292750*x^4*y^17*z^9 + 145568097675*x^4*y^16*z^10 +
211735414800*x^4*y^15*z^11 + 264669268500*x^4*y^14*z^12 +
285028443000*x^4*y^13*z^13 + 264669268500*x^4*y^12*z^14 +
211735414800*x^4*y^11*z^15 + 145568097675*x^4*y^10*z^16 +
85628292750*x^4*y^9*z^17 + 42814146375*x^4*y^8*z^18 +
18027009000*x^4*y^7*z^19 + 6309453150*x^4*y^6*z^20 +
1802700900*x^4*y^5*z^21 + 409704750*x^4*y^4*z^22 +
71253000*x^4*y^3*z^23 + 8906625*x^4*y^2*z^24 + 712530*x^4*y*z^25 +
27405*x^4*z^26 + 4060*x^3*y^27 + 109620*x^3*y^26*z +
1425060*x^3*y^25*z^2 + 11875500*x^3*y^24*z^3 + 71253000*x^3*y^23*z^4 +
327763800*x^3*y^22*z^5 + 1201800600*x^3*y^21*z^6 +
3605401800*x^3*y^20*z^7 + 9013504500*x^3*y^19*z^8 +
19028509500*x^3*y^18*z^9 + 34251317100*x^3*y^17*z^10 +
52933853700*x^3*y^16*z^11 + 70578471600*x^3*y^15*z^12 +
81436698000*x^3*y^14*z^13 + 81436698000*x^3*y^13*z^14 +
70578471600*x^3*y^12*z^15 + 52933853700*x^3*y^11*z^16 +
34251317100*x^3*y^10*z^17 + 19028509500*x^3*y^9*z^18 +
9013504500*x^3*y^8*z^19 + 3605401800*x^3*y^7*z^20 +
1201800600*x^3*y^6*z^21 + 327763800*x^3*y^5*z^22 +
71253000*x^3*y^4*z^23 + 11875500*x^3*y^3*z^24 + 1425060*x^3*y^2*z^25 +
109620*x^3*y*z^26 + 4060*x^3*z^27 + 435*x^2*y^28 + 12180*x^2*y^27*z +
164430*x^2*y^26*z^2 + 1425060*x^2*y^25*z^3 + 8906625*x^2*y^24*z^4 +
42751800*x^2*y^23*z^5 + 163881900*x^2*y^22*z^6 +
515057400*x^2*y^21*z^7 + 1352025675*x^2*y^20*z^8 +
3004501500*x^2*y^19*z^9 + 5708552850*x^2*y^18*z^10 +
9341268300*x^2*y^17*z^11 + 13233463425*x^2*y^16*z^12 +
16287339600*x^2*y^15*z^13 + 17450721000*x^2*y^14*z^14 +
16287339600*x^2*y^13*z^15 + 13233463425*x^2*y^12*z^16 +
9341268300*x^2*y^11*z^17 + 5708552850*x^2*y^10*z^18 +
3004501500*x^2*y^9*z^19 + 1352025675*x^2*y^8*z^20 +
515057400*x^2*y^7*z^21 + 163881900*x^2*y^6*z^22 +
42751800*x^2*y^5*z^23 + 8906625*x^2*y^4*z^24 + 1425060*x^2*y^3*z^25 +
164430*x^2*y^2*z^26 + 12180*x^2*y*z^27 + 435*x^2*z^28 + 30*x*y^29 +
870*x*y^28*z + 12180*x*y^27*z^2 + 109620*x*y^26*z^3 +
712530*x*y^25*z^4 + 3562650*x*y^24*z^5 + 14250600*x*y^23*z^6 +
46823400*x*y^22*z^7 + 128764350*x*y^21*z^8 + 300450150*x*y^20*z^9 +
600900300*x*y^19*z^10 + 1037918700*x*y^18*z^11 +
1556878050*x*y^17*z^12 + 2035917450*x*y^16*z^13 +
2326762800*x*y^15*z^14 + 2326762800*x*y^14*z^15 +
2035917450*x*y^13*z^16 + 1556878050*x*y^12*z^17 +
1037918700*x*y^11*z^18 + 600900300*x*y^10*z^19 + 300450150*x*y^9*z^20
+ 128764350*x*y^8*z^21 + 46823400*x*y^7*z^22 + 14250600*x*y^6*z^23 +
3562650*x*y^5*z^24 + 712530*x*y^4*z^25 + 109620*x*y^3*z^26 +
12180*x*y^2*z^27 + 870*x*y*z^28 + 30*x*z^29 + y^30 + 30*y^29*z +
435*y^28*z^2 + 4060*y^27*z^3 + 27405*y^26*z^4 + 142506*y^25*z^5 +
593775*y^24*z^6 + 2035800*y^23*z^7 + 5852925*y^22*z^8 +
14307150*y^21*z^9 + 30045015*y^20*z^10 + 54627300*y^19*z^11 +
86493225*y^18*z^12 + 119759850*y^17*z^13 + 145422675*y^16*z^14 +
155117520*y^15*z^15 + 145422675*y^14*z^16 + 119759850*y^13*z^17 +
86493225*y^12*z^18 + 54627300*y^11*z^19 + 30045015*y^10*z^20 +
14307150*y^9*z^21 + 5852925*y^8*z^22 + 2035800*y^7*z^23 +
593775*y^6*z^24 + 142506*y^5*z^25 + 27405*y^4*z^26 + 4060*y^3*z^27 +
435*y^2*z^28 + 30*y*z^29 + z^30 + 2)




My usecase for factor() was to actually simplify the expressions,
which the above is not really useful to me. But there are probably
more cases too.


Ondrej

--~--~---------~--~----~------------~-------~--~----~
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
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to