28.3 The set $ \mathbf{P}^1(\mathbf{Q})$ of cusps

Module: sage.modular.cusps

sage: Cusps()
The set P^1(Q) of cusps.

sage: Cusp(oo)
Infinity

Class: Cusp

class Cusp
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.

Cusp( self, a, [b=False], [construct=1])

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

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(QQ("1/2"))             # rational number
1/2
sage: Cusp('2/3')             # rational number
2/3
sage: Cusp(1.5)
Traceback (most recent call last):
...
TypeError: Unable to coerce 1.5000000000000000,1 to a Cusp

sage: a = Cusp(2,3)
sage: loads(a.dumps()) == a
True

Functions: apply,$  $ denominator,$  $ is_gamma0_equiv,$  $ is_gamma1_equiv,$  $ is_infinity,$  $ numerator,$  $ parent

apply( self, g)

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

denominator( self)

Return the denominator of the cusp a/b.

sage: x=Cusp(6,9); x
2/3
sage: x.denominator()
3

is_gamma0_equiv( self, 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

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( self, 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.

is_infinity( self)

Returns True if this is the cusp infinity.

numerator( self)

Return the numerator of the cusp a/b.

sage: x=Cusp(6,9); x
2/3
sage: x.numerator()
2

parent( self)

Return the set of all cusps.

Special Functions: __cmp__,$  $ __neg__,$  $ __repr__,$  $ _integer_,$  $ _latex_,$  $ _rational_

Class: Cusps

class Cusps
The set of cusps.

sage: C = Cusps(); C
The set P^1(Q) of cusps.
sage: loads(C.dumps()) == C
True
Cusps( self)

Special Functions: __call__,$  $ __cmp__,$  $ __repr__

See About this document... for information on suggesting changes.