Opened 6 years ago

Closed 6 years ago

#21195 closed defect (fixed)

cardinality_exhaustive incorrect for general curves of genus 1

Reported by: Peter Bruin Owned by:
Priority: major Milestone: sage-7.4
Component: algebraic geometry Keywords: hyperelliptic curve finite field
Cc: Jean-Pierre Flori Merged in:
Authors: Peter Bruin Reviewers: Jean-Pierre Flori
Report Upstream: N/A Work issues:
Branch: af72dd9 (Commits, GitHub, GitLab) Commit: af72dd96a6381aa23f2f7119389e47c920ee4c9a
Dependencies: #19122 Stopgaps:

Status badges


After #19122, counting points at infinity still needs to be fixed for hyperelliptic curves of genus 1 given by an equation y^2 + h(x)*y = f(x) when h != 0. Consider the following example (cf. comment:17:ticket:19122):

def test(p):
    S.<z> = GF(p)[]
    D = HyperellipticCurve(-z^2 + z, z^2)
    return D.count_points_exhaustive()

Running this for p = 2 and p = 3 gives

sage: test(2)
sage: test(3)
[4]  # or [3], after #19122

Both answers should be 5.

Change History (3)

comment:1 Changed 6 years ago by Peter Bruin

Branch: u/pbruin/21195-cardinality_exhaustive
Cc: Jean-Pierre Flori added
Commit: af72dd96a6381aa23f2f7119389e47c920ee4c9a
Status: newneeds_review

The attached branch fixes the bug basically by removing the special case g = 1 in cardinality_exhaustive(). It also streamlines the code, making the parallels between the computations in the various cases (affine and infinite points, even and odd characteristic) more apparent.

comment:2 Changed 6 years ago by Jean-Pierre Flori

Reviewers: Jean-Pierre Flori
Status: needs_reviewpositive_review

Looks good to me! Thanks Peter.

comment:3 Changed 6 years ago by Volker Braun

Branch: u/pbruin/21195-cardinality_exhaustiveaf72dd96a6381aa23f2f7119389e47c920ee4c9a
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.