Miscellaneous Functions

First import everything:

sage: from mdsage import *
sage: counts("113")
[('1', 2), ('3', 1)]
mdsage.maartens_sage_functions.Gamma11(m, n)

sage doesn’t have the congruence subgroup for the curve X_1(m,mn) but the group G defined here is conjugate to the group defining the modular curve X_1(m,mn)the one we are interested in so give isomorphic modular curves where the isomorphism even has a moduli interpretation In particular I use the surjection X_1(m^2n) -> X_1(m,mn) Which sends (E,P) to (E/<mnP>, Q mod <mnP>, P mod <mnP>) where Q in E is such that <Q,mnP> = zeta_m note that this surjection is defined over Q <=> m=2.

If d is a unit in Z/m^2nZ then sometimes (E,P) and (E,dP) are mapped to the same point on X_1(m,mn) This happens precicely if d is +- 1 modulo mn if j(E) is not 0 or 1728

mdsage.maartens_sage_functions.QuadraticForm_from_quadric(Q)

On input a homogeneous polynomial of degree 2 return the Quadratic Form corresponding to it.

mdsage.maartens_sage_functions.ambient_integral_structure_matrix(M, verbose=False)

In certatain cases (weight two any level) this might return the integral structure of a an ambient modular symbol space. I wrote this because for high level this is very slow in sage because there is no good sparse hermite normal form code in sage for huge matrices.

mdsage.maartens_sage_functions.congruence_groups_between_gamma0_and_gamma1(N)

INPUT:

  • N - an integer

OUTPUT:

  • The set of all congruence subgroups contained in Gamma0(N) that contain Gamma1(N)

EXAMPLES:

sage: from mdsage import *
sage: congruence_groups_between_gamma0_and_gamma1(1)
{Modular Group SL(2,Z)}

sage: congruence_groups_between_gamma0_and_gamma1(15)
{Congruence Subgroup Gamma_H(15) with H generated by [14],
 Congruence Subgroup Gamma_H(15) with H generated by [4, 11, 14],
 Congruence Subgroup Gamma0(15)}
mdsage.maartens_sage_functions.count_points_J_H(G, p)

Returns the number of points on J_H(GF(p))

INPUT:

  • G - a congruence subgroup of type GammaH

  • p - a prime

OUTPUT:

  • the number of F_p points on the jacobian of the modular curve X_H

EXAMPLES:

sage: from mdsage import *
sage: count_points_J_H(Gamma0(29),19)
196
mdsage.maartens_sage_functions.counts(list)

On input of some iterable l, this function returns a list of pairs (s,c) where s runs trough the distinct elements of l and c indicates how often each element occurs.

EXAMPLES:

sage: from mdsage import *
sage: l = "A string is also iterable!"
sage: counts(l)
[(' ', 4), ('!', 1), ('A', 1), ('a', 2), ('b', 1), ('e', 2), ('g', 1), ('i', 3), ('l', 2), ('n', 1), ('o', 1), ('r', 2), ('s', 3), ('t', 2)]
mdsage.maartens_sage_functions.cuspidal_integral_structure_matrix(M, verbose=False)

Computes the cuspidal integral structure matrix of a modular symbols space in a runningtime hopefully faster then that of sage

Input:

  • M - a modular symbols space

Output:

  • a matrix whose rows give a ZZ basis for the cuspidals supspace with respect to the standard basis of M

Tests:

sage: from mdsage import *
sage: M = ModularSymbols(Gamma1(15))
sage: cuspidal_integral_structure_matrix(M)
[ 0  0  0  0  0  0  0  0 -1  0  0  0  0  0  1  0  0]
[ 0  0  0  0  0  1  0  0 -1  0  0  0  0  0  0  0  1]
mdsage.maartens_sage_functions.cuspidal_integral_to_rational_basis(M)

Returns the base change matrix for the cuspidal subspace of M

mdsage.maartens_sage_functions.diamond_operator(E, d)

Returns the tate normal form of the pair (E,d*(0,0))

INPUT:

  • E - an elliptic curve in tate normal form

  • d - an integer

OUTPUT:

  • a1,a2,a3,a4,a6 - the a invatiants of E after writing (E,d*(0,0)) in tate normal form.

EXAMPLES:

