7.3.1.1 Cusp Objects

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( a, [b=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(1.5)
Traceback (most recent call last):
...
TypeError: Unable to coerce 1.5,1 to a Cusp

Instances of class Cusp have the following methods (in addition to inherited methods and special methods):

denominator,$  $ is_gamma0_equiv,$  $ numerator

These methods are defined as follows:

denominator( )

Return the denominator of the cusp a/b.

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

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

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".

numerator( )

Return the numerator of the cusp a/b.

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

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