sage icon indicating copy to clipboard operation
sage copied to clipboard

using pari for elliptic and Eisenstein L-series

Open fchapoton opened this issue 5 months ago • 14 comments

trying to move away from Dokchitser's auld scripts

  • no longer allowing their use for elliptic curves
  • same in L-function of number fields
  • same in L-function of the modular form Delta
  • trying to get rid of them for Eisenstein L-functions
  • trying to get rid of them for Gross-Zagier L-functions

help welcome !

Note: the handling of general modular forms is best kept for another pull request.

EDIT: also changing the method num_coeffs to n_coeffs for global coherence (old name kept as an alias)

:memo: Checklist

  • [x] The title is concise and informative.
  • [x] The description explains in detail what this PR is about.
  • [ ] I have linked a relevant issue or discussion.
  • [ ] I have created tests covering the changes.
  • [ ] I have updated the documentation and checked the documentation preview.

fchapoton avatar Jul 21 '25 15:07 fchapoton

@JohnCremona : I would appreciate help from Lmfdb and Pari experts on the case of Eisenstein series

fchapoton avatar Jul 21 '25 15:07 fchapoton

Is this a failure or an improvement ?


File "src/sage/modular/modform/eis_series.py", line 422, in sage.modular.modform.eis_series.?
Failed example:
    L(2)
Expected:
    -5.0235535164599797471968418348135050804419155747868718371029
Got:
    -5.0235535164599799477225675531508296063579361580211036347215

ANSWER: this was a failure

fchapoton avatar Jul 21 '25 16:07 fchapoton

I'll look but not until Thursday

JohnCremona avatar Jul 21 '25 17:07 JohnCremona

now there are some issues with the handling of bit precision..

and more precisely with the number of terms required, that are insufficient to check the functional equation

fchapoton avatar Jul 22 '25 08:07 fchapoton

I am also annoyed because for Eisenstein series the only path I found to relative success was to pass the residue of the uncompleted L-function to pari, instead of the simpler residues of the completed L-function.

fchapoton avatar Jul 22 '25 09:07 fchapoton

now remains only a failure

Expected:
    -5.0235535164599797471968418348135050804419155747868718371029
Got:
    -5.0235535164599800135315437325373372537800575000382643457910

which is apparently really a failure, as the expected value is

sage: f=zeta(2)*zeta(-17)
sage: f.n(200)
-5.0235535164599797471968418348135050804419155747868718371029

fchapoton avatar Jul 22 '25 18:07 fchapoton

It seems to me that the handling of precision is still faulty, but I cannot investigate further.

fchapoton avatar Jul 23 '25 13:07 fchapoton

the precision issues are mostly correct already? maybe just one # rel tol 1e-14 at L(2) + E.lseries_gross_zagier(A^2)(2) (if no explicit precision parameter are passed then one can expect roughly 53 bits)

user202729 avatar Aug 02 '25 23:08 user202729

@JohnCremona and @roed314 : would you please advertise to LMFDB people what I am trying to do here, namely get rid of the original Dokchitser scripts in favor of PARI ?

fchapoton avatar Aug 26 '25 13:08 fchapoton

Documentation preview for this PR (built with commit c4c98b05317a86db58777a4bac4c2cfe626b3b9b; changes) is ready! :tada: This preview will update shortly after each push to this PR.

github-actions[bot] avatar Aug 26 '25 15:08 github-actions[bot]

Documentation preview for this PR (built with commit af8a5e5; changes) is ready! 🎉 This preview will update shortly after each push to this PR.

I will leave this to @roed314 since he is, and I am no longer, a managing editor of LMFDB

JohnCremona avatar Aug 26 '25 15:08 JohnCremona

I've advertised this PR on the LMFDB Zulip, and also sent @fchapoton an invitation to join (let me know if I got your address wrong: I took it from the Sage Zulip).

roed314 avatar Aug 26 '25 19:08 roed314

after looking at the documentation, it seems to me that num_coeffs is a misnomer. It is not about the number of coefficients, it is an estimate of a certain cost:

        Return number of coefficients `a_n` that are needed in
        order to perform most relevant `L`-function computations to
        the desired precision.

the method calls lfuncost:

 estimate the cost of running
 lfuninit(L,sdom,der) at current bit precision. Returns [t,b], to indicate
 that t coefficients a_n will be computed at bit accuracy b. Subsequent
 evaluation of lfun at s evaluates a polynomial of degree t at exp(h s).
 If L is already an Linit, then sdom and der are ignored.

mantepse avatar Oct 01 '25 10:10 mantepse

a related bug has just been fixed in PARI 2.17.3

fchapoton avatar Nov 25 '25 16:11 fchapoton

what's the status of this? Is it ready for review?

not sure if some changes (e.g. removal of max_asymp_coeffs ) would be technically a breaking change (even though in practice it likely doesn't matter)

user202729 avatar Nov 26 '25 15:11 user202729

I think it should be ready.

fchapoton avatar Nov 26 '25 15:11 fchapoton