Opened 3 years ago

Last modified 5 weeks ago

#20309 needs_work enhancement

Expose PARI code for Frobenius matrix on hyperelliptic curves

Reported by: kedlaya Owned by:
Priority: major Milestone: sage-8.9
Component: algebraic geometry Keywords: hyperelliptic curve, matrix of Frobenius, sd87
Cc: tornaria, edgarcosta Merged in:
Authors: Marc Masdeu, Gonzalo Tornaría Reviewers:
Report Upstream: N/A Work issues:
Branch: public/ticket/20309 (Commits) Commit: c3cfc901073abe492fe924038f832152835ee1ce
Dependencies: Stopgaps:

Description

PARI provides a method hyperellpadicfrobenius for computing the matrix of Frobenius on p-adic cohomology of a hyperelliptic curve over a prime field, and another method nfhyperellpadicfrobenius for doing so over a nonprime field. We don't currently provide any alternative for the latter, so I propose to expose the PARI code as a method of HyperellipticCurve. See #18916 for more discussion.

Change History (13)

comment:1 Changed 3 years ago by jdemeyer

Do you know why GP does not have nfhyperellpadicfrobenius? If PARI/GP doesn't expose it, I'm doubting whether Sage should.

comment:2 follow-up: Changed 3 years ago by kedlaya

According to an email from Bill Allombert:

Mostly, the reason I did not make nfhyperellpadicfrobenius() 
public in the first place was that I was not sure what to write in
the documentation that would tell users what it is good for and how
to use it.

However, there do exist some use cases where it is relevant; I'll try to put together a coherent post describing these.

comment:3 in reply to: ↑ 2 Changed 3 years ago by jpflori

Replying to kedlaya:

According to an email from Bill Allombert:

Mostly, the reason I did not make nfhyperellpadicfrobenius() 
public in the first place was that I was not sure what to write in
the documentation that would tell users what it is good for and how
to use it.

However, there do exist some use cases where it is relevant; I'll try to put together a coherent post describing these.

On top of what you said here: http://trac.sagemath.org/ticket/18916#comment:16 a use case for getting the matrix rather than the charpoly is to compute number of points on the curve faster by using less precision than need for the charpoly. That's already implemented that way in Sage.

comment:4 Changed 2 years ago by roed

  • Keywords sd87 added

comment:5 Changed 2 years ago by mmasdeu

  • Authors set to Marc Masdeu, Gonzalo Tornaría
  • Branch set to 20309-padic-frobenius-matrix
  • Status changed from new to needs_review

The code seems to work. The documentation does not build but we believe that it's not our fault (it seems to complain about plot3d, which this patch does not touch).

comment:6 Changed 2 years ago by mmasdeu

  • Cc tornaria added

comment:7 Changed 2 years ago by mmasdeu

  • Branch changed from 20309-padic-frobenius-matrix to u/mmasdeu/20309-padic-frobenius-matrix
  • Commit set to f12d20110c49fa93acd646948775717372b2f90b

New commits:

0c127f9Implemented padic_frobenius_matrix for hyperelliptic curves over number fields.
f12d201Added doctests to cython wrappers.

comment:8 Changed 2 years ago by tornaria

  • Cc edgarcosta added

comment:9 follow-up: Changed 2 years ago by vdelecroix

What is the point of your function hyperellpadicfrobenius!? It is already exposed in cypari

