#9457: power series comparison should use padded_list
------------------------------------------------------------------------------------------------------------------------+
Reporter: niles
| Owner: malb
Type: defect
| Status: needs_work
Priority: minor
| Milestone: sage-4.5.2
Component: commutative algebra
| Keywords:
Author: niles
| Upstream: N/A
Reviewer:
| Merged:
Work_issues: Fix bug in sage.schemes.elliptic_curves.sha_tate.Sha.an_padic;
mention ticket number in commit messages. |
------------------------------------------------------------------------------------------------------------------------+
Comment(by niles):
Thanks, but I'm not sure I can tell how to fix this . . . I see in the
code for {{{Sha.an_padic}}} the following lines:
{{{
# check consistency (the first two are only here to avoid a bug in the
p-adic L-series
# (namely the coefficients of zero-relative precision are treated as zero)
if shan0 != 0 and shan1 != 0 and shan0 - shan1 != 0:
raise RuntimeError, "There must be a bug in the supersingular routines
for the p-adic BSD."
}}}
I suppose this is part of the problem but I don't see how to fix it . . .
the two variables {{{shan0}}} and {{{shan1}}} are printed in the verbose
output as "the two values for Sha"; the value of {{{shan1}}} is different
depending on whether or not the patch is applied, but I have no idea which
value is correct:
Without the patch:
{{{
sage: set_verbose(1)
sage: EllipticCurve('53a1').sha().an_padic(5)
...
verbose 1 (316: sha_tate.py, an_padic) ...putting things together
verbose 1 (316: sha_tate.py, an_padic) the two values for Sha : [1 + O(5),
0]
1 + O(5)
}}}
With the patch:
{{{
sage: set_verbose(1)
sage: EllipticCurve('53a1').sha().an_padic(5)
...
verbose 1 (316: sha_tate.py, an_padic) ...putting things together
verbose 1 (316: sha_tate.py, an_padic) the two values for Sha : [1 + O(5),
4 + O(5)]
---------------------------------------------------------------------------
Traceback (most recent call last)
...
RuntimeError: There must be a bug in the supersingular routines for the
p-adic BSD.
}}}
Note that simply removing the conditions {{{shan0 != 0 and shan1 != 0}}}
(as implied by the inline comment) does not resolve the problem, since
{{{shan0 != shan1}}} is {{{True}}} with the patch. The values of
{{{shan0}}} and {{{shan1}}} are computed by the function
{{{pAdicLseriesSupersingular.Dp_valued_series}}}, which gives different
output with and without the patch; again I have no idea which is correct.
Without the patch:
{{{
sage: E = EllipticCurve('53a1')
sage: Et, D = E.minimal_quadratic_twist()
sage: lp = Et.padic_lseries(5)
sage: lps = lp.Dp_valued_series(4,quadratic_twist=D, prec=4)
sage: lps
(O(5^4) + (3 + O(5))*T + O(5)*T^2 + (4 + O(5))*T^3 + O(T^4), O(T^4))
}}}
With the patch:
{{{
sage: E = EllipticCurve('53a1')
sage: Et, D = E.minimal_quadratic_twist()
sage: lp = Et.padic_lseries(5)
sage: lps = lp.Dp_valued_series(4,quadratic_twist=D, prec=4)
sage: lps
(O(5^4) + (3 + O(5))*T + O(5)*T^2 + (4 + O(5))*T^3 + O(T^4), O(5^5) + (4*5
+ O(5^2))*T + O(5^2)*T^2 + (2*5 + O(5^2))*T^3 + O(T^4))
}}}
Note that every line of {{{pAdicLseriesSupersingular.Dp_valued_series}}}
gives the same output with or without the patch, except for the very last
one, which computes {{{lpv*eps.transpose()}}} where (with or without the
patch)
{{{
lpv = (O(5^3) + (2*5^-1 + O(5^0))*T + O(5^0)*T^2 + (5^-1 + O(5^0))*T^3 +
O(T^4), O(T^4))
}}}
and
{{{
eps.transpose() =
[ 5/9 25/18]
[-5/18 5/9]
}}}
Before I try to chase this further, I think we should try to determine
whether the patch is causing {{{Dp_valued_series}}} to give the wrong
answer, or whether the conditions on {{{shan0}}} and {{{shan1}}} should be
changed. Ideas? If I've missed the point of your previous comment, could
you explain how you determined that was the problem?
p.s. I haven't forgotten about fixing the commit messages; I'll do it
after this is sorted out.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9457#comment:9>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
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.