A single element of an ambient space of modular symbols - Modular Symbols

Skip to content
Back to top
View this page
Edit this page

# A single element of an ambient space of modular symbols

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

  Bases: `HeckeModuleElement`

  An element of a space of modular symbols.

  list()

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

    EXAMPLES:

    Sage

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

    Python

        >>> from sage.all import *
        >>> ModularSymbols(Integer(37), Integer(2)).gen(0).list()
        [1, 0, 0, 0, 0]

  manin_symbol_rep()

    Return a representation of `self` as a formal sum of Manin symbols.

    EXAMPLES:

    Sage

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

    Python

        >>> from sage.all import *
        >>> x = ModularSymbols(Integer(37), Integer(4)).gen(0)
        >>> x.manin_symbol_rep()
        [X^2,(0,1)]

    The result is cached:

    Sage

        sage: x.manin_symbol_rep() is x.manin_symbol_rep()
        True

    [Python]

        >>> from sage.all import *
        >>> x.manin_symbol_rep() is x.manin_symbol_rep()
        True

  modular_symbol_rep()

    Return a representation of `self` as a formal sum of modular symbols.

    EXAMPLES:

    Sage

        sage: x = ModularSymbols(37, 4).0
        sage: x.modular_symbol_rep()
        X^2*{0, Infinity}

    Python

        >>> from sage.all import *
        >>> x = ModularSymbols(Integer(37), Integer(4)).gen(0)
        >>> x.modular_symbol_rep()
        X^2*{0, Infinity}

    The result is cached:

    Sage

        sage: x.modular_symbol_rep() is x.modular_symbol_rep()
        True

    [Python]

        >>> from sage.all import *
        >>> x.modular_symbol_rep() is x.modular_symbol_rep()
        True

sage.modular.modsym.element.set_modsym_print_mode(mode='manin')

  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

      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()

  Python

      >>> 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()