hyperell_regulator.geometric_torsion module

Complete genus 2 hyperelliptic torsion packets via Poonen’s algorithm.

We call Poonen’s PARI/GP implementation of Computing torsion points on curves (2001, updated 2024), which proves completeness p-adically rather than searching up to a bound. Install it with install_poonen_backend().

Only the packet containing the Weierstrass points is supported; any point of that packet may serve as base point.

install_poonen_backend(path=None, *, source_path=None)[source]

Install the pinned upstream GP file in the local results cache.

With source_path, copy a downloaded file instead of fetching it. The SHA256 is checked before writing.

class GeometricTorsionPacket(C, data, *, basepoint=None, metadata=None)[source]

Bases: object

An exactly verified complete torsion packet, with QQbar coordinates.

points() returns coordinates on the original y^2+h*y=f model; order(P) is the exact order of P-basepoint, by Mumford arithmetic over a number field.

contains(P)[source]

Membership in this packet, after validating the curve coordinates.

points(*, rational_abscissae=False)[source]

Exact QQbar points, optionally restricted to rational abscissae and infinity.

order(P, *, max_field_degree=64)[source]

Exact order of P-basepoint, using a proved multiple from the backend.

The backend proves the order of 2P-canonical, so twice the lcm of the two doubled orders annihilates P-basepoint. Fields of degree above max_field_degree raise NotImplementedError.

geometric_torsion_packet(C, basepoint=None, *, backend=None, gp=None, timeout=300, cache=True, progress=None)[source]

The complete geometric torsion packet of the Weierstrass points.

backend defaults to HYPERELL_POONEN_GP or the installed copy; gp selects a PARI/GP executable. Results are cached by curve and backend checksum. A timeout raises subprocess.TimeoutExpired.