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

Zeta functions of hyperelliptic curves giving wrong answers #28789

Closed
kedlaya opened this issue Nov 22, 2019 · 19 comments
Closed

Zeta functions of hyperelliptic curves giving wrong answers #28789

kedlaya opened this issue Nov 22, 2019 · 19 comments

Comments

@kedlaya
Copy link
Sponsor Contributor

kedlaya commented Nov 22, 2019

Example from 9.0.beta5:

sage: P.<x> = PolynomialRing(GF(3))
sage: u = x^10 + x^9 + x^8 + x
sage: C = HyperellipticCurve(u)
sage: C.frobenius_polynomial()
x^8 + 731*x^7 + 6*x^6 - 720*x^5 + 18*x^4 - 2160*x^3 + 54*x^2 + 19737*x + 81

This is being computed using Pari, but actually gp gives the correct answer:

? u = Mod(1,3)*(x^10 + x^9 + x^8 + x)
? hyperellcharpoly(u)
%1 = x^8 + 2*x^7 + 6*x^6 + 9*x^5 + 18*x^4 + 27*x^3 + 54*x^2 + 54*x + 81

Since the x^7 term is off by 3^6, this is presumably an issue with not enough p-adic precision in the Frobenius matrix we are getting from Pari.

Depends on #28840

Upstream: Fixed upstream, in a later stable release.

CC: @roed314

Component: algebraic geometry

Keywords: hyperelliptic curves, zeta functions

Author: Kiran Kedlaya

Branch: 7eb3cd1

Reviewer: Frédéric Chapoton

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

@kedlaya kedlaya added this to the sage-9.0 milestone Nov 22, 2019
@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Nov 22, 2019

comment:1

It looks like this was a bug which was just fixed upstream: I can reproduce the bug in gp version 2.11.1, but I get the correct answer in 2.11.2 (which is what I originally tried). So a simple Pari update should suffice.

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Nov 22, 2019

Upstream: Fixed upstream, in a later stable release.

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Nov 25, 2019

comment:2

See #28424 for a Pari upgrade ticket that would resolve this issue.

@kiwifb
Copy link
Member

kiwifb commented Dec 3, 2019

comment:3

#28424 is somewhat exploratory to check for broken stuff. Of course we have gone on the pari git branch in the past when Jeroen was after new features.

But #28424 shouldn't prevent you from making this ticket an upgrade to 2.11.2 to fix your issue. If that make fell you better most sage-on-distros are probably already using 2.11.2 without reported side effects (apart from getting the right answer in the problem pointed out by this ticket - I know I do in sage-on-gentoo).

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Dec 4, 2019

comment:4

OK, so let's make this a ticket to upgrade Pari to 2.11.2. Unfortunately, updating an spkg falls outside of my expertise; but it should be trivial for someone more familiar with the build system.

@fchapoton
Copy link
Contributor

comment:5

I have made #28840 for the upgrade to pari 2.11.2

@slel
Copy link
Member

slel commented Dec 9, 2019

comment:6

Now that #28840 is in, it would be nice to add the example from this ticket
as a doctest in Sage's documentation. Something like:

Check that :trac:`28789` is fixed::

    sage: P.<x> = PolynomialRing(GF(3))
    sage: u = x^10 + x^9 + x^8 + x
    sage: C = HyperellipticCurve(u)
    sage: C.frobenius_polynomial()
    x^8 + 2*x^7 + 6*x^6 + 9*x^5 + 18*x^4 + 27*x^3 + 54*x^2 + 54*x + 81

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Dec 11, 2019

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Dec 11, 2019

Commit: 7eb3cd1

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Dec 11, 2019

Dependencies: 28840

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Dec 11, 2019

Author: Kiran Kedlaya

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Dec 11, 2019

Changed keywords from none to hyperelliptic curves, zeta functions

@kedlaya
Copy link
Sponsor Contributor Author

kedlaya commented Dec 11, 2019

comment:8

Agreed! I doctested both frobenius_polynomial and frobenius_polynomial_pari.


New commits:

7eb3cd1Add doctests re 28789

@fchapoton
Copy link
Contributor

comment:9

ok, good to go. Thanks

@fchapoton
Copy link
Contributor

Reviewer: Frédéric Chapoton

@vbraun
Copy link
Member

vbraun commented Dec 16, 2019

@slel
Copy link
Member

slel commented Jan 10, 2020

comment:11

Possibly related problem reported on sage-support with Sage 9.0:

@slel
Copy link
Member

slel commented Jan 10, 2020

Changed commit from 7eb3cd1 to none

@slel
Copy link
Member

slel commented Jan 10, 2020

Changed dependencies from 28840 to #28840

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

5 participants