sage: from mdsage import *
sage: E = EllipticCurve([11,10,10,0,0])
sage: diamond_operator(E,2)
[9/10, -1/10, -1/10, 0, 0]
mdsage.maartens_sage_functions.generators_of_subgroups_of_unit_group(R)

INPUT:

  • R - a commutative ring whose unit group is finite

OUTPUT:

  • An iterator which yields a set of generators for each subgroup of R^*

EXAMPLES:

sage: from mdsage import *
sage: list(generators_of_subgroups_of_unit_group(Integers(28)))
[[15, 17], [11], [3], [15, 13], [15], [27], [17], [9], [13], []]
mdsage.maartens_sage_functions.gonality_lower_bound(G, lambda1=0.238)

Return the gonality bound of the modular curve X(G) as given by Dan Abramovich in “A linear lower bound on the gonality of modular curves”

lambda1 is conjectured to 1/4th, but has only been proven to be > 0.238 [1, p. 3], bigger lambda1 means a better lowerbound.

EXAMPLES:

sage: from mdsage import *
sage: gonality_lower_bound(Gamma1(171))
129

[1] On the torsion of elliptic curves over quartic number fields - Daeyol Jeon, Chang Heon Kim and Euising Park

mdsage.maartens_sage_functions.has_modular_unit_of_degree(G, deg, rational=True, verbose=False, qfminim_bound=100000, l2_step=0)

Returns True,v if the modular curve X(G) has a modular unit v of degree equal to deg, and false,None otherwise.

INPUT:

  • G - a congruence subgroup

  • deg - int, the degree of modular unit to search for

  • rational - bool, true means modular unit should be defined over QQ

  • verbose - bool (default = false), wether or not to print progress

  • qfminim_bound - int (default - 10^5), given to pari’s qfminim command, and is an upper bound on

    how many vectors of short l2 norm are returned by pari this function will raise an error if pari finds more short vectors then it returns

  • l2_step - int (default = 0) If l2_step>0 this function first searches the modular units with l2 norm equal to l2_step

    then 2*l2_step, 3*l2_step, e.t.c. instead of searching all vectors with l2 norm 2*deg^2. The l2 norm of a modular unit with divisor n1*c1 + … + nk*ck is the l2 norm of (n1,…nk).

mdsage.maartens_sage_functions.modular_units_of_degree(G, deg, rational=True, verbose=False, qfminim_bound=100000)

Returns an iterator over all modular units on the curve X(G).

INPUT:

  • G - a congruence subgroup

  • deg - int, the degree of modular unit to search for

  • rational - bool, true means modular unit should be defined over QQ

  • verbose - bool (default = false), wether or not to print progress

  • qfminim_bound - int (default - 10^5), given to pari’s qfminim command, and is an upper bound on

    how many vectors of short l2 norm are returned by pari this function will raise an error if pari finds more short vectors then it returns

mdsage.maartens_sage_functions.positive_part(v)

Returns the vector consisting only of the postive entries of the given vector

EXAMPLES:

sage: from mdsage import *
sage: v = vector([1,-1,2,-2,3,-3])
sage: positive_part(v)
(1, 0, 2, 0, 3, 0)
mdsage.maartens_sage_functions.rational_cuspidal_classgroup(G, degree_zero=True)

On input a congruence subgroup G this function returns the lattice of sums of galois invariant orbits of cusps modulo divisors of modular units.

mdsage.maartens_sage_functions.tate_normal_form(E, p)

Writes a pair (E,p) of elliptic curve with a point in tate normal form.

On input a pair (E,p) where E is an elliptic curve and p a point of order > 3 on E, this function returns the a invariants a1,a2,a3,a4,a6 after writing the pair (E,p) in the tate normal form. I.e. the form in which p=(0,0), a4=a6=0 and a2=a3 .

EXAMPLES:

We show in this example how to calculate the diamond operators on X_1(5) which is isomorphic to P1:

sage: from mdsage import * sage: R.<b> = QQ[]

This is a model of the universal elliptic curve over X_1(5):

sage: E_univ = EllipticCurve(R.fraction_field(),[b+1,b,b,0,0]) sage: E_univ([0,0])*5 (0 : 1 : 0) sage: tate_normal_form(E_univ,2*(E_univ(0,0))) [(b - 1)/b, -1/b, -1/b, 0, 0]

This shows that <2> works on the above model of X_1(5) by sending b to -1/b.