A single element of an ambient space of modular symbols.

class sage.modular.modsym.element.ModularSymbolsElement(parent, x, check=True)

An element of a space of modular symbols.

TESTS:

sage: x = ModularSymbols(3, 12).cuspidal_submodule().gen(0)
sage: x == loads(dumps(x))
True
__cmp__(other)

Standard comparison function.

EXAMPLE:

sage: M = ModularSymbols(11, 2)
sage: M.0 == M.1 # indirect doctest
False
sage: M.0 == (M.1 + M.0 - M.1)
True
sage: M.0 == ModularSymbols(13, 2).0
False
sage: M.0 == 4
False
__init__(parent, x, check=True)

INPUT:

  • parent - a space of modular symbols
  • x - a free module element that represents the modular symbol in terms of a basis for the ambient space (not in terms of a basis for parent!)

EXAMPLE:

sage: S = ModularSymbols(11, sign=1).cuspidal_submodule()
sage: S(vector([0,1]))
(1,9)
sage: S(vector([1,0]))
...
TypeError: x does not coerce to an element of this Hecke module
_add_(right)

Sum of self and other.

EXAMPLE:

sage: M = ModularSymbols(3, 12)
sage: x = M.0; y = M.1; z = x + y; z # indirect doctest
[X^8*Y^2,(1,2)] + [X^9*Y,(1,0)]
sage: z.parent() is M
True
_latex_()

LaTeX representation of self. The output will be determined by the print mode setting set using set_modsym_print_mode.

EXAMPLE:

sage: M = ModularSymbols(11, 2)
sage: x = M.0 + M.2; x
(1,0) + (1,9)
sage: set_modsym_print_mode('manin'); latex(x) # indirect doctest
(1,0) + (1,9)
sage: set_modsym_print_mode('modular'); latex(x) # indirect doctest
\left\{\frac{-1}{9}, 0\right\} + \left\{\infty, 0\right\}
sage: set_modsym_print_mode('vector'); latex(x) # indirect doctest
\left(1,0,1\right)
sage: set_modsym_print_mode()
_lmul_(left)

Left-multiply self by other.

EXAMPLE:

sage: M = ModularSymbols(3, 12)
sage: x = M.0; z = 3*x; z # indirect doctest
3*[X^8*Y^2,(1,2)]
sage: z.parent() is M
True
sage: Mod(1, 17)*z
...
TypeError: unsupported operand parent(s) for '*': 'Ring of integers modulo 17' and 'Modular Symbols space of dimension 8 for Gamma_0(3) of weight 12 with sign 0 over Rational Field'
_neg_()

Multiply by -1.

EXAMPLE:

sage: M = ModularSymbols(3, 12)
sage: x = M.0; z = -x; z # indirect doctest
-[X^8*Y^2,(1,2)]
sage: z.parent() is M
True
_repr_()

String representation of self. The output will depend on the global modular symbols print mode setting controlled by the function set_modsym_print_mode.

EXAMPLE:

sage: M = ModularSymbols(13, 4)
sage: set_modsym_print_mode('manin'); M.0._repr_()
'[X^2,(0,1)]'
sage: set_modsym_print_mode('modular'); M.0._repr_()
'X^2*{0, Infinity}'
sage: set_modsym_print_mode('vector'); M.0._repr_()
'(1, 0, 0, 0, 0, 0, 0, 0)'
sage: set_modsym_print_mode()
_rmul_(other)

Right-multiply self by other.

EXAMPLE:

sage: M = ModularSymbols(3, 12)
sage: x = M.0; z = x*3; z # indirect doctest
3*[X^8*Y^2,(1,2)]
sage: z.parent() is M
True
sage: z*Mod(1, 17)
...
TypeError: unsupported operand parent(s) for '*': 'Modular Symbols space of dimension 8 for Gamma_0(3) of weight 12 with sign 0 over Rational Field' and 'Ring of integers modulo 17'
_sub_(other)

Subtract other from self.

EXAMPLE:

sage: M = ModularSymbols(3, 12)
sage: x = M.0; y = M.1; z = y-x; z # indirect doctest
-[X^8*Y^2,(1,2)] + [X^9*Y,(1,0)]
sage: z.parent() is M
True
list()

Return a list of the coordinates of self in terms of a basis for the ambient space.

EXAMPLE:

sage: ModularSymbols(37, 2).0.list()
[1, 0, 0, 0, 0]
manin_symbol_rep()

Returns a representation of self as a formal sum of Manin symbols.

(The result is cached for future use.)

EXAMPLE:

sage: ModularSymbols(37, 4).0.manin_symbol_rep()
[X^2,(0,1)]
modular_symbol_rep()

Returns a representation of self as a formal sum of modular symbols.

(The result is cached for future use.)

EXAMPLE:

sage: ModularSymbols(37, 4).0.modular_symbol_rep()
X^2*{0, Infinity}
sage.modular.modsym.element.is_ModularSymbolsElement(x)

Return True if x is an element of a modular symbols space.

EXAMPLES:

sage: sage.modular.modsym.element.is_ModularSymbolsElement(ModularSymbols(11, 2).0)
True
sage: sage.modular.modsym.element.is_ModularSymbolsElement(13)
False
sage.modular.modsym.element.set_modsym_print_mode(mode='manin')

Set the mode for printing of elements of modular symbols spaces.

INPUT:

  • mode - a string. The possibilities are as follows:
  • 'manin' - (the default) formal sums of Manin symbols [P(X,Y),(u,v)]
  • 'modular' - formal sums of Modular symbols P(X,Y)*alpha,beta, where alpha and beta are cusps
  • 'vector' - as vectors on the basis for the ambient space

OUTPUT: none

EXAMPLE:

sage: M = ModularSymbols(13, 8)
sage: x = M.0 + M.1 + M.14
sage: set_modsym_print_mode('manin'); x
[X^5*Y,(1,11)] + [X^5*Y,(1,12)] + [X^6,(1,11)]
sage: set_modsym_print_mode('modular'); x
1610510*X^6*{-1/11, 0} - 248832*X^6*{-1/12, 0} + 893101*X^5*Y*{-1/11, 0} - 103680*X^5*Y*{-1/12, 0} + 206305*X^4*Y^2*{-1/11, 0} - 17280*X^4*Y^2*{-1/12, 0} + 25410*X^3*Y^3*{-1/11, 0} - 1440*X^3*Y^3*{-1/12, 0} + 1760*X^2*Y^4*{-1/11, 0} - 60*X^2*Y^4*{-1/12, 0} + 65*X*Y^5*{-1/11, 0} - X*Y^5*{-1/12, 0} + Y^6*{-1/11, 0}
sage: set_modsym_print_mode('vector'); x
(1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0)
sage: set_modsym_print_mode()

Previous topic

Subspace of ambient spaces of modular symbols

Next topic

Modular symbols {alpha, beta}

This Page