Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug in modular symbols for elliptic curves #10236

Closed
chriswuthrich opened this issue Nov 8, 2010 · 19 comments
Closed

bug in modular symbols for elliptic curves #10236

chriswuthrich opened this issue Nov 8, 2010 · 19 comments

Comments

@chriswuthrich
Copy link
Contributor

The following two computations should yield the same answer. First with the modular symbols in sage

sage: E = EllipticCurve('11a1')
sage: m = E.modular_symbol()
sage: m(1/7)
7/10 
sage: m(0)
1/5

and then using ec_lib :

sage: m = E.modular_symbol(use_eclib=True)
sage: m(1/7)
6/5
sage: m(0)
1/5

That the actual value of [1/7] must be 7/10 is illustrated be the following

sage: ans = E.anlist(10^5)
sage: twopii = CC(2*pi*i)
sage: s = 0
sage: n = 1
sage: while n < 50000:
....:     s += ans[n]/n*exp(twopii*n/7)
....:     n += 1
sage: s.real()/E.period_lattice().basis()[0]
0.694799317284868

The fact that both values at 0 are equal show that it is unlikely that this is a problem with the scaling of the modular symbols.


Here is another bug. Maybe the same, maybe different. This one looks like being in scaling. But I am puzzled, because this example was used originally in the design of the scaling function.

sage: E = EllipticCurve('121b1')
sage: m = E.modular_symbol()
sage: m(1/7)
2
sage: m._scaling
-2

It should in fact be [1/7]+ = 1/2.

sage: ans = E.anlist(10^5)
sage: s = 0
sage: n = 1
sage: while n < 100000:
    s += ans[n]/n*exp(twopii*n/7)
    n += 1
....:     
sage: s.real()/E.period_lattice().basis()[0]
0.484665473298495

This was originally reported by Andrew Ohana.

CC: @JohnCremona @williamstein

Component: elliptic curves

Keywords: modular symbols

Author: Chris Wuthrich

Reviewer: John Cremona

Merged: sage-4.6.1.alpha3

Issue created by migration from https://trac.sagemath.org/ticket/10236

@chriswuthrich
Copy link
Contributor Author

comment:1

One guess might be that I misinterpreted what the output of eclib is. I assumed that in line 553 in ell_modular_symbol.py that the output of

sage: from sage.libs.cremona.newforms import ECModularSymbol
sage: E = EllipticCurve('11a1')
sage: m = ECModularSymbol(E)
sage: m(1/2)
2

meant that 2 pi i \int_{r}^{0} f(z) dz = m(r) * Omega
where f is the modular form and Omega = 1.2692 is the real period. Maybe this is not correct. Then the documentation in sage.libs.cremona.newforms.pyx should be improved.

@chriswuthrich
Copy link
Contributor Author

comment:2

The second bug is independent of the first and I found the erro in the original implementation. I will soon post a patch that covers this part of the problem.

@chriswuthrich
Copy link
Contributor Author

Attachment: trac_10236_1.patch.gz

This first patch solves the second issue. Exported 4.6

@chriswuthrich
Copy link
Contributor Author

comment:3

I found all the problems now... they are all due to ME. Sorry ! I will post a patch shortly.

@chriswuthrich
Copy link
Contributor Author

comment:4

On the way I found what the second patch in #9476 (changeset 14823) did. I have to revert that. It is true that eclib has now negative spaces, but the call function for negatives is not implemented in newforms.pyx. So as it was until now, E.modular_symbol(use_eclib=True, sign=-1)(r) will compute the + modular symbol. I am sorry that I did not take a look at #9476. Hence I will also revert the part of #9247 that made eclib to be chosen by default in p-adic L-functions.

I will open a separate ticket for changing this afterwards.

@chriswuthrich
Copy link
Contributor Author

Attachment: trac_10236_2.patch.gz

Solves the remaining problems. Exported 4.6. This patch has to be applied after the first one.

@chriswuthrich
Copy link
Contributor Author

Author: Chris Wuthrich

@chriswuthrich
Copy link
Contributor Author

comment:5

This second patch, applied after the first one, will solve the both issues in the ticket description and revert back some errors introduced earlier.

The problem was a "/2" in a formula. I have absolutely no idea why I put that there. To check that the formula is now correct, I did the following::

sage: rs = flatten([[a/m for a in srange(1,m) if gcd(a,m)==1] for m in srange(2,20)])
sage: for E in cremona_curves([11..100]):
....:     m = E.modular_symbol(use_eclib=False)
....:     me = E.modular_symbol(use_eclib=True)
....:     for r in rs:
....:         if m(r) != me(r):
....:             print E.label(), r, m(r), me(r)

which gladly did not yield any output.

So these patches are ready for review.

@chriswuthrich
Copy link
Contributor Author

comment:6

The follow up about the negative modular symbols is at #10256.

@JohnCremona
Copy link
Member

comment:7

I guess that at least some of this is my fault, for not doing everything all at once at #9476.

I hope to get time to review this before too long...

@chriswuthrich
Copy link
Contributor Author

comment:8

sorry, there are docstrings to change in ell_rational_field as well. I will do that later today.

@chriswuthrich
Copy link
Contributor Author

exported 4.6 to be applied after the two others

@chriswuthrich
Copy link
Contributor Author

Attachment: trac_10236_3.patch.gz

Attachment: trac_10236_4.patch.gz

to be applied after the other three patches

@chriswuthrich
Copy link
Contributor Author

comment:9

I hope now I have found them all.

@JohnCremona
Copy link
Member

comment:10

Patches look good (note: the last two are just fixing old wrong doctest output!) and apply fine to 4.6.1.alpha1. I am testing now.

@JohnCremona
Copy link
Member

Reviewer: John Cremona

@JohnCremona
Copy link
Member

comment:11

Replying to @JohnCremona:

Patches look good (note: the last two are just fixing old wrong doctest output!) and apply fine to 4.6.1.alpha1. I am testing now.

All pass!

@jdemeyer
Copy link

comment:12

Milestone is 4.6.2 (if you want this merged in 4.6.1, change the milestone accordingly)

@JohnCremona JohnCremona modified the milestones: sage-4.6.2, sage-4.6.1 Nov 18, 2010
@jdemeyer
Copy link

jdemeyer commented Dec 2, 2010

Merged: sage-4.6.1.alpha3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants