A single element of an ambient space of modular symbols¶
- class sage.modular.modsym.element.ModularSymbolsElement(parent, x, check=True)[source]¶
Bases:
HeckeModuleElement
An element of a space of modular symbols.
- list()[source]¶
Return a list of the coordinates of
self
in terms of a basis for the ambient space.EXAMPLES:
sage: ModularSymbols(37, 2).0.list() [1, 0, 0, 0, 0]
>>> from sage.all import * >>> ModularSymbols(Integer(37), Integer(2)).gen(0).list() [1, 0, 0, 0, 0]
ModularSymbols(37, 2).0.list()
- manin_symbol_rep()[source]¶
Return a representation of
self
as a formal sum of Manin symbols.EXAMPLES:
sage: x = ModularSymbols(37, 4).0 sage: x.manin_symbol_rep() [X^2,(0,1)]
>>> from sage.all import * >>> x = ModularSymbols(Integer(37), Integer(4)).gen(0) >>> x.manin_symbol_rep() [X^2,(0,1)]
x = ModularSymbols(37, 4).0 x.manin_symbol_rep()
The result is cached:
sage: x.manin_symbol_rep() is x.manin_symbol_rep() True
>>> from sage.all import * >>> x.manin_symbol_rep() is x.manin_symbol_rep() True
x.manin_symbol_rep() is x.manin_symbol_rep()
- modular_symbol_rep()[source]¶
Return a representation of
self
as a formal sum of modular symbols.EXAMPLES:
sage: x = ModularSymbols(37, 4).0 sage: x.modular_symbol_rep() X^2*{0, Infinity}
>>> from sage.all import * >>> x = ModularSymbols(Integer(37), Integer(4)).gen(0) >>> x.modular_symbol_rep() X^2*{0, Infinity}
x = ModularSymbols(37, 4).0 x.modular_symbol_rep()
The result is cached:
sage: x.modular_symbol_rep() is x.modular_symbol_rep() True
>>> from sage.all import * >>> x.modular_symbol_rep() is x.modular_symbol_rep() True
x.modular_symbol_rep() is x.modular_symbol_rep()
- sage.modular.modsym.element.is_ModularSymbolsElement(x)[source]¶
Return
True
if x is an element of a modular symbols space.EXAMPLES:
sage: sage.modular.modsym.element.is_ModularSymbolsElement(ModularSymbols(11, 2).0) doctest:warning... DeprecationWarning: The function is_ModularSymbolsElement is deprecated; use 'isinstance(..., ModularSymbolsElement)' instead. See https://github.com/sagemath/sage/issues/38184 for details. True sage: sage.modular.modsym.element.is_ModularSymbolsElement(13) False
>>> from sage.all import * >>> sage.modular.modsym.element.is_ModularSymbolsElement(ModularSymbols(Integer(11), Integer(2)).gen(0)) doctest:warning... DeprecationWarning: The function is_ModularSymbolsElement is deprecated; use 'isinstance(..., ModularSymbolsElement)' instead. See https://github.com/sagemath/sage/issues/38184 for details. True >>> sage.modular.modsym.element.is_ModularSymbolsElement(Integer(13)) False
sage.modular.modsym.element.is_ModularSymbolsElement(ModularSymbols(11, 2).0) sage.modular.modsym.element.is_ModularSymbolsElement(13)
- sage.modular.modsym.element.set_modsym_print_mode(mode='manin')[source]¶
Set the mode for printing of elements of modular symbols spaces.
INPUT:
mode
– 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
EXAMPLES:
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} + 893101*X^5*Y*{-1/11, 0} + 206305*X^4*Y^2*{-1/11, 0} + 25410*X^3*Y^3*{-1/11, 0} + 1760*X^2*Y^4*{-1/11, 0} + 65*X*Y^5*{-1/11, 0} - 248832*X^6*{-1/12, 0} - 103680*X^5*Y*{-1/12, 0} - 17280*X^4*Y^2*{-1/12, 0} - 1440*X^3*Y^3*{-1/12, 0} - 60*X^2*Y^4*{-1/12, 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()
>>> from sage.all import * >>> M = ModularSymbols(Integer(13), Integer(8)) >>> x = M.gen(0) + M.gen(1) + M.gen(14) >>> set_modsym_print_mode('manin'); x [X^5*Y,(1,11)] + [X^5*Y,(1,12)] + [X^6,(1,11)] >>> set_modsym_print_mode('modular'); x 1610510*X^6*{-1/11, 0} + 893101*X^5*Y*{-1/11, 0} + 206305*X^4*Y^2*{-1/11, 0} + 25410*X^3*Y^3*{-1/11, 0} + 1760*X^2*Y^4*{-1/11, 0} + 65*X*Y^5*{-1/11, 0} - 248832*X^6*{-1/12, 0} - 103680*X^5*Y*{-1/12, 0} - 17280*X^4*Y^2*{-1/12, 0} - 1440*X^3*Y^3*{-1/12, 0} - 60*X^2*Y^4*{-1/12, 0} - X*Y^5*{-1/12, 0} + Y^6*{-1/11, 0} >>> set_modsym_print_mode('vector'); x (1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0) >>> set_modsym_print_mode()
M = ModularSymbols(13, 8) x = M.0 + M.1 + M.14 set_modsym_print_mode('manin'); x set_modsym_print_mode('modular'); x set_modsym_print_mode('vector'); x set_modsym_print_mode()