Opened 5 years ago

Closed 5 years ago

#21195 closed defect (fixed)

cardinality_exhaustive incorrect for general curves of genus 1

Reported by: pbruin Owned by:
Priority: major Milestone: sage-7.4
Component: algebraic geometry Keywords: hyperelliptic curve finite field
Cc: jpflori 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

Description

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)
[4]
sage: test(3)
[4]  # or [3], after #19122

Both answers should be 5.

Change History (3)

comment:1 Changed 5 years ago by pbruin

  • Branch set to u/pbruin/21195-cardinality_exhaustive
  • Cc jpflori added
  • Commit set to af72dd96a6381aa23f2f7119389e47c920ee4c9a
  • Status changed from new to needs_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 5 years ago by jpflori

  • Reviewers set to Jean-Pierre Flori
  • Status changed from needs_review to positive_review

Looks good to me! Thanks Peter.

comment:3 Changed 5 years ago by vbraun

  • Branch changed from u/pbruin/21195-cardinality_exhaustive to af72dd96a6381aa23f2f7119389e47c920ee4c9a
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.