The set \mathbb{P}^1(\QQ) of cusps

EXAMPLES:

sage: Cusps
Set P^1(QQ) of all cusps
sage: Cusp(oo)
Infinity
class sage.modular.cusps.Cusp(a, b=None, parent=None, check=True)

A cusp.

A cusp is either a rational number or infinity, i.e., an element of the projective line over Q. A Cusp is stored as a pair (a,b), where gcd(a,b)=1 and a,b are of type Integer.

EXAMPLES:

sage: a = Cusp(2/3); b = Cusp(oo)
sage: a.parent()
Set P^1(QQ) of all cusps
sage: a.parent() is b.parent()
True
__cmp__(right)

Compare the cusps self and right. Comparison is as for rational numbers, except with the cusp oo greater than everything but itself.

The ordering in comparison is only really meaningful for infinity or elements that coerce to the rationals.

EXAMPLES:

sage: Cusp(2/3) == Cusp(oo)
False
sage: Cusp(2/3) < Cusp(oo)
True
sage: Cusp(2/3)> Cusp(oo)
False
sage: Cusp(2/3) > Cusp(5/2)
False
sage: Cusp(2/3) < Cusp(5/2)
True
sage: Cusp(2/3) == Cusp(5/2)
False
sage: Cusp(oo) == Cusp(oo)
True
sage: 19/3 < Cusp(oo)
True
sage: Cusp(oo) < 19/3
False
sage: Cusp(2/3) < Cusp(11/7)
True
sage: Cusp(11/7) < Cusp(2/3)
False
sage: 2 < Cusp(3)
True
__hash__()
EXAMPLES:
sage: hash(Cusp(1/3)) 1298787075 # 32-bit 3713081631933328131 # 64-bit sage: hash(Cusp(oo)) 1302034650 # 32-bit 3713081631936575706 # 64-bit
__init__(a, b=None, parent=None, check=True)

Create the cusp a/b in \mathbb{P}^1(\QQ), where if b=0 this is the cusp at infinity.

When present, b must either be Infinity or coercible to an Integer.

EXAMPLES:

sage: Cusp(2,3)
2/3
sage: Cusp(3,6)
1/2
sage: Cusp(1,0)
Infinity
sage: Cusp(infinity)
Infinity
sage: Cusp(5)
5
sage: Cusp(1/2)
1/2
sage: Cusp(1.5)
3/2
sage: Cusp(int(7))
7
sage: Cusp(1, 2, check=False)
1/2
sage: Cusp('sage', 2.5, check=False)          # don't do this!
sage/2.50000000000000
sage: I**2
-1
sage: Cusp(I)
...
TypeError: Unable to convert I to a Cusp
sage: a = Cusp(2,3)
sage: loads(a.dumps()) == a
True
sage: Cusp(1/3,0)
Infinity
sage: Cusp((1,0))
Infinity

TESTS:

sage: Cusp("1/3", 5)
1/15
sage: Cusp(Cusp(3/5), 7)
3/35
sage: Cusp(5/3, 0)
Infinity
sage: Cusp(3,oo)
0
sage: Cusp((7,3), 5)
7/15
sage: Cusp(int(5), 7)
5/7
sage: Cusp(0,0)
...
TypeError: Unable to convert (0, 0) to a Cusp
sage: Cusp(oo,oo)
...
TypeError: Unable to convert (+Infinity, +Infinity) to a Cusp
sage: Cusp(Cusp(oo),oo)
...
TypeError: Unable to convert (Infinity, +Infinity) to a Cusp
__neg__()

The negative of this cusp.

EXAMPLES:

sage: -Cusp(2/7)
-2/7
sage: -Cusp(oo)
Infinity
__weakref__
list of weak references to the object (if defined)
_integer_(ZZ=None)

Coerce to an integer.

EXAMPLES:

sage: ZZ(Cusp(-19))
-19
sage: Cusp(4,2)._integer_()
2
sage: ZZ(Cusp(oo))
...
TypeError: cusp Infinity is not an integer
sage: ZZ(Cusp(-3,7))
...
TypeError: cusp -3/7 is not an integer
_latex_()

Latex representation of this cusp.

EXAMPLES:

sage: latex(Cusp(-2/7))
\frac{-2}{7}
sage: latex(Cusp(oo))
\infty
sage: latex(Cusp(oo)) == Cusp(oo)._latex_()
True
_rational_()

Coerce to a rational number.

EXAMPLES:

sage: QQ(Cusp(oo))
...
TypeError: cusp Infinity is not a rational number
sage: QQ(Cusp(-3,7))
-3/7
sage: Cusp(11,2)._rational_()
11/2
_repr_()

String representation of this cusp.

EXAMPLES:

sage: a = Cusp(2/3); a
2/3
sage: a._repr_()
'2/3'
sage: a.rename('2/3(cusp)'); a
2/3(cusp)
apply(g)

Return g(self), where g=[a,b,c,d] is a list of length 4, which we view as a linear fractional transformation.

