Singular moduli for real quadratic fields


This page describes the contents of the software package rmmc in Magma, designed to compute with rigid meromorphic cocycles, and various concomitant invariants. These invariants were introduced in the papers

[DV1] "Singular moduli for real quadratic fields: A rigid analytic approach"
[DV2] "Arithmetic intersections of modular geodesics"
[DV3] "Real quadratic Borcherds products"

The main functions are discussed below, and are subdivided as follows:
  1. Rigid meromorphic cocycles
  2. RM Values
  3. Cuspidal values
  4. Stark-Heegner points
  5. Further functions and examples
To start, save the folder rmmc on a machine that has Magma, and make sure you use a recent version. Then make this folder your directory:

cd path-to-folder/rmmc
magma

After the Magma session has started, load the code by typing

> load "rmmc.m";

1. Rigid meromorphic cocycles

It is proved in [DV1] that any rigid meromorphic cocycle may be written, up to analytic cocycles, as a finite linear combination of theta cocycles Jτ for some RM points τ. This code computes these theta cocycles, which are modular symbols modulo constants, and stores them in a rather complicated data structure, which essentially encodes its rigid meromorphic period function, see [DV1, Chapter 3].

The user has the option to either compute a theta cocycle from scratch, or load data from one of the pre-computed cocycles included with the code.

(A) To compute your own cocycle, simply run (for example)

> load "rmmc.m";
> J := RigidCocycle(D12F2,5,100);

In general, the function RigidCocycle(F,p,m) takes as input The naming convention is as follows: All quadratic forms of discriminant less than a thousand are automatically initialised with the convention that DaFb stands for a form of discriminant a in the b-th equivalent class. In the above example, the cocycle of the non-trivial class of discriminant 12 was computed, to 5-adic precision 100.

(B) Alternatively, one can use a precomputed cocycle that is available in the folder. For instance, one could instead run

> load "J5F1p7.m";

to obtain the 7-adic cocycle attached to the unique class of forms of discriminant 5. This cocycle will be initialised under the name J5F1p7.

2. RM Values

Once a theta cocycle J has been computed, its value at an RM point is computed with the function

> RMValue(J,G);

where G is the unique quadratic form whose first root is the desired RM point, which must therefore be such that p is inert in its associated order. An optional argument alg := true may be inserted to automatically attempt to recognise this RM value as an algebraic number, modulo torsion and modulo powers of the fundamental unit, see [DV1, Chapter 4].

For instance, suppose J is the 7-adic theta cocycle attached to τ, the first root of D5F1 = x2 - xy - y2, the unique class of quadratic forms of discriminant Δ1=5. we compute the following RM value:

> a := RMValue(J,D33F1 : alg := true);
Minimal polynomial (over Q) : 15*x^4 - 14*x^2 + 15

If we denote Δ2=33, which has class number 2, then the number a computed here is precisely the quantity that would have been called J7(τ,ρ) in the terminology of [DV1], where ρ is one of the two classes of that discriminant. The above output says that this value is contained in Q(-11, -15).

Since the bottleneck for the computation is the computation of the cocycle J, it is desirable to automate the above function to range over a large set of quadratic forms. The command RMValues(J,I), where computes, for any discriminant in the interval I for which p is inert, the set of RM values of J at every class of quadratic forms in that discriminant. The code automatically verifies for each discriminant whether Shimura reciprocity is satisfied. In addition, all the non-trivial Newton polygons of the minimal polynomials of the invariants in printed. For instance, the following command computes the RM values of this cocycle at all the discriminants in a specified range, in this case [1,2,...,100], for which the prime p is inert.

> RMValues(J,[1..100]);

In this case, since for Δ1=5 we have h = h+ (=1) the RM values will be trivial for any Δ2 for which also h = h+, since complex conjugation should act as inversion, see [DV, Remark 4.21]. The above command will therefore return 1 for a large proportion of discriminants, in this particular example.

3. Cuspidal values

The cuspidal values of a theta cocycle Jτ are the quantities Jτ[0,∞] studied in [DV2], where it was shown that if p is a genus 0 prime, some small power of them is a p-unit in the ring class field attached to τ. If we computed, as above, a theta cocycle J, then its cuspidal value may be computed using the command

> CuspidalValue(J);

An optional argument alg := true may be given, which will automatically attempt to recognise the cuspidal value as an algebraic number. When p is a genus 0 prime, the algebraicity was proved in [DV2] using the work of Dasgupta-Kakde, but in practice a lot of p-adic precision may be needed to find the minimal polynomial, since by construction the computed quantities are p-adic units, making their minimal polynomials 'skewed' and harder to recognise.

