Hecke operators on \(q\)-expansions#

sage.modular.modform.hecke_operator_on_qexp.hecke_operator_on_basis(B, n, k, eps=None, already_echelonized=False)[source]#

Given a basis \(B\) of \(q\)-expansions for a space of modular forms with character \(\varepsilon\) to precision at least \(\#B\cdot n+1\), this function computes the matrix of \(T_n\) relative to \(B\).

Note

If the elements of B are not known to sufficient precision, this function will report that the vectors are linearly dependent (since they are to the specified precision).

INPUT:

  • B – list of q-expansions

  • n – an integer >= 1

  • k – an integer

  • eps – Dirichlet character

  • already_echelonized – bool (default: False); if True, use that the basis is already in Echelon form, which saves a lot of time.

EXAMPLES:

sage: sage.modular.modform.constructor.ModularForms_clear_cache()
sage: ModularForms(1,12).q_expansion_basis()
[
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6),
1 + 65520/691*q + 134250480/691*q^2 + 11606736960/691*q^3
  + 274945048560/691*q^4 + 3199218815520/691*q^5 + O(q^6)
]
sage: hecke_operator_on_basis(ModularForms(1,12).q_expansion_basis(), 3, 12)
Traceback (most recent call last):
...
ValueError: The given basis vectors must be linearly independent.

sage: hecke_operator_on_basis(ModularForms(1,12).q_expansion_basis(30), 3, 12)
[   252      0]
[     0 177148]
>>> from sage.all import *
>>> sage.modular.modform.constructor.ModularForms_clear_cache()
>>> ModularForms(Integer(1),Integer(12)).q_expansion_basis()
[
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6),
1 + 65520/691*q + 134250480/691*q^2 + 11606736960/691*q^3
  + 274945048560/691*q^4 + 3199218815520/691*q^5 + O(q^6)
]
>>> hecke_operator_on_basis(ModularForms(Integer(1),Integer(12)).q_expansion_basis(), Integer(3), Integer(12))
Traceback (most recent call last):
...
ValueError: The given basis vectors must be linearly independent.

>>> hecke_operator_on_basis(ModularForms(Integer(1),Integer(12)).q_expansion_basis(Integer(30)), Integer(3), Integer(12))
[   252      0]
[     0 177148]
sage.modular.modform.hecke_operator_on_qexp.hecke_operator_on_qexp(f, n, k, eps=None, prec=None, check=True, _return_list=False)[source]#

Given the \(q\)-expansion \(f\) of a modular form with character \(\varepsilon\), this function computes the image of \(f\) under the Hecke operator \(T_{n,k}\) of weight \(k\).

EXAMPLES:

sage: M = ModularForms(1,12)
sage: hecke_operator_on_qexp(M.basis()[0], 3, 12)
252*q - 6048*q^2 + 63504*q^3 - 370944*q^4 + O(q^5)
sage: hecke_operator_on_qexp(M.basis()[0], 1, 12, prec=7)
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 + O(q^7)
sage: hecke_operator_on_qexp(M.basis()[0], 1, 12)
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7 + 84480*q^8
  - 113643*q^9 - 115920*q^10 + 534612*q^11 - 370944*q^12 - 577738*q^13 + O(q^14)

sage: M.prec(20)
20
sage: hecke_operator_on_qexp(M.basis()[0], 3, 12)
252*q - 6048*q^2 + 63504*q^3 - 370944*q^4 + 1217160*q^5 - 1524096*q^6 + O(q^7)
sage: hecke_operator_on_qexp(M.basis()[0], 1, 12)
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7 + 84480*q^8
  - 113643*q^9 - 115920*q^10 + 534612*q^11 - 370944*q^12 - 577738*q^13
  + 401856*q^14 + 1217160*q^15 + 987136*q^16 - 6905934*q^17 + 2727432*q^18
  + 10661420*q^19 - 7109760*q^20 + O(q^21)

sage: (hecke_operator_on_qexp(M.basis()[0], 1, 12)*252).add_bigoh(7)
252*q - 6048*q^2 + 63504*q^3 - 370944*q^4 + 1217160*q^5 - 1524096*q^6 + O(q^7)

