Heilbronn matrix computation - Modular Symbols

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

# Heilbronn matrix computation

class sage.modular.modsym.heilbronn.Heilbronn

  Bases: `object`

  apply(u, v, N)

    Return a list of pairs \(((c,d),m)\), which is obtained as follows:

    1) Compute the images \((a,b)\) of the vector \((u,v) \pmod N\) acted on by each of the HeilbronnCremona matrices in `self`.

    2. Reduce each \((a,b)\) to canonical form \((c,d)\) using `p1normalize`.

    3. Sort.

    4) Create the list \(((c,d),m)\), where \(m\) is the number of times that \((c,d)\) appears in the list created in steps 1-3 above. Note that the pairs \(((c,d),m)\) are sorted lexicographically by \((c,d)\).

    INPUT:

    - `u`, `v`, `N` – integers

    OUTPUT: list

    EXAMPLES:

    Sage

        sage: H = sage.modular.modsym.heilbronn.HeilbronnCremona(2); H
        The Cremona-Heilbronn matrices of determinant 2
        sage: H.apply(1,2,7)
        [((1, 1), 1), ((1, 4), 1), ((1, 5), 1), ((1, 6), 1)]

    Python

        >>> from sage.all import *
        >>> H = sage.modular.modsym.heilbronn.HeilbronnCremona(Integer(2)); H
        The Cremona-Heilbronn matrices of determinant 2
        >>> H.apply(Integer(1),Integer(2),Integer(7))
        [((1, 1), 1), ((1, 4), 1), ((1, 5), 1), ((1, 6), 1)]

  to_list()

    Return the list of Heilbronn matrices corresponding to `self`.

    Each matrix is given as a list of four integers.

    EXAMPLES:

    Sage

        sage: H = HeilbronnCremona(2); H
        The Cremona-Heilbronn matrices of determinant 2
        sage: H.to_list()
        [[1, 0, 0, 2], [2, 0, 0, 1], [2, 1, 0, 1], [1, 0, 1, 2]]

    Python

        >>> from sage.all import *
        >>> H = HeilbronnCremona(Integer(2)); H
        The Cremona-Heilbronn matrices of determinant 2
        >>> H.to_list()
        [[1, 0, 0, 2], [2, 0, 0, 1], [2, 1, 0, 1], [1, 0, 1, 2]]

class sage.modular.modsym.heilbronn.HeilbronnCremona

  Bases: `Heilbronn`

  Create the list of Heilbronn-Cremona matrices of determinant \(p\).

  EXAMPLES:

  Sage

      sage: H = HeilbronnCremona(3) ; H
      The Cremona-Heilbronn matrices of determinant 3
      sage: H.to_list()
      [[1, 0, 0, 3],
      [3, 1, 0, 1],
      [1, 0, 1, 3],
      [3, 0, 0, 1],
      [3, -1, 0, 1],
      [-1, 0, 1, -3]]

  Python

      >>> from sage.all import *
      >>> H = HeilbronnCremona(Integer(3)) ; H
      The Cremona-Heilbronn matrices of determinant 3
      >>> H.to_list()
      [[1, 0, 0, 3],
      [3, 1, 0, 1],
      [1, 0, 1, 3],
      [3, 0, 0, 1],
      [3, -1, 0, 1],
      [-1, 0, 1, -3]]

  p

class sage.modular.modsym.heilbronn.HeilbronnMerel

  Bases: `Heilbronn`

  Initialize the list of Merel-Heilbronn matrices of determinant \(n\).

  EXAMPLES:

  Sage

      sage: H = HeilbronnMerel(3) ; H
      The Merel-Heilbronn matrices of determinant 3
      sage: H.to_list()
      [[1, 0, 0, 3],
      [1, 0, 1, 3],
      [1, 0, 2, 3],
      [2, 1, 1, 2],
      [3, 0, 0, 1],
      [3, 1, 0, 1],
      [3, 2, 0, 1]]

  Python

      >>> from sage.all import *
      >>> H = HeilbronnMerel(Integer(3)) ; H
      The Merel-Heilbronn matrices of determinant 3
      >>> H.to_list()
      [[1, 0, 0, 3],
      [1, 0, 1, 3],
      [1, 0, 2, 3],
      [2, 1, 1, 2],
      [3, 0, 0, 1],
      [3, 1, 0, 1],
      [3, 2, 0, 1]]

  n