It is frequently useful to compute the cuspidal values of all theta cocycles of a certain discriminant. The command CuspidalValues(D,p,m) accomplishes this, where which outputs two sequences For instance:

> I,C := CuspidalValues(77,3,100 : alg := true);
Cuspidal value of quadratic form <1,7,-7>
satisfies the polynomial: x^2 + 1358*x + 531441
Cuspidal value of quadratic form <-1,7,7>
satisfies the polynomial: 531441*x^2 + 1358*x + 1

4. Stark-Heegner points

In general, the genus of X_0(p) forms an obstruction to the cuspidal value Jτ[0,∞] being algebraic. The built in routines for Hecke operators allow us to investigate this obstruction, which takes the form of a collection of Stark-Heegner points on the modular abelian varieties of level p.

By combining the reciprocity law of [DV2, Chapter 4] with the results of [DV2, Chapter 3], we obtain

Jτ[0,∞] = 12/(p-1) * JDR[τ] + Σi Lalg(fi,1) * Jf_i-

To obtain meaningful numerical invariants, we may use Hecke operators to project to the various eigenspaces.



The basic building block of the Hecke algebra implementation is the function

> HeckeCocycle(J,l)

where J is a theta cocycle as before, and l is a prime. The output is the cocycle Tl(J), defined via the usual double coset decomposition. This allows us to take Hecke projectors in general, and currently only some very limited functionality is included in this package, in the form of a function

> HeckeProjection(J,L)

where L = [ [l1,a1], ..., [ln,an]] is a sequence of sequences, where the li are primes, and the ai are integers. The output is the cocycle (Tl1-a1)*...*(Tln-an) (J) Suppose E is an elliptic curve of conductor p, and TJ is a cocycle whose parabolic lifting obstruction is in the E-isotypic component. Then the command

> StarkHeegnerPoint(TJ,E)

computes the coordinates of the Stark-Heegner point attached to TJ on E, by explicitly computing the p-adic uniformisation of its cuspidal value, as described in [DV2]. We illustrate this with an example. First, let us compute the theta cocycle attached to the quadratic form -x2 + 4 xy + 4 y2 of discriminant 32.

> time J := RigidCocycle(D32F1,11,30);
Computing series in levels 0 and 1.
Computing substitutions.
Doing level 2 now: ===================
Doing level 3 now: ===================
Doing level 4 now: ===================
Doing level 5 now: ===================
Doing level 6 now: ===================
Doing level 7 now: ===================
Doing level 8 now: ===================
Doing level 9 now: ===================
Doing level 10 now: ==================
Doing level 11 now: ==================
Doing level 12 now: ==================
Doing level 13 now: ==================
Doing level 14 now: ==================
Doing level 15 now: ==================
Doing level 16 now: ==================
Doing level 17 now: ==================
Doing level 18 now: ==================
Doing level 19 now: ==================
Doing level 20 now: ==================
Doing level 21 now: ==================
Doing level 22 now: ==================
Doing level 23 now: ==================
Doing level 24 now: ==================
Doing level 25 now: ==================
Doing level 26 now: ==================
Doing level 27 now: ==================
Doing level 28 now: ==================
Doing level 29 now: ==================
Time: 14.830


In this case, we have that
J0∞ = 6/5 JDR + 1/5 JE-
where E is the elliptic curve with Weierstrass equation y2 + y = x3 - x2 - 10*x - 20.

(A) First, we project J onto the Eisenstein subspace, and compute its cuspidal value:

> TJ := HeckeProjection(J,[2,-2]);
> a := CuspidalValue(TJ : alg := true);
Minimal polynomial: 1771561*x^2 + 2338*x + 1

Note that 1771561 = 116, and that this polynomial splits over Q(-2), which lies in the ring class field of discriminant 32. This is consistent with what the main theorem of [DV2] proves. Note also that it follows from the above that (T2+2)J = 6 JDR, and the cuspidal value we computed is in fact the 6th power of (-2 - 3)/11.

(B) Second, we project J onto the E-isotypic component, and compute the resulting Stark-Heegner point:

> TJ := HeckeProjection(J,[2,3]);
> E := EllipticCurve([0,-1,1,-10,-20]);
> P := StarkHeegnerPoint(TJ,E);
X-coordinate satisfies : x^2 + 8
Y-coordinate satisfies : x^2 + 10*x + 57

