Ejemplo n.º 1
0
 def test_division_cusp(self):
     '''Test the method calc_form of ConstDivision in the case when
     division by a cusp form.
     '''
     prec = 5
     x10 = x10_with_prec(prec)
     sccs = [SMFC([4, 10]), SMFC([6, 10])]
     cvc = ConstVectValued(2, sccs, 0, None)
     cd = ConstDivision([cvc], [1], SMFC([10]), 1)
     F = cvc.calc_form(prec)
     G = cd.calc_form(prec)
     self.assertNotEqual(F, 0)
     self.assertEqual(G.prec.value, prec)
     self.assertEqual(G * x10, F)
Ejemplo n.º 2
0
 def test_division_multiplication(self):
     '''Test the method calc_form of ConstDivision and ConstMul.'''
     prec = 5
     es4, es6, _, _, _ = degree2_modular_forms_ring_level1_gens(prec)
     sccs = [SMFC([4, 6]), SMFC([10, 12])]
     cvc = ConstVectValued(2, sccs, 0, None)
     cd = ConstDivision([cvc], [1], SMFC([4, 6]), 0)
     cm = ConstMul(cvc, SMFC([4, 6]))
     F = cvc.calc_form(prec)
     G = cd.calc_form(prec)
     H = cm.calc_form(prec)
     self.assertNotEqual(F, 0)
     self.assertEqual(G.wt, 22)
     self.assertEqual(G * es4 * es6, F)
     self.assertEqual(H.wt, 42)
     self.assertEqual(H, F * es4 * es6)
Ejemplo n.º 3
0
 def test_walk(self):
     '''Test the method walk of ConstVectBase.
     '''
     j = 10
     c1 = ConstVectValued(j, [SMFC([5, 5])], 0, None)
     c2 = ConstDivision([c1], [1], SMFC([10]), 1)
     c3 = ConstVectValuedHeckeOp(c2, 2)
     c4 = ConstDivision([c1], [1], SMFC([12]), 1)
     c5 = ConstDivision([c3, c4], [1, -1], SMFC([10]), 1)
     self.assertEqual(list(c1.walk()), [c1])
     self.assertEqual(list(c2.walk()), [c1, c2])
     self.assertEqual(list(c3.walk()), [c1, c2, c3])
     self.assertEqual(list(c4.walk()), [c1, c4])
     self.assertEqual(list(c5.walk()), [c1, c2, c3, c1, c4, c5])