def test_t_2_action(self): es4 = eisenstein_series_degree2(4, 10) es6 = eisenstein_series_degree2(6, 10) F10 = rankin_cohen_pair_sym(2, es4, es6) ev2 = -24 * (1 + 2 ** 8) prec5 = PrecisionDeg2(5) self.assertTrue( all([F10.hecke_operator(2, t) == ev2 * F10[t] for t in prec5]))
def test_vector_vald_klingen_hecke_pol(self): es4 = eisenstein_series_degree2(4, 5) es6 = eisenstein_series_degree2(6, 5) F10 = rankin_cohen_pair_sym(2, es4, es6) pl = F10.euler_factor_of_spinor_l(2) x = pl.parent().gens()[0] f = 1 + 24 * x + 2048 * x ** 2 self.assertTrue(f * f.subs({x: 2 ** 8 * x}) == pl)
def test_divide_vector_valued(self): prec = 6 x10 = x10_with_prec(prec + 1) es4 = eisenstein_series_degree2(4, prec + 1) es6 = eisenstein_series_degree2(6, prec + 1) f = rankin_cohen_pair_sym(2, es4, es6) g = f * x10 self.assertEqual(f._down_prec(prec), g.divide(x10, prec, parallel=True))
def test_det_is_divisible_x35_fifth(): prec = 18 x35 = x35_with_prec(prec) f187 = ModFormQexpLevel1.load_from(os.path.join(data_dir, "gens_even_det.sobj")) es4 = eisenstein_series_degree2(4, prec) es6 = eisenstein_series_degree2(6, prec) g = (x35 ** 5) * (es4 ** 3 - es6 ** 2) assert f187 * g[(16, 5, 10)] == g * f187[(16, 5, 10)]
def polynomial_to_form(f, prec): es4 = eisenstein_series_degree2(4, prec) es6 = eisenstein_series_degree2(6, prec) x10 = x10_with_prec(prec) x12 = x12_with_prec(prec) x35 = x35_with_prec(prec) gens = [es4, es6, x10, x12, x35] def monom(t): return reduce(operator.mul, [f ** a for f, a in zip(gens, t)]) return sum([a * monom(t) for t, a in f.dict().iteritems()])
def check_det_with_prec(prec): es4 = eisenstein_series_degree2(4, prec) es6 = eisenstein_series_degree2(6, prec) x35 = x35_with_prec(prec) f = (es4**3 - es6**2) * x35**6 t = f._none_zero_tpl() d = calculator.forms_dict(prec) # Constructions of the first 11 generators. cs = list(sorted(calculator._const_vecs, key=lambda x: x.weight()))[:11] wt = sum(c.weight() for c in cs) + (10 * 11)//2 mat = [d[c].forms for c in cs] det = det_deg2(mat, wt=wt) assert f[t] * det == det[t] * f
def test_x5_mul(self): x5 = x5__with_prec(5) x10 = x10_with_prec(4) es4 = eisenstein_series_degree2(4, 5) self.assertEqual(x10, x5 ** 2) self.assertEqual(x10 * x5, x5 ** 3) self.assertEqual(x5 * es4, es4 * x5) self.assertEqual((x5 + x5 * es4) * x5, x10 + x10 * es4)
def test_eisenstein(self): prec = 10 es4, es6, es10, es12 = [eisenstein_series_degree2(k, prec) for k in [4, 6, 10, 12]] f10 = es4 * es6 - es10 f12 = 3 ** 2 * 7 ** 2 * es4 ** 3 + 2 * 5 ** 3 * es6 ** 2 - 691 * es12 f10 = f10 * (f10[(1, 1, 1)]) ** (-1) f12 = f12 * (f12[(1, 1, 1)]) ** (-1) self.assertTrue(f10 == x10_with_prec(prec)) self.assertTrue(f12 == x12_with_prec(prec))
def test_vector_valued_rankin_cohen(self): prec = 5 M4_10 = vvld_smfs(4, 10, prec) f4_10 = M4_10.basis()[0] f4_15 = vvld_smfs(4, 15, prec).basis()[0] e4 = eisenstein_series_degree2(4, prec) g4_15 = vector_valued_rankin_cohen(e4, f4_10) t = ((1, 1, 1), 0) self.assertEqual(f4_15 * g4_15[t], g4_15 * f4_15[t]) es4, es6, _, _, _ = degree2_modular_forms_ring_level1_gens(5) f = es6 x5 = x5__with_prec(5) f_even_sym2 = rankin_cohen_pair_sym(2, f, x5) f_odd_sym2 = vector_valued_rankin_cohen(es4 * x5, f_even_sym2) a = f_odd_sym2[(1, 0, 2)].vec[1] g_sym2_21 = vvld_smfs(2, 21, 4).basis()[0] b = g_sym2_21[(1, 0, 2)].vec[1] self.assertEqual(f_odd_sym2 * b, g_sym2_21 * a)
def test_es4_eigenvalues(self): es4 = eisenstein_series_degree2(4, 25) d = {2: 45, 3: 280, 4: 1549, 5: 3276, 9: 69049, 25: 10256401} for k, v in d.iteritems(): self.assertTrue(es4.hecke_eigenvalue(k) == v)
# -*- coding: utf-8 -*- from degree2.scalar_valued_smfs import eisenstein_series_degree2, QexpLevel1,\ x10_with_prec, x12_with_prec, x35_with_prec, ModFormQexpLevel1 from degree2.basic_operation import PrecisionDeg2 import unittest from sage.all import FiniteField, ZZ, QQ, PolynomialRing import operator global_prec = 8 # global_prec = [(10, 5, 10), (9, 0, 8)] es4 = eisenstein_series_degree2(4, global_prec) qsres4 = QexpLevel1(es4.fc_dct, global_prec, base_ring=ZZ) ffld = FiniteField(5) ff_es4 = es4.change_ring(ffld) ff_qsres4 = qsres4.change_ring(ffld) es6 = eisenstein_series_degree2(6, global_prec) qsres6 = QexpLevel1(es6.fc_dct, global_prec, base_ring=ZZ) ff_es6 = es6.change_ring(ffld) ff_qsres6 = qsres6.change_ring(ffld) x10 = x10_with_prec(global_prec) qsrx10 = QexpLevel1(x10.fc_dct, global_prec, base_ring=ZZ, is_cuspidal=True) ff_x10 = x10.change_ring(ffld) ff_qsrx10 = qsrx10.change_ring(ffld)
def testdivide(self): prec = 10 x10 = x10_with_prec(prec + 1) es4 = eisenstein_series_degree2(4, prec + 1) self.assertEqual((es4 * x10).divide(x10, prec), es4) self.assertEqual((x10 * x10).divide(x10, prec), x10)
def test_es6(self): es6 = eisenstein_series_degree2(6, global_prec) self.assertTrue(self.sub_dct(es6) == fc_dct6)
def test_es4(self): es4 = eisenstein_series_degree2(4, global_prec) self.assertTrue(self.sub_dct(es4) == fc_dct4)