sage.modular.modsym.heilbronn.hecke_images_gamma0_weight2(u, v, N, indices, R)

  INPUT:

  - `u`, `v`, `N` – integers so that \(\gcd(u,v,N) = 1\)

  - `indices` – list of positive integers

  - `R` – matrix over \(\QQ\) that writes each elements of \(\textnormal{P1} = \textnormal{P1List}(N)\) in terms of a subset of \(\textnormal{P1}\)

  OUTPUT: a dense matrix whose columns are the images \(T_n(x)\) for \(n\) in indices and \(x\) the Manin symbol \((u,v)\), expressed in terms of the basis.

  EXAMPLES:

  Sage

      sage: M = ModularSymbols(23,2,1)
      sage: A = sage.modular.modsym.heilbronn.hecke_images_gamma0_weight2(1,0,23,[1..6],M.manin_gens_to_basis())
      sage: rowsA = A.rows()
      sage: z = M((1,0))
      sage: all(M.T(n)(z).element() == rowsA[n-1] for n in [1..6])
      True

  Python

      >>> from sage.all import *
      >>> M = ModularSymbols(Integer(23),Integer(2),Integer(1))
      >>> A = sage.modular.modsym.heilbronn.hecke_images_gamma0_weight2(Integer(1),Integer(0),Integer(23),(ellipsis_range(Integer(1),Ellipsis,Integer(6))),M.manin_gens_to_basis())
      >>> rowsA = A.rows()
      >>> z = M((Integer(1),Integer(0)))
      >>> all(M.T(n)(z).element() == rowsA[n-Integer(1)] for n in (ellipsis_range(Integer(1),Ellipsis,Integer(6))))
      True

sage.modular.modsym.heilbronn.hecke_images_gamma0_weight_k(u, v, i, N, k, indices, R)

  INPUT:

  - `u`, `v`, `N` – integers so that \(\gcd(u,v,N) = 1\)

  - `i` – integer with \(0 \le i \le k-2\)

  - `k` – weight

  - `indices` – list of positive integers

  - `R` – matrix over \(\QQ\) that writes each elements of \(\textnormal{P1} = \textnormal{P1List}(N)\) in terms of a subset of \(\textnormal{P1}\)

  OUTPUT: a dense matrix with rational entries whose columns are the images \(T_n(x)\) for \(n\) in indices and \(x\) the Manin symbol [\(X^i*Y^{(k-2-i)}\), \((u,v)\)], expressed in terms of the basis.

  EXAMPLES:

  Sage

      sage: M = ModularSymbols(15,6,sign=-1)
      sage: R = M.manin_gens_to_basis()
      sage: a,b,c = sage.modular.modsym.heilbronn.hecke_images_gamma0_weight_k(4,1,3,15,6,[1,11,12], R)
      sage: x = M((3,4,1)) ; x.element() == a
      True
      sage: M.T(11)(x).element() == b
      True
      sage: M.T(12)(x).element() == c
      True

  Python

      >>> from sage.all import *
      >>> M = ModularSymbols(Integer(15),Integer(6),sign=-Integer(1))
      >>> R = M.manin_gens_to_basis()
      >>> a,b,c = sage.modular.modsym.heilbronn.hecke_images_gamma0_weight_k(Integer(4),Integer(1),Integer(3),Integer(15),Integer(6),[Integer(1),Integer(11),Integer(12)], R)
      >>> x = M((Integer(3),Integer(4),Integer(1))) ; x.element() == a
      True
      >>> M.T(Integer(11))(x).element() == b
      True
      >>> M.T(Integer(12))(x).element() == c
      True

