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('2/3')             # rational number
2/3
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 functions (in addition to inherited functions and special functions):

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

Further documentation:

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.

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

is_infinity( )

Returns True if this is the cusp infinity.

numerator( )

Return the numerator of the cusp a/b.

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

parent( )

Return the set of all cusps.

Instances of class Cusp also have the following special functions:

__neg__

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