In this case, the output P contains the computed p-adic approximation to the global point (2-2, 4-2 - 5) on E.

5. Further functions and examples

Besides the functionality described above, there are a number of functions available that may be of use to the interested reader. We will discuss a few of them here, meanwhile illustrating all the functionality with concrete examples.

The Atkin-Lehner involutions wp and w discussed in [DV2, Chapter 1] give rise to the projections (1+wp) and (1+w) which can be computed by running

> wpPlus(J);
> winfPlus(J);

as well as projections (1-wp) and (1-w), computed by

> wpMinus(J);
> winfMinus(J);


Example 1

We let τ be the first root of x2 +3xy - y2, the unique class of quadratic forms of discriminant Δ1=13. We first compute the theta cocycle Jτ for p = 19:

> time J := RigidCocycle(D13F1,19,15);
Computing series in levels 0 and 1.
Computing substitutions.
Doing level 2 now: ===================
Doing level 3 now: ===================
Doing level 4 now: ===================
Doing level 5 now: ===================
Doing level 6 now: ===================
Doing level 7 now: ===================
Doing level 8 now: ===================
Doing level 9 now: ===================
Doing level 10 now: ==================
Doing level 11 now: ==================
Doing level 12 now: ==================
Doing level 13 now: ==================
Doing level 14 now: ==================
Time: 9.350

Let Δ2=136, which has class number 4. We will now compute the RM values J19(τ,ρ) for the four RM points ρ of discriminant 136. Note that p = 19 is not a genus 0 prime, which means the RM points ρ are not necessarily principal divisors, and hence the invariants J19(τ,ρ) are not expected to be algebraic due to the lifting obstruction of Jτ being a combination of the fundamental unit, as well as the (transcendental) Tate period attached to the unique cusp form of level Γ0(19). However, by [DV2,Chapter 1] the 2-dimensional cuspidal part of the 4-dimensional torus H2(Γ,Cpx) is in the minus part for wp, and hence the theta cocycle (1+wp)Jτ lifts modulo powers of the fundamental unit, and its RM values are expected to be algebraic. Indeed, we compute

> TJ := wpPlus(J);
> RMValues(TJ,136 : sym := true);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 3*t + 1
tau2 = runs through roots of the 4 classes of discriminant 136
(Precision: 19 ^ 15 )

Minimal polynomial (over Q) : 38*x^4 + 73*x^3 + 102*x^2 + 73*x + 38

Newton slopes at 2 :
[ 1, 0, 0, -1 ]

Newton slopes at 19 :
[ 1, 0, 0, -1 ]

Shimura reciprocity is satisfied for these invariants.

Note that an optional argument sym := true was included, which causes the code to look for an algebraic relation of degree 4, reflecting the fact that we projected onto the plus part of wp. This is an example of an instance where the p-adic valuation of some p-adic invariants is non-zero. See [DV, Theorem 4.25]. In discriminant 284, we obtain:

> RMValues(TJ,284 : sym := true);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 3*t + 1
tau2 = runs through roots of the 2 classes of discriminant 284
(Precision: 19 ^ 15 )

Minimal polynomial (over Q) : 533*x^2 + 616*x + 533

Newton slopes at 13 :
[ 1, -1 ]

Newton slopes at 41 :
[ 1, -1 ]

Shimura reciprocity is satisfied for these invariants.


Example 2

The following computes the 13-adic cocycle attached to the quadratic form -x2 + 4x + 4 of discriminant Δ1=32, which has class number 2. The precision is to 60 digits of 13-adic accuracy.

