#5573: [with patch; needs review] genus2reduction interface has at least two
problems
---------------------------+------------------------------------------------
Reporter: was | Owner: was
Type: defect | Status: new
Priority: major | Milestone: sage-3.4.1
Component: number theory | Keywords:
---------------------------+------------------------------------------------
Description changed by mabshoff:
Old description:
> {{{
> On Thu, Mar 19, 2009 at 6:14 PM, ARMAND BRUMER 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.
>
> }}}
New description:
{{{
On Thu, Mar 19, 2009 at 6:14 PM, ARMAND BRUMER 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
}}}
The code:
{{{
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)
}}}
William replies: 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.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5573#comment:3>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---