def test_division_generators(self): prec = 6 div_consts = [c for c in gens_consts if isinstance(c, ConstDivision)] consts = (even_gen_consts() + odd_gen_consts() + [CVH(_wt18_consts[0], 2), CVH(sym10_19_consts[0], 2)]) calculator = CalculatorVectValued(consts, data_dir) calculator.calc_forms_and_save(prec, verbose=True, force=True) gens_dct = calculator.forms_dict(prec) for c in div_consts: k = c.weight() print "checking when k = %s" % (str(k), ) if k % 2 == 0: sccst = _find_const_of_e4_e6_of_same_wt(18 - k) M = Sym10EvenDiv(sccst, prec) else: sccst = _find_const_of_e4_e6_of_same_wt(19 - k) M = Sym10OddDiv(sccst, prec) pl = _anihilate_pol(k, M) hol_basis = M.basis_of_subsp_annihilated_by(pl) N = Sym10GivenWtBase(prec, k, hol_basis) # Check this prec is sufficient. mt = matrix(QQ, [[b[t] for b in N.basis()] for t in N.linearly_indep_tuples()]) self.assertTrue( mt.is_invertible(), "False when k = %s" % (str(k),)) # Check our construction gives a holomorphic modular form self.assertTrue(N.contains(gens_dct[c]), "False when k = %s" % (str(k),))