sage: hecke_operator_on_qexp(M.basis()[0], 6, 12)
-6048*q + 145152*q^2 - 1524096*q^3 + O(q^4)
>>> from sage.all import *
>>> M = ModularForms(Integer(1),Integer(12))
>>> hecke_operator_on_qexp(M.basis()[Integer(0)], Integer(3), Integer(12))
252*q - 6048*q^2 + 63504*q^3 - 370944*q^4 + O(q^5)
>>> hecke_operator_on_qexp(M.basis()[Integer(0)], Integer(1), Integer(12), prec=Integer(7))
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 + O(q^7)
>>> hecke_operator_on_qexp(M.basis()[Integer(0)], Integer(1), Integer(12))
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7 + 84480*q^8
  - 113643*q^9 - 115920*q^10 + 534612*q^11 - 370944*q^12 - 577738*q^13 + O(q^14)

>>> M.prec(Integer(20))
20
>>> hecke_operator_on_qexp(M.basis()[Integer(0)], Integer(3), Integer(12))
252*q - 6048*q^2 + 63504*q^3 - 370944*q^4 + 1217160*q^5 - 1524096*q^6 + O(q^7)
>>> hecke_operator_on_qexp(M.basis()[Integer(0)], Integer(1), Integer(12))
q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 - 6048*q^6 - 16744*q^7 + 84480*q^8
  - 113643*q^9 - 115920*q^10 + 534612*q^11 - 370944*q^12 - 577738*q^13
  + 401856*q^14 + 1217160*q^15 + 987136*q^16 - 6905934*q^17 + 2727432*q^18
  + 10661420*q^19 - 7109760*q^20 + O(q^21)

>>> (hecke_operator_on_qexp(M.basis()[Integer(0)], Integer(1), Integer(12))*Integer(252)).add_bigoh(Integer(7))
252*q - 6048*q^2 + 63504*q^3 - 370944*q^4 + 1217160*q^5 - 1524096*q^6 + O(q^7)

>>> hecke_operator_on_qexp(M.basis()[Integer(0)], Integer(6), Integer(12))
-6048*q + 145152*q^2 - 1524096*q^3 + O(q^4)

An example on a formal power series:

sage: R.<q> = QQ[[]]
sage: f = q + q^2 + q^3 + q^7 + O(q^8)
sage: hecke_operator_on_qexp(f, 3, 12)
q + O(q^3)
sage: hecke_operator_on_qexp(delta_qexp(24), 3, 12).prec()
8
sage: hecke_operator_on_qexp(delta_qexp(25), 3, 12).prec()
9
>>> from sage.all import *
>>> R = QQ[['q']]; (q,) = R._first_ngens(1)
>>> f = q + q**Integer(2) + q**Integer(3) + q**Integer(7) + O(q**Integer(8))
>>> hecke_operator_on_qexp(f, Integer(3), Integer(12))
q + O(q^3)
>>> hecke_operator_on_qexp(delta_qexp(Integer(24)), Integer(3), Integer(12)).prec()
8
>>> hecke_operator_on_qexp(delta_qexp(Integer(25)), Integer(3), Integer(12)).prec()
9

An example of computing \(T_{p,k}\) in characteristic \(p\):

sage: p = 199
sage: fp = delta_qexp(prec=p^2+1, K=GF(p))
sage: tfp = hecke_operator_on_qexp(fp, p, 12)
sage: tfp == fp[p] * fp
True
sage: tf = hecke_operator_on_qexp(delta_qexp(prec=p^2+1), p, 12).change_ring(GF(p))
sage: tfp == tf
True
>>> from sage.all import *
>>> p = Integer(199)
>>> fp = delta_qexp(prec=p**Integer(2)+Integer(1), K=GF(p))
>>> tfp = hecke_operator_on_qexp(fp, p, Integer(12))
>>> tfp == fp[p] * fp
True
>>> tf = hecke_operator_on_qexp(delta_qexp(prec=p**Integer(2)+Integer(1)), p, Integer(12)).change_ring(GF(p))
>>> tfp == tf
True