summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Raum <martin@raum-brothers.eu>2014-06-04 22:43:35 +0200
committerMartin Raum <martin@raum-brothers.eu>2014-11-14 09:47:45 +0100
commitc7968aed72e52b7b12cc4237d07ce9bb827faa58 (patch)
treeacc9e75939c9db9cae47fcd5a1615631e165bab1
parentFix doctests for classical weak Jacobi forms. (diff)
Fix doctests for classical Jacobi forms.
-rw-r--r--src/sage/modular/jacobi/classical.py35
-rw-r--r--src/sage/modular/jacobi/test_classical.py21
2 files changed, 16 insertions, 40 deletions
diff --git a/src/sage/modular/jacobi/classical.py b/src/sage/modular/jacobi/classical.py
index d811a87..94e58e0 100644
--- a/src/sage/modular/jacobi/classical.py
+++ b/src/sage/modular/jacobi/classical.py
@@ -56,9 +56,9 @@ def classical_jacobi_fe_indices(m, prec, reduced=False):
sage: from sage.modular.jacobi.all import *
sage: list(classical_jacobi_fe_indices(2, 3, True))
- ???
+ [(1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2), (0, 0)]
sage: list(classical_jacobi_fe_indices(2, 3, False))
- ???
+ [(1, 0), (1, 1), (1, -1), (1, 2), (1, -2), (2, 0), (2, 1), (2, -1), (2, 2), (2, -2), (2, 3), (2, -3), (0, 0), (2, 4), (2, -4)]
"""
fm = Integer(4*m)
@@ -158,36 +158,7 @@ def classical_jacobi_forms(k, m, prec, algorithm="skoruppa"):
sage: from sage.modular.jacobi.classical import *
sage: k = 4; m = 2; prec = 5
sage: classical_jacobi_forms(k, m, prec)
- ???
-
- TESTS::
-
-
- We compute the Fourier expansion of a Jacobi form of weight `4`
- and index `2`. This is denoted by ``d``. Moreover, we span the
- space of all Jacobi forms of weight `8` and index `2`.
- Multiplying the weight `4` by the Eisenstein series of weight `4`
- must yield an element of the weight `8` space. Note that the
- multiplication is done using a polynomial ring, since no native
- multiplication for Jacobi forms is implemented.
-
- ::
-
- sage: from sage.modular.jacobi.classical import *
- sage: P.<q> = PolynomialRing(LaurentPolynomialRing(QQ, 'zeta')); zeta = P.base_ring().gen(0)
- sage: prec = 20; m = 2; k = 4
- sage: f = classical_jacobi_forms(k, m, prec)[0]
- sage: f_poly = sum(f[reduce_classical_jacobi_fe_index((n,r),m)[0]] * q**n * zeta**r for (n,r) in classical_jacobi_fe_indices(2, prec))
- sage: E4_poly = ModularForms(1, 4).gen(0).qexp(prec).polynomial()
- sage: h_poly = E4_poly * f_poly
-
- ::
-
- sage: _phi1, _phi2 = classical_jacobi_forms(8, m, prec)
- sage: phi1 = lambda nr: _phi1[nr] if nr in _phi1 else 0
- sage: phi2 = lambda nr: _phi2[nr] if nr in _phi2 else 0
- sage: all(h_poly[nr[0]][nr[1]] == 7/66 * phi1(nr) + 4480 * phi2(nr) for nr in classical_jacobi_fe_indices(m, prec, reduced=True) )
- True
+ [{(1, 2): 564480, (3, 2): 33868800, (0, 0): 40320, (3, 0): 51932160, (3, 1): 54190080, (2, 1): 18063360, (1, 1): 2580480, (2, 0): 23143680, (2, 2): 11289600, (4, 2): 95477760, (1, 0): 3386880, (4, 1): 108380160, (4, 0): 138862080}]
TESTS:
diff --git a/src/sage/modular/jacobi/test_classical.py b/src/sage/modular/jacobi/test_classical.py
index 0ea099d..182b781 100644
--- a/src/sage/modular/jacobi/test_classical.py
+++ b/src/sage/modular/jacobi/test_classical.py
@@ -25,10 +25,13 @@ AUTHOR:
#
#===============================================================================
-from sage.matrix.all import matrix
-from sage.modular.all import ModularForms
-from sage.modules.all import vector
-from sage.rings.all import PolynomialRing, LaurentPolynomialRing, QQ
+from sage.all import (
+ PolynomialRing, LaurentPolynomialRing,
+ QQ,
+ vector,
+ matrix,
+ ModularForms
+)
from sage.modular.jacobi.classical import (
classical_jacobi_forms,
@@ -38,26 +41,27 @@ from sage.modular.jacobi.classical import (
def test_classical_jacobi_forms():
prec = 10
+ k_mod = 6
for k in [8, 7, 12]:
for m in range(1, 5):
yield (_test_classical_jacobi_forms,
- k, m, prec)
+ k, m, k_mod, prec)
-def _test_classical_jacobi_forms(prec, k, m, k_mod):
+def _test_classical_jacobi_forms(k, m, k_mod, prec):
r"""
Check that the product of Jacobi forms of given weight and
index with modular forms of given weight is a Jacobi form.
INPUT:
- - ``prec`` -- An integer.
-
- `k` -- An integer.
- `m -- A positive integer.
- `k_mod` -- An integer.
+
+ - ``prec`` -- An integer.
"""
P = PolynomialRing(LaurentPolynomialRing(QQ, 'zeta'), 'q')
q = P.gen(0)
@@ -75,6 +79,7 @@ def _test_classical_jacobi_forms(prec, k, m, k_mod):
for phi1 in classical_jacobi_forms(k, m, prec):
phi1_poly = P.zero()
for nr in indices_nonreduced:
+ (n,r) = nr
(nrred, s) = red(nr)
if nrred in phi1:
phi1_poly += s**k * phi1[nrred] * q**n * zeta**r