hyperell_regulator.components module¶
LMFDB curves, rational points and exact torsion orders for genus 2.
- fetch_lmfdb(max_cond=None, path='/home/runner/work/hyperell-regulator/hyperell-regulator/lmfdb_cache/g2c.json', pause=6, limit=None, geom_simple=True, email='acampo@ihes.fr', end_q_z=False, end_algs=None, on_curve=None, _cancel_event=None)[source]¶
Fetch and merge LMFDB curve and rational-point data into
path.Requests are paginated with
pauseseconds between them; the scan offset is saved in_scan_state.json.end_q_z=Trueselects End_Q(J)=Z andend_algsselects LMFDB algebra labels.on_curveis called with each curve as soon as it is cached.
- load_curves(path='/home/runner/work/hyperell-regulator/hyperell-regulator/lmfdb_cache/g2c.json', max_cond=None, simple_only=True, geom_simple=False, end_q_z=False, end_algs=None)[source]¶
Cached curves in conductor order, with conductor at most
max_cond.simple_onlyrequires simplicity over \(\QQ\);geom_simplerequires geometric simplicity.end_q_zselects End_Q(J)=Z independently of those two flags, using the cachedend_algfield.end_algsselects a specified collection of rational algebra labels.
- end_q_is_z(row)[source]¶
Whether the cached rational endomorphism algebra proves End_Q(J)=Z.
LMFDB’s
end_alg='Q'specifies End_Q(J) tensor Q = Q. The only integral order in Q containing 1 is Z. Missing metadata is not evidence.
- curve_from_row(row, prec=250)[source]¶
The curve \(y^2+h(x)y=f(x)\) from coefficients in increasing degree.
- load_curve(label, *, cache=None, fetch=True, refresh=False, prec=250)[source]¶
Load one LMFDB genus 2 curve over QQ with reduction methods.
Uncached labels are fetched individually and merged into the cache.
fetch=Falserequires cached data;refresh=Truerefetches. The curve carrieslmfdb_labelandlmfdb_record.
- lmfdb_points(C, rat_pts)[source]¶
Convert weighted projective triples of weights \((1,g+1,1)\) to points.
Affine points are
(x,y); infinite points are("infinity", eta)with \(eta=\lim y/x^{g+1}\).
- search_rational_points(C, bound=12)[source]¶
Rational points with \(|x|\) and its denominator at most
bound, including infinity.Infinite points are labelled by \(eta=\lim y/x^{g+1}\).
EXAMPLES:
sage: from hyperell_regulator.components import HyperellipticCurveWithReduction, search_rational_points sage: R.<x> = ZZ[] sage: C = HyperellipticCurveWithReduction(-x^2 - x, x^3 + x^2 + x + 1) sage: sorted(search_rational_points(C), key=str) [('infinity', -1), ('infinity', 0), (-1, 0), (0, -1), (0, 0)]
- curve_points(C, row, bound=12, max_bound=60)[source]¶
Cached rational points, or a height search up to
max_bound.
- affine_model(C, points)[source]¶
An isomorphic square model on which all marked points are affine.
Use \(u=1/(x-a)\) and \(v=(2y+h(x))/(x-a)^{g+1}\). Return
(curve, images, a).EXAMPLES:
sage: from hyperell_regulator.components import HyperellipticCurveWithReduction, affine_model sage: R.<x> = ZZ[] sage: C = HyperellipticCurveWithReduction(x^5 + x^3 + 1) sage: D, pts, a = affine_model(C, [(0, 1), ('infinity', 0)]) sage: all(p is not None for p in pts) True
- odd_degree_model(C)[source]¶
An odd degree square model, or
Noneif none exists over \(\QQ\).Return
(curve, point_map, r), moving a rational root \(r\) to infinity. For an already odd degree model,r=None.
- divisor_class_order(C, P, Q, primes=30)[source]¶
The order of \(P-Q\) in \(J(\QQ)\).
Return
+Infinityfor nontorsion andNoneif undetermined. Points use \(y^2+h(x)y=f(x)\);("infinity", eta)means \(eta=\lim y/x^{g+1}\). Good odd reductions bound the torsion order.EXAMPLES:
sage: from hyperell_regulator.components import HyperellipticCurveWithReduction, divisor_class_order sage: R.<x> = ZZ[] sage: C = HyperellipticCurveWithReduction(-x^2 - x, x^3 + x^2 + x + 1) sage: divisor_class_order(C, (0, 0), (0, -1)) 15 sage: C = HyperellipticCurveWithReduction(x + 2*x^2 - x^4, 1 + x + x^3) sage: divisor_class_order(C, (0, 0), ("infinity", 0)) 7 sage: divisor_class_order(C, (0, 0), ("infinity", -1)) 21