Skip to main content

logo

A package to compute Darmon points

(or just p-adically construct elliptic curves, or p-adic Darmon-Vonk points,...)

(for the full documentation, please see http://mmasdeu.github.io/darmonpoints/)

doc

test

lint

What is this?

The darmonpoints package can compute many different types of what is known as Darmon points. These are known as Stark-Heegner points in some literature, and originated in [Darmon]. Subsequent generalizations were introduced by [Greenberg] and [Trifkovic]. This has been generalized by [GMS1] to elliptic curves defined over number fields of arbitrary signature. Darmon points are attached to triples (F,E,K), where F is a number field, E/F is an elliptic curve defined over F, and K/F is a quadratic extension. These triples must satisfy certain conditions for Darmon points to be attached to them. The article [GMS1] contains an overview of all of this. We include also a variation used in [KP].

The darmonpoints package can also compute equations for some elliptic curves E/F defined over number fields F, as long as certain conditions are satisfied. Namely:

  1. F has narrow class number 1.
  2. if N is the conductor of the elliptic curve, it must admit a factorization of the form N = PDM, where:
    1. P, D and M are relative coprime.
    2. P is a prime ideal of F of prime norm.
    3. D is the discriminant of a quaternion algebra over F which is split at only one infinite place.

Finally, we include the module padicperiods, which allows for the computation of p-adic periods attached to two-dimensional components of the cohomology of the same arithmetic groups, and which has allowed us to find the corresponding abelian surfaces in some cases (see [GM]).

The full documentation can be found at http://mmasdeu.github.io/darmonpoints/

Installation

Installation of the darmonpoints package has been greatly simplified, thanks to Matthias Köppe "Sample Sage" (https://github.com/mkoeppe/sage_sample). Magma is no longer required: the arithmetic of quaternion algebras uses PARI/GP (through SageMath), fundamental domains of arithmetic Fuchsian groups are computed with James Rickards' library (vendored in darmonpoints/fdom, see the README there), and fundamental domains of arithmetic Kleinian groups with a Python port of Aurel Page's KleinianGroups package (darmonpoints/kleinian.py).

Building the package compiles a C extension against the PARI library used by Sage, so the PARI headers must be available (they are in the conda/SageMath distributions). If they live outside sys.prefix, set the environment variable PARI_PREFIX.

Magma (https://magma.maths.usyd.edu.au/magma/) can still be used, for instance to compare results: pass a Magma session (magma=magma) or backend='magma' to the arithmetic groups and the high level routines. For this we include the original Magma package KleinianGroups by Aurel Page (http://www.normalesup.org/~page/Recherche/Logiciels/KleinianGroups/KleinianGroups-1.0.tar.gz).

To install the package use the following command:

SAGE_PY=$(sage -c 'import sys; print(sys.executable)')
"$SAGE_PY" -m pip install --user --upgrade --no-build-isolation darmonpoints

(--no-build-isolation makes the C extension compile against the cypari2 and PARI of your Sage installation, which is required.)

If you rather install the cutting-edge version from the github repository (which is likely to be broken), then use the following command:

"$SAGE_PY" -m pip install --user --upgrade --no-build-isolation -v git+https://github.com/mmasdeu/darmonpoints.git

Basic usage

The files darmonpoints.py, findcurve.py and padicperiods.py contain the high level routines from which show how to use the package, although one can use parts of the package in other ways if one feels adventurous. Here are some sample calculations that one can try:

sage: from darmonpoints.darmonpoints import darmon_point
  1. A classical Darmon (a.k.a. Stark-Heegner) point. The following will perform a 7-adic calculation to precision 7^20, to find a point over the real quadratic field of discriminant 41 for the elliptic curve 35a1:

    sage: darmon_point(7,EllipticCurve('35a1'),41,20)
    
  2. A quaternionic Darmon (a.k.a. Greenberg) point:

    sage: darmon_point(13,EllipticCurve('78a1'),5,20)
    
  3. A Darmon point for a curve over a field of mixed signature:

    sage: F.<r> = NumberField(x^3 - x^2 - x + 2)
    sage: E = EllipticCurve([-r -1, -r, -r - 1,-r - 1, 0])
    sage: N = E.conductor()
    sage: P = F.ideal(r^2 - 2*r - 1)
    sage: beta = -3*r^2 + 9*r - 6
    sage: darmon_point(P,E,beta,30)
    
  4. A Darmon point for a curve over an imaginary quadratic field (aka Trifkovic point):

    sage: F.<r> = QuadraticField(-3)
    sage: w = (r+1)/2
    sage: E = EllipticCurve([1, w+1, 0, w, 0])
    sage: P = F.ideal(w+8)
    sage: beta = 2*w + 21
    sage: darmon_point(P,E,beta,30)
    

We can also discover equations of curves!

  1. We first find a curve over the rationals. The following command will find a curve of conductor 30, using a 5-adic calculation with precision of 5^20, and the quaternion algebra of discriminant `6`:

    sage: from darmonpoints.findcurve import find_curve
    sage: find_curve(5,6,30,20)
    

    This constructs the curve with equation:

    y^2 + x*y + y = x^3 + x + 2
    
  2. Now for a curve defined over a real quadratic field. Note that here we must specify which place will ramify in the quaternion algebra:

    sage: from darmonpoints.findcurve import find_curve
    sage: F.<r> = QuadraticField(5)
    sage: P = F.ideal(3/2*r + 1/2)
    sage: D = F.ideal(3)
    sage: find_curve(P,D,P*D,30,ramification_at_infinity = F.real_places()[:1])
    

    This returns something like:

    y^2 + (1/2*r-1/2)*x*y = x^3 + (1/2*r+1/2)*x^2 + (285/2*r-793/2)*x + (3153/2*r-7689/2)
    
  3. A curve over a cubic field of mixed signature:

    sage: from darmonpoints.findcurve import find_curve
    sage: F.<r> = NumberField(x^3 -3)
    sage: P = F.ideal(r-2)
    sage: D = F.ideal(r-1)
    sage: find_curve(P,D,P*D,30)
    

    This should return an elliptic curve like this:

    y^2 + r*x*y + (r+1)*y = x^3 + (-575*r^2-829*r-1195)*x + (-13327*r^2-19221*r-27721)
    

Finally, there is also code to compute Darmon-Vonk quantities. Here are a couple of examples.

  1. A Darmon-Vonk point for the matrix group:

    sage: from darmonpoints.darmonvonk import darmon_vonk_point
    sage: darmon_vonk_point(5, 1, 3, 13, 60, recognize_point='lindep')
    
  2. A quaternionic Darmon-Vonk point:

    sage: from darmonpoints.darmonvonk import darmon_vonk_point
    sage: darmon_vonk_point(5, 6, 53, 92, 120, scaling=12, recognize_point='algdep')
    

Darmon
H.Darmon. Integration on Hp x H and arithmetic applications. Annals of Math.

DarmonVonk
H.Darmon, J.Vonk. Singular moduli for real quadratic fields: a rigid analytic approach. Duke Math.

GM
X.Guitart, M.Masdeu. Periods of modular GL2-type abelian varieties and p-adic integration. Experimental Mathematics.

GMS1
X.Guitart, M.Masdeu, M.H.Sengun. Darmon points on elliptic curves over number fields of arbitrary signature. Proc. LMS.

GMS2
X.Guitart, M.Masdeu, M.H.Sengun. Uniformization of modular elliptic curves via p-adic methods. Journal of Algebra.

GMX
X.Guitart, M.Masdeu, X.Xarles A quaternionic construction of p-adic singular moduli. Res. Math. Sci.

Greenberg
M.Greenberg. Stark-Heegner points and the cohomology of quaternionic Shimura varieties. Duke Math.

KP
A.Pacetti, D.Kohen (with an appendix by M.Masdeu) On Heegner points for primes of additive reduction ramifying in the base field. Transactions of the AMS.

Trifkovic
M.Trifkovic. Stark-Heegner points on elliptic curves defined over imaginary quadratic fields. Duke Math.

Metadata

Release files for darmonpoints 9.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for darmonpoints 9.0.1
File Size Uploaded Provenance Actions
darmonpoints-9.0.1.tar.gz 789.9 kB Without provenance Details for darmonpoints-9.0.1.tar.gz

Release files / darmonpoints-9.0.1.tar.gz

Download URL darmonpoints-9.0.1.tar.gz
Size 789.9 kB
Tags Source
SHA-256 checksum
How to use checksums
968192801026df76ad1219e6e61c1c2820f084f9ea10095911111df843bdb337
BLAKE2b-256 checksum
How to use checksums
9d413feffcf3aa1b57797c9131f7d7a5eeb6f3f2b2d47990e9cb1c48acd1f1fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.16

Security for darmonpoints 9.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page