Congruence arithmetic subgroups of \(\SL_2(\ZZ)\)¶
Sage can compute extensively with the standard congruence subgroups \(\Gamma_0(N)\), \(\Gamma_1(N)\), and \(\Gamma_H(N)\).
AUTHORS:
- William Stein 
- David Loeffler (2009, 10) – modifications to work with more general arithmetic subgroups 
- class sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(*args, **kwds)[source]¶
- Bases: - CongruenceSubgroupFromGroup- One of the “standard” congruence subgroups \(\Gamma_0(N)\), \(\Gamma_1(N)\), \(\Gamma(N)\), or \(\Gamma_H(N)\) (for some \(H\)). - This class is not intended to be instantiated directly. Derived subclasses must override - _contains_sl2,- _repr_, and- image_mod_n.- image_mod_n()[source]¶
- Raise an error: all derived subclasses should override this function. - EXAMPLES: - sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(5).image_mod_n() Traceback (most recent call last): ... NotImplementedError - >>> from sage.all import * >>> sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(Integer(5)).image_mod_n() Traceback (most recent call last): ... NotImplementedError 
 - modular_abelian_variety()[source]¶
- Return the modular abelian variety corresponding to the congruence subgroup - self.- EXAMPLES: - sage: Gamma0(11).modular_abelian_variety() Abelian variety J0(11) of dimension 1 sage: Gamma1(11).modular_abelian_variety() Abelian variety J1(11) of dimension 1 sage: GammaH(11,[3]).modular_abelian_variety() Abelian variety JH(11,[3]) of dimension 1 - >>> from sage.all import * >>> Gamma0(Integer(11)).modular_abelian_variety() Abelian variety J0(11) of dimension 1 >>> Gamma1(Integer(11)).modular_abelian_variety() Abelian variety J1(11) of dimension 1 >>> GammaH(Integer(11),[Integer(3)]).modular_abelian_variety() Abelian variety JH(11,[3]) of dimension 1 
 - modular_symbols(sign=0, weight=2, base_ring=Rational Field)[source]¶
- Return the space of modular symbols of the specified weight and sign on the congruence subgroup - self.- EXAMPLES: - sage: G = Gamma0(23) sage: G.modular_symbols() Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field sage: G.modular_symbols(weight=4) Modular Symbols space of dimension 12 for Gamma_0(23) of weight 4 with sign 0 over Rational Field sage: G.modular_symbols(base_ring=GF(7)) Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Finite Field of size 7 sage: G.modular_symbols(sign=1) Modular Symbols space of dimension 3 for Gamma_0(23) of weight 2 with sign 1 over Rational Field - >>> from sage.all import * >>> G = Gamma0(Integer(23)) >>> G.modular_symbols() Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Rational Field >>> G.modular_symbols(weight=Integer(4)) Modular Symbols space of dimension 12 for Gamma_0(23) of weight 4 with sign 0 over Rational Field >>> G.modular_symbols(base_ring=GF(Integer(7))) Modular Symbols space of dimension 5 for Gamma_0(23) of weight 2 with sign 0 over Finite Field of size 7 >>> G.modular_symbols(sign=Integer(1)) Modular Symbols space of dimension 3 for Gamma_0(23) of weight 2 with sign 1 over Rational Field 
 
- class sage.modular.arithgroup.congroup_generic.CongruenceSubgroupBase(level)[source]¶
- Bases: - ArithmeticSubgroup- Create a congruence subgroup with given level. - EXAMPLES: - sage: Gamma0(500) Congruence Subgroup Gamma0(500) - >>> from sage.all import * >>> Gamma0(Integer(500)) Congruence Subgroup Gamma0(500) - is_congruence()[source]¶
- Return - True, since this is a congruence subgroup.- EXAMPLES: - sage: Gamma0(7).is_congruence() True - >>> from sage.all import * >>> Gamma0(Integer(7)).is_congruence() True 
 - level()[source]¶