sage: x = polygen(QQ)
sage: pari(4*x^5 - 92*x^3 + 72*x^2 + 160*x).hyperellpadicfrobenius(13, 20)
[3*13^2 + 6*13^3 + 3*13^4 + 8*13^5 + 12*13^6 + 7*13^7 + 4*13^8 + 2*13^9 + 10*13^10 + 10*13^11 + 4*13^12 + 12*13^13 + 11*13^14 + 11*13^15 + 4*13^16 + 8*13^17 + 11*13^18 + 9*13^19 + O(13^20), 11*13 + 7*13^2 + 8*13^3 + 12*13^5 + 8*13^6 + 12*13^7 + 3*13^8 + 2*13^9 + 5*13^10 + 2*13^12 + 9*13^13 + 10*13^14 + 8*13^15 + 8*13^16 + 3*13^17 + 6*13^18 + 7*13^19 + O(13^20), 2 + 6*13 + 11*13^2 + 8*13^3 + 13^4 + 9*13^5 + 9*13^6 + 11*13^7 + 8*13^8 + 9*13^9 + 5*13^10 + 4*13^11 + 10*13^12 + 5*13^13 + 12*13^14 + 11*13^15 + 3*13^16 + 13^17 + 6*13^18 + 11*13^19 + O(13^20), 10 + 10*13^2 + 3*13^3 + 8*13^4 + 13^5 + 4*13^7 + 6*13^8 + 5*13^9 + 9*13^10 + 7*13^11 + 6*13^12 + 13^13 + 2*13^14 + 9*13^15 + 8*13^16 + 7*13^17 + 4*13^18 + O(13^20); 5*13 + 3*13^2 + 3*13^3 + 12*13^4 + 13^5 + 12*13^6 + 12*13^7 + 2*13^8 + 10*13^9 + 3*13^10 + 10*13^11 + 5*13^12 + 3*13^13 + 13^14 + 12*13^15 + 3*13^16 + 13^18 + 12*13^19 + O(13^20), 4*13^2 + 3*13^3 + 11*13^4 + 6*13^5 + 2*13^6 + 8*13^7 + 11*13^8 + 6*13^9 + 8*13^10 + 11*13^11 + 8*13^12 + 6*13^13 + 6*13^14 + 4*13^15 + 10*13^17 + 8*13^18 + 10*13^19 + O(13^20), 8 + 12*13 + 7*13^2 + 13^3 + 4*13^4 + 2*13^5 + 4*13^6 + 10*13^7 + 2*13^8 + 4*13^9 + 7*13^10 + 7*13^11 + 12*13^12 + 5*13^13 + 10*13^14 + 9*13^15 + 13^16 + 8*13^17 + 2*13^18 + 10*13^19 + O(13^20), 6*13 + 9*13^2 + 9*13^4 + 10*13^5 + 4*13^6 + 12*13^7 + 10*13^9 + 5*13^10 + 7*13^11 + 4*13^12 + 10*13^13 + 8*13^14 + 2*13^15 + 2*13^16 + 7*13^17 + 10*13^18 + 5*13^19 + O(13^20); 9*13 + 7*13^2 + 11*13^3 + 10*13^4 + 4*13^5 + 9*13^6 + 13^7 + 3*13^8 + 10*13^9 + 4*13^10 + 7*13^12 + 8*13^13 + 7*13^14 + 4*13^15 + 9*13^16 + 10*13^17 + 8*13^18 + 3*13^19 + O(13^20), 4*13 + 6*13^2 + 3*13^3 + 11*13^4 + 5*13^5 + 7*13^6 + 6*13^7 + 9*13^8 + 10*13^9 + 13^10 + 9*13^11 + 5*13^12 + 10*13^13 + 11*13^14 + 6*13^15 + 7*13^16 + 7*13^17 + 9*13^18 + 11*13^19 + O(13^20), 4 + 6*13 + 3*13^2 + 8*13^3 + 8*13^4 + 9*13^6 + 11*13^7 + 4*13^8 + 8*13^9 + 6*13^10 + 2*13^11 + 6*13^12 + 8*13^13 + 6*13^14 + 13^15 + 11*13^16 + 9*13^17 + 4*13^18 + 13^19 + O(13^20), 10 + 9*13 + 9*13^2 + 8*13^3 + 10*13^4 + 6*13^5 + 12*13^7 + 8*13^8 + 11*13^9 + 10*13^10 + 10*13^11 + 11*13^12 + 9*13^13 + 11*13^14 + 12*13^15 + 7*13^16 + 9*13^17 + 5*13^18 + 12*13^19 + O(13^20); 11*13 + 10*13^2 + 11*13^3 + 4*13^4 + 11*13^5 + 9*13^6 + 8*13^7 + 9*13^8 + 3*13^9 + 7*13^10 + 12*13^11 + 8*13^12 + 4*13^13 + 13^14 + 13^15 + 11*13^16 + 7*13^17 + 5*13^18 + 12*13^19 + O(13^20), 11*13 + 11*13^3 + 5*13^4 + 12*13^5 + 13^6 + 13^7 + 12*13^8 + 5*13^9 + 12*13^10 + 7*13^11 + 10*13^12 + 5*13^13 + 5*13^14 + 9*13^15 + 7*13^16 + 8*13^17 + 10*13^18 + 13^19 + O(13^20), 11 + 6*13 + 7*13^2 + 9*13^3 + 13^4 + 5*13^5 + 12*13^6 + 13^7 + 10*13^8 + 12*13^9 + 2*13^10 + 13^11 + 8*13^13 + 8*13^14 + 11*13^15 + 5*13^16 + 9*13^17 + O(13^20), 5 + 6*13 + 2*13^2 + 8*13^3 + 2*13^4 + 10*13^5 + 13^6 + 11*13^7 + 4*13^8 + 8*13^9 + 13^11 + 6*13^12 + 11*13^13 + 8*13^15 + 9*13^16 + 10*13^17 + 4*13^19 + O(13^20)]

Though, nfhyperellpadicfrobenius is not... any idea why this function is not available in GP?

comment:10 Changed 2 years ago by vdelecroix

  • Status changed from needs_review to needs_work

comment:11 in reply to: ↑ 9 Changed 2 years ago by vdelecroix

Replying to vdelecroix:

Though, nfhyperellpadicfrobenius is not... any idea why this function is not available in GP?

Oh I discovered comment:3! It would be much better to provide a patch to PARI/GP for that purpose. In the mean time, you can provide a pull request to cypari2 (as was done by Rob Harron in PR16).

comment:12 Changed 6 weeks ago by chapoton

  • Branch changed from u/mmasdeu/20309-padic-frobenius-matrix to public/ticket/20309
  • Commit changed from f12d20110c49fa93acd646948775717372b2f90b to c3cfc901073abe492fe924038f832152835ee1ce
  • Milestone changed from sage-7.2 to sage-8.8

I have a made a rebased, squashed, and refreshed branch.


New commits:

c3cfc90Implemented padic_frobenius_matrix for hyperelliptic curves over number fields.

comment:13 Changed 5 weeks ago by embray

  • Milestone changed from sage-8.8 to sage-8.9

Tickets still needing working or clarification should be moved to the next release milestone at the soonest (please feel free to revert if you think the ticket is close to being resolved).

Note: See TracTickets for help on using tickets.