On Thu, Mar 19, 2009 at 6:14 PM, ARMAND BRUMER <[email protected]> wrote:
> Hi William,
>
> This is my first attempt to use sage. I have OSX 10.4.11 and just downloaded
> it.
>
> I wanted to use liu's program. After trying out your examples and getting
> the same result, I tried the example I was curious about and here is the
> output. Can you do better. Did I screw up?
>
> Thanks,
> armand
>
> sage: genus2reduction(x^3 + x^2 + x,-2*x^5 + 3*x^4 - x^3 - x^2 - 6*x - 2)
> ---------------------------------------------------------------------------
> ValueError Traceback (most recent call last)
>
You have found a bug in Sage. When I try the above by directly
using Liu's program (note that i have to remove the spaces in the
polynomials and use an explanation point to run the program), I get
the following problem:
sage: !genus2reduction
enter Q(x) : x^3+x^2+x
enter P(x) : -2*x^5+3*x^4-x^3-x^2-6*x-2
factorization CPU time = 5
a minimal equation over Z[1/2] is :
y^2 = x^6+18*x^3+36*x^2-27
factorization of the minimal (away from 2) discriminant :
[2,1;3,15;53,1]
p=2
(potential) stable reduction : (II), j=1
reduction at p : [I{1-0-0}] page 170, (1), f=1
p=3
(potential) stable reduction : (I)
reduction at p : *** expected character: ',' instead of: mod(y,y^2-3)
I don't know if this ever worked, but I bet it did, and PARI changed
from 2004 or whatever, until now, and we just didn't pick up the
change because we didn't test genus2reduction enough.
2. A second problem is that if genus2reduction works once, then fails,
then it fails to work again:
sage: R = genus2reduction(x^3 - 2*x^2 - 2*x + 1, -5*x^5)
sage: R.conductor
1416875
sage: R = genus2reduction(x^3 + x^2 + x,-2*x^5 + 3*x^4 - x^3 - x^2 - 6*x - 2)
Traceback (most recent call last):
ValueError: error in input; possibly singular curve? (Q=x^3 + x^2 + x,
P=-2*x^5 + 3*x^4 - x^3 - x^2 - 6*x - 2)
sage: R = genus2reduction(x^3 - 2*x^2 - 2*x + 1, -5*x^5) # just worked above
Traceback (most recent call last):
...
ValueError: error in input; possibly singular curve? (Q=x^3 - 2*x^2 -
2*x + 1, P=-5*x^5)
---
When we fix this, we will of course have to write code to run through
random curves and verify that genus2reduction works sensibly on
millions of inputs.
Liu's program genus2reduction, included with Sage, is a C program that
is written to use the Pari C library.
I've posted the above to our bug tracking system:
http://trac.sagemath.org/sage_trac/ticket/5573
Please report any and all other issues you find with Sage. I'll email
you when the above gets fixed.
-- William
> /Users/armandbrumer/sage/<ipython console> in <module>()
>
> /Users/armandbrumer/sage/local/lib/python2.5/site-packages/sage/interfaces/genus2reduction.pyc
> in __call__(self, Q, P)
> 356 from sage.misc.all import sage_eval
> 357
> --> 358 s, Q, P = self.raw(Q, P)
> 359 raw = s
> 360
>
> /Users/armandbrumer/sage/local/lib/python2.5/site-packages/sage/interfaces/genus2reduction.pyc
> in raw(self, Q, P)
> 347 s = E.eval(str(P).replace(' ',''))
> 348 except RuntimeError:
> --> 349 raise ValueError, "error in input; possibly singular
> curve? (Q=%s, P=%s)"%(Q,P)
> 350 i = s.find('a minimal')
> 351 j = s.rfind(']')
>
> ValueError: error in input; possibly singular curve? (Q=x^3 + x^2 + x,
> P=-2*x^5 + 3*x^4 - x^3 - x^2 - 6*x - 2)
>
>
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---