- Return the level of this congruence subgroup. - EXAMPLES: - sage: SL2Z.level() 1 sage: Gamma0(20).level() 20 sage: Gamma1(11).level() 11 sage: GammaH(14, [5]).level() 14 - >>> from sage.all import * >>> SL2Z.level() 1 >>> Gamma0(Integer(20)).level() 20 >>> Gamma1(Integer(11)).level() 11 >>> GammaH(Integer(14), [Integer(5)]).level() 14 
 
- class sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(G)[source]¶
- Bases: - CongruenceSubgroupBase- A congruence subgroup, defined by the data of an integer \(N\) and a subgroup \(G\) of the finite group \(SL(2, \ZZ / N\ZZ)\); the congruence subgroup consists of all the matrices in \(SL(2, \ZZ)\) whose reduction modulo \(N\) lies in \(G\). - This class should not be instantiated directly, but created using the factory function - CongruenceSubgroup_constructor(), which accepts much more flexible input, and checks the input to make sure it is valid.- image_mod_n()[source]¶
- Return the subgroup of \(SL(2, \ZZ / N\ZZ)\) of which this is the preimage, where \(N\) is the level of - self.- EXAMPLES: - sage: G = MatrixGroup([matrix(Zmod(2), 2, [1,1,1,0])]) sage: H = sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(G); H.image_mod_n() Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [1 0] ) sage: H.image_mod_n() == G True - >>> from sage.all import * >>> G = MatrixGroup([matrix(Zmod(Integer(2)), Integer(2), [Integer(1),Integer(1),Integer(1),Integer(0)])]) >>> H = sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(G); H.image_mod_n() Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [1 0] ) >>> H.image_mod_n() == G True 
 - index()[source]¶
- Return the index of - selfin the full modular group. This is equal to the index in \(SL(2, \ZZ / N\ZZ)\) of the image of this group modulo \(\Gamma(N)\).- EXAMPLES: - sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(MatrixGroup([matrix(Zmod(2), 2, [1,1,1,0])])).index() 2 - >>> from sage.all import * >>> sage.modular.arithgroup.congroup_generic.CongruenceSubgroupFromGroup(MatrixGroup([matrix(Zmod(Integer(2)), Integer(2), [Integer(1),Integer(1),Integer(1),Integer(0)])])).index() 2 
 - to_even_subgroup()[source]¶
- Return the smallest even subgroup of \(SL(2, \ZZ)\) containing - self.- EXAMPLES: - sage: G = Gamma(3) sage: G.to_even_subgroup() Congruence subgroup of SL(2,Z) of level 3, preimage of: Matrix group over Ring of integers modulo 3 with 1 generators ( [2 0] [0 2] ) - >>> from sage.all import * >>> G = Gamma(Integer(3)) >>> G.to_even_subgroup() Congruence subgroup of SL(2,Z) of level 3, preimage of: Matrix group over Ring of integers modulo 3 with 1 generators ( [2 0] [0 2] ) 
 
