AUTHORS:
The congruence subgroup for some subgroup
, which is the subgroup of
consisting of matrices of the form
with
and
.
TESTS:
We test calculation of various invariants of the group:
sage: GammaH(33,[2]).projective_index()
96
sage: GammaH(33,[2]).genus()
5
sage: GammaH(7,[2]).genus()
0
sage: GammaH(23, [1..22]).genus()
2
sage: Gamma0(23).genus()
2
sage: GammaH(23, [1]).genus()
12
sage: Gamma1(23).genus()
12
We calculate the dimensions of some modular forms spaces:
sage: GammaH(33,[2]).dimension_cusp_forms(2)
5
sage: GammaH(33,[2]).dimension_cusp_forms(3)
0
sage: GammaH(33,[2,5]).dimension_cusp_forms(2)
3
sage: GammaH(32079, [21676]).dimension_cusp_forms(20)
180266112
We can sometimes show that there are no weight 1 cusp forms:
sage: GammaH(20, [9]).dimension_cusp_forms(1)
0
Create an element of this congruence subgroup from x.
If the optional flag check is True (default), check whether x actually gives an element of self.
EXAMPLES:
sage: G = GammaH(10, [3])
sage: G([1, 0, -10, 1])
[ 1 0]
[-10 1]
sage: G(matrix(ZZ, 2, [7, 1, 20, 3]))
[ 7 1]
[20 3]
sage: GammaH(10, [9])([7, 1, 20, 3])
...
TypeError: matrix must have lower right entry (=3) congruent modulo 10 to some element of H
Compare self to other.
The ordering on congruence subgroups of the form GammaH(N) for some H is first by level and then by the subgroup H. In particular, this means that we have Gamma1(N) < GammaH(N) < Gamma0(N) for every nontrivial subgroup H.
EXAMPLES:
sage: G = GammaH(86, [9])
sage: G.__cmp__(G)
0
sage: G.__cmp__(GammaH(86, [11])) is not 0
True
sage: Gamma1(11) < Gamma0(11)
True
sage: Gamma1(11) == GammaH(11, [])
True
sage: Gamma0(11) == GammaH(11, [2])
True
The congruence subgroup . The subgroup H
must be input as a list.
EXAMPLES:
sage: GammaH(117, [4])
Congruence Subgroup Gamma_H(117) with H generated by [4]
sage: G = GammaH(16, [7])
sage: G == loads(dumps(G))
True
sage: G is loads(dumps(G))
True
Used for pickling self.
EXAMPLES:
sage: GammaH(92,[5,11]).__reduce__()
(<function GammaH_constructor at ...>, (92, [5, 11]))
Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G.
EXAMPLES:
sage: G = GammaH(12,[-1,7]); G
Congruence Subgroup Gamma_H(12) with H generated by [7, 11]
sage: G._coset_reduction_data()
([(0, 12, 0), (1, 1, 1), (2, 2, 1), (3, 3, 1), (4, 4, 1), (1, 1, 5), (6, 6, 1), (1, 1, 7), (4, 4, 5), (3, 3, 7), (2, 2, 5), (1, 1, 11)],
{1: [1], 2: [1, 7], 3: [1, 5], 4: [1, 7], 6: [1, 5, 7, 11], 12: [1, 5, 7, 11]})
Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G. This function specifically returns data needed for the first part of the reduction step (the first coordinate).
EXAMPLES:
sage: G = GammaH(12,[-1,5]); G
Congruence Subgroup Gamma_H(12) with H generated by [5, 11]
sage: G._coset_reduction_data_first_coord()
[(0, 12, 0), (1, 1, 1), (2, 2, 1), (3, 3, 1), (4, 4, 1), (1, 1, 5), (6, 6, 1),
(1, 1, 7), (4, 4, 5), (3, 3, 7), (2, 2, 5), (1, 1, 11)]
Compute data used for determining the canonical coset representative of an element of SL_2(Z) modulo G. This function specifically returns data needed for the second part of the reduction step (the second coordinate).
EXAMPLES:
sage: G = GammaH(240,[7,239])
sage: G._coset_reduction_data_second_coord()
{1: [1], 2: [1], 3: [1], 4: [1], 5: [1, 49], 6: [1], 48: [1, 191], 8: [1], 80: [1, 7, 49, 103], 10: [1, 49], 12: [1], 15: [1, 49], 240: [1, 7, 49, 103, 137, 191, 233, 239], 40: [1, 7, 49, 103], 20: [1, 49], 24: [1, 191], 120: [1, 7, 49, 103, 137, 191, 233, 239], 60: [1, 49, 137, 233], 30: [1, 49, 137, 233], 16: [1]}
sage: G = GammaH(1200,[-1,7]); G
Congruence Subgroup Gamma_H(1200) with H generated by [7, 1199]
sage: K = G._coset_reduction_data_second_coord().keys() ; K.sort()
sage: K == divisors(1200)
True
Return an ordered list of inequivalent cusps for self, i.e. a
set of representatives for the orbits of self on
. These are returned in a reduced
form; see self.reduce_cusp for the definition of reduced.
Lemma 3.2 in Cremona’s 1997 book shows that for the action of Gamma1(N) on “signed projective space”
, we haveHaving found a set containing at least one of every equivalence class modulo Gamma1(N), we can be sure of picking up every class modulo GammaH(N) since this contains Gamma1(N); and the reduce_cusp call does the checking to make sure we don’t get any duplicates.
EXAMPLES:
sage: Gamma1(5)._find_cusps()
[0, 2/5, 1/2, Infinity]
sage: Gamma1(35)._find_cusps()
[0, 2/35, 1/17, 1/16, 1/15, 1/14, 1/13, 1/12, 3/35, 1/11, 1/10, 1/9, 4/35, 1/8, 2/15, 1/7, 1/6, 6/35, 1/5, 3/14, 8/35, 1/4, 9/35, 4/15, 2/7, 3/10, 11/35, 1/3, 12/35, 5/14, 13/35, 2/5, 3/7, 16/35, 17/35, 1/2, 8/15, 4/7, 3/5, 9/14, 7/10, 5/7, 11/14, 4/5, 6/7, 9/10, 13/14, Infinity]
sage: Gamma1(24)._find_cusps() == Gamma1(24).cusps(algorithm='modsym')
True
sage: GammaH(24, [13,17])._find_cusps() == GammaH(24,[13,17]).cusps(algorithm='modsym')
True
Return generators for the subgroup H of the units mod self.level() that defines self.
EXAMPLES:
sage: GammaH(17,[4])._generators_for_H()
[4]
sage: GammaH(12,[-1])._generators_for_H()
[11]
Return the LaTeX representation of self.
EXAMPLES:
sage: GammaH(3,[2])._latex_()
'\\Gamma_H(3)'
Returns a sorted list of Python ints that are representatives between 1 and N-1 of the elements of H.
WARNING: Do not change this returned list.
EXAMPLES:
sage: G = GammaH(11,[3]); G
Congruence Subgroup Gamma_H(11) with H generated by [3]
sage: G._list_of_elements_in_H()
[1, 3, 4, 5, 9]
Compute a canonical form for a given Manin symbol.
INPUT:
Two integers (uu,vv) that define an element of .
uu – an integer vv – an integer
NOTE: We do not require that gcd(uu,vv,N) = 1. If the gcd is not 1, we return (0,0).
EXAMPLES:
An example at level 9.:
sage: G = GammaH(9,[7]); G
Congruence Subgroup Gamma_H(9) with H generated by [7]
sage: a = []
sage: for i in range(G.level()):
... for j in range(G.level()):
... a.append(G._reduce_coset(i,j))
sage: v = list(set(a))
sage: v.sort()
sage: v
[(0, 0), (0, 1), (0, 2), (1, 0), (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (2, 0), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (3, 1), (3, 2), (6, 1), (6, 2)]
An example at level 100:
sage: G = GammaH(100,[3,7]); G
Congruence Subgroup Gamma_H(100) with H generated by [3, 7]
sage: a = []
sage: for i in range(G.level()):
... for j in range(G.level()):
... a.append(G._reduce_coset(i,j))
sage: v = list(set(a))
sage: v.sort()
sage: len(v)
361
This demonstrates the problem underlying trac #1220:
sage: G = GammaH(99, [67])
sage: G._reduce_coset(11,-3)
(11, 96)
sage: G._reduce_coset(77, -3)
(11, 96)
Compute a minimal representative for the given cusp c. Returns a pair (c’, t), where c’ is the minimal representative for the given cusp, and t is either 1 or -1, as explained below. Largely for internal use.
The minimal representative for a cusp is the element in
in lowest terms with minimal positive denominator, and minimal
positive numerator for that denominator.
Two cusps and
are equivalent modulo
if and only if
and
for some . Then t is 1 or -1 as c and c’ fall into
the first or second case, respectively.
EXAMPLES:
sage: GammaH(6,[5])._reduce_cusp(Cusp(5,3))
(1/3, -1)
sage: GammaH(12,[5])._reduce_cusp(Cusp(8,9))
(1/3, -1)
sage: GammaH(12,[5])._reduce_cusp(Cusp(5,12))
(Infinity, 1)
sage: GammaH(12,[])._reduce_cusp(Cusp(5,12))
(5/12, 1)
sage: GammaH(21,[5])._reduce_cusp(Cusp(-9/14))
(1/7, 1)
Return the string representation of self.
EXAMPLES:
sage: GammaH(123, [55])._repr_()
'Congruence Subgroup Gamma_H(123) with H generated by [55]'
Return a set of coset representatives for self \ SL2Z.
EXAMPLES:
sage: list(Gamma1(3).coset_reps())
[[1 0]
[0 1], [-1 -2]
[ 3 5], [ 0 -1]
[ 1 0], [-2 1]
[ 5 -3], [1 0]
[1 1], [-3 -2]
[ 8 5], [ 0 -1]
[ 1 2], [-2 -3]
[ 5 7]]
sage: len(list(Gamma1(31).coset_reps())) == 31**2 - 1
True
Return the dimension of the space of new (or -new)
weight
cusp forms for this congruence subgroup.
INPUT:
OUTPUT: Integer
EXAMPLES:
sage: GammaH(33,[2]).dimension_new_cusp_forms()
3
sage: Gamma1(4*25).dimension_new_cusp_forms(2, p=5)
225
sage: Gamma1(33).dimension_new_cusp_forms(2)
19
sage: Gamma1(33).dimension_new_cusp_forms(2,p=11)
21
Given this congruence subgroup , return all
subgroups
for
a divisor of
and such that
is equal to the image of
modulo
.
EXAMPLES:
sage: G = GammaH(33,[2]); G
Congruence Subgroup Gamma_H(33) with H generated by [2]
sage: G._list_of_elements_in_H()
[1, 2, 4, 8, 16, 17, 25, 29, 31, 32]
sage: G.divisor_subgroups()
[Modular Group SL(2,Z),
Congruence Subgroup Gamma_H(3) with H generated by [2],
Congruence Subgroup Gamma_H(11) with H generated by [2],
Congruence Subgroup Gamma_H(33) with H generated by [2]]
Return a set of coset representatives for self \ Gamma0(N), where N is the level of self.
EXAMPLE:
sage: GammaH(108, [1,-1]).gamma0_coset_reps()
[[1 0] [0 1], [-43 -45] [108 113], [ 31 33] [108 115], [-49 -54]
[108 119], [ 25 28] [108 121], [-19 -22] [108 125], [-17 -20] [108
127], [ 47 57] [108 131], [ 13 16] [108 133], [ 41 52] [108
137], [ 7 9] [108 139], [-37 -49] [108 143], [-35 -47] [108
145], [ 29 40] [108 149], [ -5 -7] [108 151], [ 23 33] [108
155], [-11 -16] [108 157], [ 53 79] [108 161]]
Return generators for this congruence subgroup.
The result is cached.
EXAMPLE:
sage: for g in GammaH(3, [2]).generators():
... print g
... print '---'
[1 1]
[0 1]
---
[-1 0]
[ 0 -1]
---
[ 1 -1]
[ 0 1]
---
[1 0]
[3 1]
---
[1 1]
[0 1]
---
[-1 0]
[ 3 -1]
---
[ 1 0]
[-3 1]
---
Return the index of self in SL2Z.
EXAMPLE:
sage: [G.index() for G in Gamma0(40).gamma_h_subgroups()]
[72, 144, 144, 144, 144, 288, 288, 288, 288, 144, 288, 288, 576, 576, 144, 288, 288, 576, 576, 144, 288, 288, 576, 576, 288, 576, 1152]
Return True precisely if this subgroup contains the matrix -1.
EXAMPLES:
sage: GammaH(10, [3]).is_even()
True
sage: GammaH(14, [1]).is_even()
False
Return True if self is a subgroup of right, and False otherwise.
EXAMPLES:
sage: GammaH(24,[7]).is_subgroup(SL2Z)
True
sage: GammaH(24,[7]).is_subgroup(Gamma0(8))
True
sage: GammaH(24, []).is_subgroup(GammaH(24, [7]))
True
sage: GammaH(24, []).is_subgroup(Gamma1(24))
True
sage: GammaH(24, [17]).is_subgroup(GammaH(24, [7]))
False
sage: GammaH(1371, [169]).is_subgroup(GammaH(457, [169]))
True
Return the number of orbits of cusps (regular or otherwise) for this subgroup.
EXAMPLE:
sage: GammaH(33,[2]).ncusps()
8
sage: GammaH(32079, [21676]).ncusps()
28800
AUTHORS:
Return the number of irregular cusps for this subgroup.
EXAMPLES:
sage: GammaH(3212, [2045, 2773]).nirregcusps()
720
Return the number of orbits of regular cusps for this subgroup. A cusp is regular if we may find a parabolic element generating the stabiliser of that cusp whose eigenvalues are both +1 rather than -1. If G contains -1, all cusps are regular.
EXAMPLES:
sage: GammaH(20, [17]).nregcusps()
4
sage: GammaH(20, [17]).nirregcusps()
2
sage: GammaH(3212, [2045, 2773]).nregcusps()
1440
sage: GammaH(3212, [2045, 2773]).nirregcusps()
720
AUTHOR:
Return the number of orbits of elliptic points of order 2 for this group.
EXAMPLE:
sage: [H.nu2() for n in [1..10] for H in Gamma0(n).gamma_h_subgroups()]
[1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0]
sage: GammaH(33,[2]).nu2()
0
sage: GammaH(5,[2]).nu2()
2
AUTHORS:
Return the number of orbits of elliptic points of order 3 for this group.
EXAMPLE:
sage: [H.nu3() for n in [1..10] for H in Gamma0(n).gamma_h_subgroups()]
[1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sage: GammaH(33,[2]).nu3()
0
sage: GammaH(7,[2]).nu3()
2
AUTHORS:
Compute a minimal representative for the given cusp c. Returns a cusp c’ which is equivalent to the given cusp, and is in lowest terms with minimal positive denominator, and minimal positive numerator for that denominator.
Two cusps and
are equivalent modulo
if and only if
or
for some .
EXAMPLES:
sage: GammaH(6,[5]).reduce_cusp(Cusp(5,3))
1/3
sage: GammaH(12,[5]).reduce_cusp(Cusp(8,9))
1/3
sage: GammaH(12,[5]).reduce_cusp(Cusp(5,12))
Infinity
sage: GammaH(12,[]).reduce_cusp(Cusp(5,12))
5/12
sage: GammaH(21,[5]).reduce_cusp(Cusp(-9/14))
1/7
Return the subgroup of obtained by taking
to
be the image of the
at level
modulo
.
EXAMPLES:
sage: G = GammaH(33,[2])
sage: G.restrict(11)
Congruence Subgroup Gamma_H(11) with H generated by [2]
sage: G.restrict(1)
Modular Group SL(2,Z)
sage: G.restrict(15)
...
ValueError: M (=15) must be a divisor of the level (33) of self
Return the congruence subgroup , which is the subgroup of
consisting of matrices of the form
with
and
, for
a specified
subgroup of
.
INPUT:
level – an integer
EXAMPLES:
sage: GammaH(11,0) # indirect doctest
Congruence Subgroup Gamma0(11)
sage: GammaH(11,1)
Congruence Subgroup Gamma1(11)
sage: GammaH(11,[2])
Congruence Subgroup Gamma_H(11) with H generated by [2]
sage: GammaH(11,[2,1])
Congruence Subgroup Gamma_H(11) with H generated by [2]
Return a list of coset representatives for H in (Z / NZ)^*.
EXAMPLE:
sage: from sage.modular.arithgroup.congroup_gammaH import _GammaH_coset_helper
sage: _GammaH_coset_helper(108, [1, 107])
[1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53]
Normalize representatives for a given subgroup H of the units modulo level.
NOTE: This function does not make any attempt to find a minimal set of generators for H. It simply normalizes the inputs for use in hashing.
EXAMPLES:
sage: sage.modular.arithgroup.congroup_gammaH._normalize_H([23], 10)
[3]
sage: sage.modular.arithgroup.congroup_gammaH._normalize_H([1,5], 7)
[5]
sage: sage.modular.arithgroup.congroup_gammaH._normalize_H([4,18], 14)
[4]
sage: sage.modular.arithgroup.congroup_gammaH._normalize_H([-1,7,9], 10)
[7, 9]
Return True if x is a congruence subgroup of type GammaH.
EXAMPLES:
sage: from sage.modular.arithgroup.all import is_GammaH
sage: is_GammaH(GammaH(13, [2]))
True
sage: is_GammaH(Gamma0(6))
True
sage: is_GammaH(sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(5))
False
Return 0 if any cube divides . Otherwise return
where
is the number of primes that
exactly divide
.
This is similar to the Moebius function.
INPUT:
OUTPUT: Integer
EXAMPLES:
sage: from sage.modular.arithgroup.congroup_gammaH import mumu
sage: mumu(27)
0
sage: mumu(6*25)
4
sage: mumu(7*9*25)
-2
sage: mumu(9*25)
1