def det_deg2(mat, autom=True, wt=None, num_of_procs=multiprocessing.cpu_count()): ''' Returns det(mat) by interpolatation. Result is a Siegel modular form. ''' n = len(mat) bd = mat[0][0].prec.value forms_flatten = reduce(lambda x, y: x + y, mat) func = lambda l: matrix(group(l, n)).det() if autom: return calc_forms(func, forms_flatten, bd, autom=True, wt=wt, num_of_procs=num_of_procs) else: return calc_forms(func, forms_flatten, bd, autom=False, num_of_procs=num_of_procs)
def _inc_weight(Q): ''' Let D be the differential operator ass. to Q. Let f_1, .., f_t be vector valued modular forms of determinant weights k_1, ..., k_t. If the determinant weight of D(f_1, ..., f_t) is equal to k_1 + ... + k_t + k, this function returns k. ''' S = Q.parent() R = S.base_ring() u1, _ = S.gens() rs = R.gens() rdct = {} for r11, r12, _ in group(rs, 3): rdct[r11] = 4 * r11 rdct[r12] = 2 * r12 t = [t for t, v in Q.dict().iteritems() if v != 0][0] a = Q.map_coefficients(lambda f: f.subs(rdct))[t] / Q.subs({u1: 2 * u1})[t] return int(log(a) / log(2))
def monom_mul(tpl, v, flist): tpls = group(tpl, 3) l = zip(flist, tpls) return ((v * mul([QQ(2) ** (-t[1]) for _, t in l])) * mul((f._differential_operator_monomial(*t) for f, t in l)))
def func(l): return matrix(group(l, n)).det()