> time J := RigidCocycle(D32F1,13,60);
Computing series in levels 0 and 1.
Computing substitutions.
Doing level 2 now: ===================
Doing level 3 now: ===================
Doing level 4 now: ===================
Doing level 5 now: ===================
Doing level 6 now: ===================
Doing level 7 now: ===================
Doing level 8 now: ===================
Doing level 9 now: ===================
Doing level 10 now: ==================
Doing level 11 now: ==================
Doing level 12 now: ==================
Doing level 13 now: ==================
Doing level 14 now: ==================
Doing level 15 now: ==================
Doing level 16 now: ==================
Doing level 17 now: ==================
Doing level 18 now: ==================
Doing level 19 now: ==================
Doing level 20 now: ==================
Doing level 21 now: ==================
Doing level 22 now: ==================
Doing level 23 now: ==================
Doing level 24 now: ==================
Doing level 25 now: ==================
Doing level 26 now: ==================
Doing level 27 now: ==================
Doing level 28 now: ==================
Doing level 29 now: ==================
Doing level 30 now: ==================
Doing level 31 now: ==================
Doing level 32 now: ==================
Doing level 33 now: ==================
Doing level 34 now: ==================
Doing level 35 now: ==================
Doing level 36 now: ==================
Doing level 37 now: ==================
Doing level 38 now: ==================
Doing level 39 now: ==================
Doing level 40 now: ==================
Doing level 41 now: ==================
Doing level 42 now: ==================
Doing level 43 now: ==================
Doing level 44 now: ==================
Doing level 45 now: ==================
Doing level 46 now: ==================
Doing level 47 now: ==================
Doing level 48 now: ==================
Doing level 49 now: ==================
Doing level 50 now: ==================
Doing level 51 now: ==================
Doing level 52 now: ==================
Doing level 53 now: ==================
Doing level 54 now: ==================
Doing level 55 now: ==================
Doing level 56 now: ==================
Doing level 57 now: ==================
Doing level 58 now: ==================
Doing level 59 now: ==================
Time: 224.330

The print statements allow the user to keep track of how far along the computation is, but if the copious output is undesired, these print statements can easily be disabled by instead running:

> J := RigidCocycle(D32F1,13,60 : prt := false);

The quadratic form D32F1 was initialised in the file Discriminants.m, which is loaded automatically at the start of the session, and contains representatives for all classes of quadratic forms of discriminant up to 1000. Since the computation of the above cocycle is done to a substantial 13-adic accuracy, it takes a few minutes to compute. We can easily store the data for the cocycle to a file, which can be loaded in any future session. To use this feature, simply run

> WriteCocycle(J,"32");

This stores the data for the cocycle to a file, whose name is "J32p13.m". The string "32" can be replaced with any chosen name for the quadratic form, which can be more descriptive in case the user wishes to store the cocycles attached to several classes of the same discriminant. In any future magma session, the previously computed cocycle may now be initialised using

> load "J32p13.m";

The name of the cocycle is now J32p13, and we compute its RM values as before. For instance, we get

> RMValues(J32p13,245);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 4*t + 4
tau2 = runs through roots of the 2 classes of discriminant 245
(Precision: 13 ^ 60 )

Minimal polynomial (over Q) : 56929*x^16 - 35330*x^15 - 35739*x^14 - 19213*x^13 - 2471*x^12 + 754*x^11 + 48757*x^10 + 42018*x^9 - 8253*x^8 + 42018*x^7 + 48757*x^6 + 754*x^5 - 2471*x^4 - 19213*x^3 - 35739*x^2 - 35330*x + 56929
Shimura failure for G = <-5,15,1>
Shimura failure for G = <5,15,-1>

WARNING: Shimura reciprocity seems to fail.
Polynomial over Q might not have been recognised correctly!
Either try running the code again, or compute to higher precision.


Notice that the code throws a warning. The algorithm the attempts to find the minimal polynomials of the p-adic invariants relies on the probabilistic LLL method and in general requires high p-adic precision if the discriminants and class numbers are large. The above warning means that the invariants do not satisfy the displayed polynomial up to the required precision, which is a sign that we might need more p-adic precision to recognise this invariant. However, in practice it often seems easier to recognise instead the invariants

Jp+(τ,ρ) := (1+wp)(Jτ) [ρ]
Jp-(τ,ρ) := (1-wp)(Jτ) [ρ]

> RMValues(wpPlus(J32p13),245 : sym := true);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 4*t + 4
tau2 = runs through roots of the 2 classes of discriminant 245
(Precision: 13 ^ 60 )

Minimal polynomial (over Q) : 134*x^4 - 228*x^3 + 237*x^2 - 228*x + 134

Newton slopes at 2 :
[ 1/2, 1/2, -1/2, -1/2 ]

Newton slopes at 67 :
[ 1, 0, 0, -1 ]

Shimura reciprocity is satisfied for these invariants.

> RMValues(wpMinus(J32p13),245);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 4*t + 4
tau2 = runs through roots of the 2 classes of discriminant 245
(Precision: 13 ^ 60 )

Minimal polynomial (over Q) : 29452329*x^8 - 530630352*x^7 + 4871029932*x^6 - 26201425824*x^5 + 74507288455*x^4 - 26201425824*x^3 + 4871029932*x^2 - 530630352*x + 29452329

Newton slopes at 3 :
[ 2, 2, 2, 2, -2, -2, -2, -2 ]