EXAMPLES: Apply the identity matrix:

sage: Cusp(0).apply([1,0,0,1])
0
sage: Cusp(0).apply([0,-1,1,0])
Infinity
sage: Cusp(0).apply([1,-3,0,1])
-3
denominator()

Return the denominator of the cusp a/b.

EXAMPLES:

sage: x=Cusp(6,9); x
2/3
sage: x.denominator()
3
sage: Cusp(oo).denominator()
0
sage: Cusp(-5/10).denominator()
2
galois_action(t, N)

Suppose this cusp is \alpha, G is a congruence subgroup of level N, and \sigma is the automorphism in the Galois group of \QQ(\zeta_N)/\QQ that sends \zeta_N to \zeta_N^t. Then this function computes a cusp \beta such that \sigma([\alpha]) = [\beta], where [\alpha] is the equivalence class of \alpha modulo G.

INPUT:

  • t – integer that is coprime to N
  • N – positive integer (level)

OUTPUT:

  • a cusp

EXAMPLES:

sage: Cusp(1/10).galois_action(3, 50)
1/170
sage: Cusp(oo).galois_action(3, 50)
Infinity
sage: Cusp(0).galois_action(3, 50)
0

Here we compute explicitly the permutations of the action for t=3 on cusps for Gamma0(50):

sage: N = 50; t=3; G = Gamma0(N); C = G.cusps()
sage: cl = lambda z: exists(C, lambda y:y.is_gamma0_equiv(z, N))[1]
sage: for i in range(5): print i, t^i, [cl(alpha.galois_action(t^i,N)) for alpha in C]
0 1 [0, 1/25, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10, Infinity]
1 3 [0, 1/25, 7/10, 2/5, 1/10, 4/5, 1/2, 1/5, 9/10, 3/5, 3/10, Infinity]
2 9 [0, 1/25, 9/10, 4/5, 7/10, 3/5, 1/2, 2/5, 3/10, 1/5, 1/10, Infinity]
3 27 [0, 1/25, 3/10, 3/5, 9/10, 1/5, 1/2, 4/5, 1/10, 2/5, 7/10, Infinity]
4 81 [0, 1/25, 1/10, 1/5, 3/10, 2/5, 1/2, 3/5, 7/10, 4/5, 9/10, Infinity]

REFERENCES:

  • Section 1.3 of Glenn Stevens, “Arithmetic on Modular Curves”
  • There is a long comment about our algorithm in the source code for this function.
WARNING: In some cases N must fit in a long long, i.e., there
are cases where this algorithm isn’t fully implemented.

AUTHORS:

  • William Stein, 2009-04-18
is_gamma0_equiv(other, N, transformation=False)

Return whether self and other are equivalent modulo the action of \Gamma_0(N) via linear fractional transformations.

INPUT:

  • other - Cusp
  • N - an integer (specifies the group Gamma_0(N))
  • transformation - bool (default: False), if True, also return upper left entry of a matrix in Gamma_0(N) that sends self to other.

OUTPUT:

  • bool - True if self and other are equivalent
  • integer - returned only if transformation is True

EXAMPLES:

sage: x = Cusp(2,3)
sage: y = Cusp(4,5)
sage: x.is_gamma0_equiv(y, 2)
True
sage: x.is_gamma0_equiv(y, 2, True)
(True, 1)
sage: x.is_gamma0_equiv(y, 3)
False
sage: x.is_gamma0_equiv(y, 3, True)
(False, None)
sage: Cusp(1,0)
Infinity
sage: z = Cusp(1,0)
sage: x.is_gamma0_equiv(z, 3, True)
(True, 2)

ALGORITHM: See Proposition 2.2.3 of Cremona’s book “Algorithms for Modular Elliptic Curves”, or Prop 2.27 of Stein’s Ph.D. thesis.

is_gamma1_equiv(other, N)

Return whether self and other are equivalent modulo the action of Gamma_1(N) via linear fractional transformations.

INPUT:

  • other - Cusp
  • N - an integer (specifies the group Gamma_1(N))

OUTPUT:

  • bool - True if self and other are equivalent
  • int - 0, 1 or -1, gives further information about the equivalence: If the two cusps are u1/v1 and u2/v2, then they are equivalent if and only if v1 = v2 (mod N) and u1 = u2 (mod gcd(v1,N)) or v1 = -v2 (mod N) and u1 = -u2 (mod gcd(v1,N)) The sign is +1 for the first and -1 for the second. If the two cusps are not equivalent then 0 is returned.

EXAMPLES:

sage: x = Cusp(2,3)
sage: y = Cusp(4,5)
sage: x.is_gamma1_equiv(y,2)
(True, 1)
sage: x.is_gamma1_equiv(y,3)
(False, 0)
sage: z = Cusp(QQ(x) + 10)
sage: x.is_gamma1_equiv(z,10)
(True, 1)
sage: z = Cusp(1,0)
sage: x.is_gamma1_equiv(z, 3)
(True, -1)
sage: Cusp(0).is_gamma1_equiv(oo, 1)
(True, 1)
sage: Cusp(0).is_gamma1_equiv(oo, 3)
(False, 0)
is_gamma_h_equiv(other, G)