sage.modular.modsym.heilbronn.hecke_images_nonquad_character_weight2(u, v, N, indices, chi, R)

  Return images of the Hecke operators \(T_n\) for \(n\) in the list indices, where \(\chi\) must be a quadratic Dirichlet character with values in \(\QQ\).

  \(R\) is assumed to be the relation matrix of a weight modular symbols space over \(\QQ\) with character \(\chi\).

  INPUT:

  - `u`, `v`, `N` – integers so that \(\gcd(u,v,N) = 1\)

  - `indices` – list of positive integers

  - `chi` – a Dirichlet character that takes values in a nontrivial extension of \(\QQ\)

  - `R` – matrix over \(\QQ\) that writes each elements of \(\textnormal{P1} = \textnormal{P1List}(N)\) in terms of a subset of \(\textnormal{P1}\)

  OUTPUT: a dense matrix with entries in the field \(\QQ(\chi)\) (the values of \(\chi\)) whose columns are the images \(T_n(x)\) for \(n\) in indices and \(x\) the Manin symbol \((u,v)\), expressed in terms of the basis.

  EXAMPLES:

  Sage

      sage: chi = DirichletGroup(13).0^2
      sage: M = ModularSymbols(chi)
      sage: eps = M.character()
      sage: R = M.manin_gens_to_basis()
      sage: sage.modular.modsym.heilbronn.hecke_images_nonquad_character_weight2(1,0,13,[1,2,6],eps,R)
      [           1            0            0            0]
      [   zeta6 + 2            0            0           -1]
      [           7 -2*zeta6 + 1   -zeta6 - 1     -2*zeta6]
      sage: x = M((1,0)); x.element()
      (1, 0, 0, 0)
      sage: M.T(2)(x).element()
      (zeta6 + 2, 0, 0, -1)
      sage: M.T(6)(x).element()
      (7, -2*zeta6 + 1, -zeta6 - 1, -2*zeta6)

  Python

      >>> from sage.all import *
      >>> chi = DirichletGroup(Integer(13)).gen(0)**Integer(2)
      >>> M = ModularSymbols(chi)
      >>> eps = M.character()
      >>> R = M.manin_gens_to_basis()
      >>> sage.modular.modsym.heilbronn.hecke_images_nonquad_character_weight2(Integer(1),Integer(0),Integer(13),[Integer(1),Integer(2),Integer(6)],eps,R)
      [           1            0            0            0]
      [   zeta6 + 2            0            0           -1]
      [           7 -2*zeta6 + 1   -zeta6 - 1     -2*zeta6]
      >>> x = M((Integer(1),Integer(0))); x.element()
      (1, 0, 0, 0)
      >>> M.T(Integer(2))(x).element()
      (zeta6 + 2, 0, 0, -1)
      >>> M.T(Integer(6))(x).element()
      (7, -2*zeta6 + 1, -zeta6 - 1, -2*zeta6)

sage.modular.modsym.heilbronn.hecke_images_quad_character_weight2(u, v, N, indices, chi, R)

  INPUT:

  - `u`, `v`, `N` – integers so that \(\gcd(u,v,N) = 1\)

  - `indices` – list of positive integers

  - `chi` – a Dirichlet character that takes values in \(\QQ\)

  - `R` – matrix over \(\QQ(\chi)\) that writes each elements of \(\textnormal{P1} = \textnormal{P1List}(N)\) in terms of a subset of \(\textnormal{P1}\)

  OUTPUT: a dense matrix with entries in the rational field \(\QQ\) (the values of \(\chi\)) whose columns are the images \(T_n(x)\) for \(n\) in indices and \(x\) the Manin symbol \((u,v)\), expressed in terms of the basis.

  EXAMPLES:

  Sage

      sage: chi = DirichletGroup(29,QQ).0
      sage: M = ModularSymbols(chi)
      sage: R = M.manin_gens_to_basis()
      sage: sage.modular.modsym.heilbronn.hecke_images_quad_character_weight2(2,1,29,[1,3,4],chi,R)
      [ 0  0  0  0  0 -1]
      [ 0  1  0  1  1  1]
      [ 0 -2  0  2 -2 -1]
      sage: x = M((2,1)) ; x.element()
      (0, 0, 0, 0, 0, -1)
      sage: M.T(3)(x).element()
      (0, 1, 0, 1, 1, 1)
      sage: M.T(4)(x).element()
      (0, -2, 0, 2, -2, -1)

  Python

      >>> from sage.all import *
      >>> chi = DirichletGroup(Integer(29),QQ).gen(0)
      >>> M = ModularSymbols(chi)
      >>> R = M.manin_gens_to_basis()
      >>> sage.modular.modsym.heilbronn.hecke_images_quad_character_weight2(Integer(2),Integer(1),Integer(29),[Integer(1),Integer(3),Integer(4)],chi,R)
      [ 0  0  0  0  0 -1]
      [ 0  1  0  1  1  1]
      [ 0 -2  0  2 -2 -1]
      >>> x = M((Integer(2),Integer(1))) ; x.element()
      (0, 0, 0, 0, 0, -1)
      >>> M.T(Integer(3))(x).element()
      (0, 1, 0, 1, 1, 1)
      >>> M.T(Integer(4))(x).element()
      (0, -2, 0, 2, -2, -1)