Newton slopes at 67 :
[ 1, 1, 0, 0, 0, 0, -1, -1 ]

Shimura reciprocity is satisfied for these invariants.

And here are some more RM values for the same cocycle.

> RMValues(wpPlus(J32p13),[100..125] : sym := true);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 4*t + 4
tau2 = runs through roots of the 1 classes of discriminant 109
(Precision: 13 ^ 60 )

Minimal polynomial (over Q) : 14003*x^2 - 1762*x + 14003

Newton slopes at 11 :
[ 1, -1 ]

Newton slopes at 19 :
[ 1, -1 ]

Newton slopes at 67 :
[ 1, -1 ]

Shimura reciprocity is satisfied for these invariants.

=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 4*t + 4
tau2 = runs through roots of the 2 classes of discriminant 112
(Precision: 13 ^ 60 )

Minimal polynomial (over Q) : 1072*x^4 - 3640*x^3 + 5217*x^2 - 3640*x + 1072

Newton slopes at 2 :
[ 2, 2, -2, -2 ]

Newton slopes at 67 :
[ 1, 0, 0, -1 ]

Shimura reciprocity is satisfied for these invariants.

=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 4*t + 4
tau2 = runs through roots of the 2 classes of discriminant 124
(Precision: 13 ^ 60 )

Minimal polynomial (over Q) : 1201712*x^4 - 3946488*x^3 + 5631681*x^2 - 3946488*x + 1201712

Newton slopes at 2 :
[ 2, 2, -2, -2 ]

Newton slopes at 19 :
[ 1, 0, 0, -1 ]

Newton slopes at 59 :
[ 1, 0, 0, -1 ]

Newton slopes at 67 :
[ 1, 0, 0, -1 ]

Shimura reciprocity is satisfied for these invariants.

=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -t^2 + 4*t + 4
tau2 = runs through roots of the 1 classes of discriminant 125
(Precision: 13 ^ 60 )

Minimal polynomial (over Q) : 129*x^2 + 226*x + 129

Newton slopes at 3 :
[ 1, -1 ]

Newton slopes at 43 :
[ 1, -1 ]

Shimura reciprocity is satisfied for these invariants.


Example 3

When we reach the limits of the invariants we can recognise with the p-adic precision we chose, there are several options. It is always possible to recompute the cocycle to a higher p-adic precision, but in practice we can try to push to computed cocycle as far as possible by trying the following The latter option consists of raising J to the power 12, or any desired smaller power, to kill any torsion obstruction that may exist, see [DV, Lemma 3.11]. In certain cases, this can decrease the degree of the minimal polynomial, and thus aid the recognition algorithms.

For instance, let us consider the following example.

> time J := RigidCocycle(D12F1,7,50 : prt := false);
Time: 21.070
> RMValues(J,5);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -2*t^2 + 2*t + 1
tau2 = runs through roots of the 1 classes of discriminant 5
(Precision: 7 ^ 50 )

Minimal polynomial (over Q) : 269989*x^8 + 213806*x^7 + 226698*x^6 + 81162*x^5 + 92093*x^4 + 81162*x^3 + 226698*x^2 + 213806*x + 269989

Newton slopes at 37 :
[ 1, 0, 0, 0, 0, 0, 0, -1 ]

Newton slopes at 7297 :
[ 1, 0, 0, 0, 0, 0, 0, -1 ]

Shimura reciprocity is satisfied for these invariants.

The appearance of such large prime divisors does not fill us with confidence that the RM value was recognised properly. Moreover, the field defined by this polynomial does not seem to be anything relevant to the class field theory of the biquadratic field Q(3, 5).

In this case, the failure of the algorithm is not to be blamed on insufficient precision, but rather on torsion. Indeed, we may apply a non-zero power to the RM value, or even the cocycle, using the command CocyclePower(J,n).

> RMValues(CocyclePower(J,6),5);
=========================================================
Algebraic invariants Jp(tau1,tau2)
tau1 = root of -2*t^2 + 2*t + 1
tau2 = runs through roots of the 1 classes of discriminant 5
(Precision: 7 ^ 50 )

Minimal polynomial (over Q) : 64*x^4 - 264*x^3 + 569*x^2 - 264*x + 64

Newton slopes at 2 :
[ 3, 3, -3, -3 ]

Shimura reciprocity is satisfied for these invariants.

This time, the output looks much more promising. This polynomial generates the field Q(-3, 5), which is contained in the compositum of the two ring class fields.