Return a pair (b, t), where b is True or False as self and other are equivalent under the action of G, and t is 1 or -1, as described below.

Two cusps u1/v1 and u2/v2 are equivalent modulo Gamma_H(N) if and only if v1 =  h*v2 (\mathrm{mod} N) and u1 =  h^{(-1)}*u2 (\mathrm{mod} gcd(v1,N)) or v1 = -h*v2 (mod N) and u1 = -h^{(-1)}*u2 (\mathrm{mod} gcd(v1,N)) for some h \in H. Then t is 1 or -1 as c and c’ fall into the first or second case, respectively.

INPUT:

  • other - Cusp
  • G - a congruence subgroup Gamma_H(N)

OUTPUT:

  • bool - True if self and other are equivalent
  • int - -1, 0, 1; extra info

EXAMPLES:

sage: x = Cusp(2,3)
sage: y = Cusp(4,5)
sage: x.is_gamma_h_equiv(y,GammaH(13,[2]))
(True, 1)
sage: x.is_gamma_h_equiv(y,GammaH(13,[5]))
(False, 0)
sage: x.is_gamma_h_equiv(y,GammaH(5,[]))
(False, 0)
sage: x.is_gamma_h_equiv(y,GammaH(23,[4]))
(True, -1)

Enumerating the cusps for a space of modular symbols uses this function.

sage: G = GammaH(25,[6]) ; M = G.modular_symbols() ; M
Modular Symbols space of dimension 11 for Congruence Subgroup Gamma_H(25) with H generated by [6] of weight 2 with sign 0 and over Rational Field
sage: M.cusps()
[37/75, 1/2, 31/125, 1/4, -2/5, 2/5, -1/5, 1/10, -3/10, 1/15, 7/15, 9/20]
sage: len(M.cusps())
12

This is always one more than the associated space of weight 2 Eisenstein series.

sage: G.dimension_eis(2)
11
sage: M.cuspidal_subspace()
Modular Symbols subspace of dimension 0 of Modular Symbols space of dimension 11 for Congruence Subgroup Gamma_H(25) with H generated by [6] of weight 2 with sign 0 and over Rational Field
sage: G.dimension_cusp_forms(2)
0
is_infinity()

Returns True if this is the cusp infinity.

EXAMPLES:

sage: Cusp(3/5).is_infinity()
False
sage: Cusp(1,0).is_infinity()
True
sage: Cusp(0,1).is_infinity()
False
numerator()

Return the numerator of the cusp a/b.

EXAMPLES:

sage: x=Cusp(6,9); x
2/3
sage: x.numerator()
2
sage: Cusp(oo).numerator()
1
sage: Cusp(-5/10).numerator()
-1
class sage.modular.cusps.Cusps_class

The set of cusps.

EXAMPLES:

sage: C = Cusps; C
Set P^1(QQ) of all cusps
sage: loads(C.dumps()) == C
True
__call__(x)

Coerce x into the set of cusps.

EXAMPLES:

sage: a = Cusps(-4/5); a
-4/5
sage: Cusps(a) is a
False
sage: Cusps(1.5)
3/2
sage: Cusps(oo)
Infinity
sage: Cusps(I)
...
TypeError: Unable to convert I to a Cusp
__cmp__(right)

Return equality only if right is the set of cusps.

EXAMPLES:

sage: Cusps == Cusps
True
sage: Cusps == QQ
False
__init__()

The set of cusps, i.e. \mathbb{P}^1(\QQ).

EXAMPLES:

sage: C = sage.modular.cusps.Cusps_class() ; C
Set P^1(QQ) of all cusps
sage: Cusps == C
True
_coerce_impl(x)

Canonical coercion of x into the set of cusps.

EXAMPLES:

sage: Cusps._coerce_(7/13)
7/13
sage: Cusps._coerce_(GF(7)(3))
...
TypeError: no canonical coercion of element into self
sage: Cusps(GF(7)(3))
3
sage: Cusps._coerce_impl(GF(7)(3))
...
TypeError: no canonical coercion of element into self
_latex_()

Return latex representation of self.

EXAMPLES:

sage: latex(Cusps)
\mathbf{P}^1(\QQ)
sage: latex(Cusps) == Cusps._latex_()
True
_repr_()

String representation of the set of cusps.

EXAMPLES:

sage: Cusps
Set P^1(QQ) of all cusps
sage: Cusps._repr_()
'Set P^1(QQ) of all cusps'
sage: Cusps.rename('CUSPS'); Cusps
CUSPS
sage: Cusps.rename(); Cusps
Set P^1(QQ) of all cusps
sage: Cusps
Set P^1(QQ) of all cusps

Previous topic

Dirichlet characters

Next topic

Dimensions of spaces of modular forms

This Page