- sage.modular.arithgroup.congroup_generic.CongruenceSubgroup_constructor(*args)[source]¶
- Attempt to create a congruence subgroup from the given data. - The allowed inputs are as follows: - A - MatrixGroupobject. This must be a group of matrices over \(\ZZ / N\ZZ\) for some \(N\), with determinant 1, in which case the function will return the group of matrices in \(SL(2, \ZZ)\) whose reduction mod \(N\) is in the given group.
- A list of matrices over \(\ZZ / N\ZZ\) for some \(N\). The function will then compute the subgroup of \(SL(2, \ZZ)\) generated by these matrices, and proceed as above. 
- An integer \(N\) and a list of matrices (over any ring coercible to \(\ZZ / N\ZZ\), e.g. over \(\ZZ\)). The matrices will then be coerced to \(\ZZ / N\ZZ\). 
 - The function checks that the input G is valid. It then tests to see if \(G\) is the preimage mod \(N\) of some group of matrices modulo a proper divisor \(M\) of \(N\), in which case it replaces \(G\) with this group before continuing. - EXAMPLES: - sage: from sage.modular.arithgroup.congroup_generic import CongruenceSubgroup_constructor as CS sage: CS(2, [[1,1,0,1]]) Congruence subgroup of SL(2,Z) of level 2, preimage of: Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [0 1] ) sage: CS([matrix(Zmod(2), 2, [1,1,0,1])]) Congruence subgroup of SL(2,Z) of level 2, preimage of: Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [0 1] ) sage: CS(MatrixGroup([matrix(Zmod(2), 2, [1,1,0,1])])) Congruence subgroup of SL(2,Z) of level 2, preimage of: Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [0 1] ) sage: CS(SL(2, 2)) Modular Group SL(2,Z) - >>> from sage.all import * >>> from sage.modular.arithgroup.congroup_generic import CongruenceSubgroup_constructor as CS >>> CS(Integer(2), [[Integer(1),Integer(1),Integer(0),Integer(1)]]) Congruence subgroup of SL(2,Z) of level 2, preimage of: Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [0 1] ) >>> CS([matrix(Zmod(Integer(2)), Integer(2), [Integer(1),Integer(1),Integer(0),Integer(1)])]) Congruence subgroup of SL(2,Z) of level 2, preimage of: Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [0 1] ) >>> CS(MatrixGroup([matrix(Zmod(Integer(2)), Integer(2), [Integer(1),Integer(1),Integer(0),Integer(1)])])) Congruence subgroup of SL(2,Z) of level 2, preimage of: Matrix group over Ring of integers modulo 2 with 1 generators ( [1 1] [0 1] ) >>> CS(SL(Integer(2), Integer(2))) Modular Group SL(2,Z) - Some invalid inputs: - sage: CS(SU(2, 7)) Traceback (most recent call last): ... TypeError: Ring of definition must be Z / NZ for some N - >>> from sage.all import * >>> CS(SU(Integer(2), Integer(7))) Traceback (most recent call last): ... TypeError: Ring of definition must be Z / NZ for some N 
- sage.modular.arithgroup.congroup_generic.is_CongruenceSubgroup(x)[source]¶
- Return - Trueif x is of type CongruenceSubgroup.- Note that this may be False even if \(x\) really is a congruence subgroup – it tests whether \(x\) is “obviously” congruence, i.e.~whether it has a congruence subgroup datatype. To test whether or not an arithmetic subgroup of \(SL(2, \ZZ)\) is congruence, use the - is_congruence()method instead.- EXAMPLES: - sage: from sage.modular.arithgroup.congroup_generic import is_CongruenceSubgroup sage: is_CongruenceSubgroup(SL2Z) doctest:warning... DeprecationWarning: The function is_CongruenceSubgroup is deprecated; use 'isinstance(..., CongruenceSubgroupBase)' instead. See https://github.com/sagemath/sage/issues/38035 for details. True sage: is_CongruenceSubgroup(Gamma0(13)) True sage: is_CongruenceSubgroup(Gamma1(6)) True sage: is_CongruenceSubgroup(GammaH(11, [3])) True sage: G = ArithmeticSubgroup_Permutation(L = "(1, 2)", R = "(1, 2)"); is_CongruenceSubgroup(G) False sage: G.is_congruence() True sage: is_CongruenceSubgroup(SymmetricGroup(3)) False - >>> from sage.all import * >>> from sage.modular.arithgroup.congroup_generic import is_CongruenceSubgroup >>> is_CongruenceSubgroup(SL2Z) doctest:warning... DeprecationWarning: The function is_CongruenceSubgroup is deprecated; use 'isinstance(..., CongruenceSubgroupBase)' instead. See https://github.com/sagemath/sage/issues/38035 for details. True >>> is_CongruenceSubgroup(Gamma0(Integer(13))) True >>> is_CongruenceSubgroup(Gamma1(Integer(6))) True >>> is_CongruenceSubgroup(GammaH(Integer(11), [Integer(3)])) True >>> G = ArithmeticSubgroup_Permutation(L = "(1, 2)", R = "(1, 2)"); is_CongruenceSubgroup(G) False >>> G.is_congruence() True >>> is_CongruenceSubgroup(SymmetricGroup(Integer(3))) False