def fc_of_pullback_of_diff_eisen(l, k, m, A, D, u3, u4, verbose=False):
    '''Return the Fourier coefficient of exp(2pi A Z1 + 2pi D Z2)
    of pullback of vector valued Eisenstein series F_{l, (k, m)} in [DIK], pp 1313.
    '''
    dct = {"A": A, "D": D}
    res = _U_ring(0)
    es = sess(weight=l, degree=4)
    us = list(_U_ring.gens()) + [u3, u4]
    # D_up is multiplication by d_up_mlt on p(z2)e(A Z1 + R^t Z12 + D Z2)
    v_up = vector(_U_ring, us[:2])
    d_up_mlt = v_up * A * v_up
    v_down = vector(us[2:])
    d_down_mlt = v_down * D * v_down
    d_up_down_mlt = d_up_mlt * d_down_mlt
    _u1, _u2 = (_Z_U_ring(a) for a in ["u1", "u2"])
    for R, mat in r_n_m_iter(A, D):
        r_ls = R.list()
        pol = D_tilde_nu(l, k - l, QQ(1), r_ls, **dct)
        # L_operator is a differential operator whose order <= m,
        # we truncate it.
        pol = _Z_ring(
            {t: v for t, v in pol.dict().iteritems() if sum(list(t)) <= m})
        _l_op_tmp = L_operator(k, m, A, D, r_ls, pol *
                               es.fourier_coefficient(mat), us, d_up_down_mlt)
        _l_op_tmp = _U_ring({(m - a, a): _l_op_tmp[_u1 ** (m - a) * _u2 ** a]
                             for a in range(m + 1)})
        res += _l_op_tmp
    res = res * QQ(mul(k + i for i in range(m))) ** (-1)
    res = res * _zeta(1 - l) * _zeta(1 - 2 * l + 2) * _zeta(1 - 2 * l + 4)
    if verbose:
        print "Done computation of Fourier coefficient of pullback."
    return res
 def test_jordan_decomposition_odd_p(self):
     for _ in range(100):
         S = random_even_symm_mat(5)
         for p in [3, 5, 7]:
             self.assertEqual(
                 kronecker_symbol(
                     mul(_jordan_decomposition_odd_p(S, p)) / S.det(), p),
                 1)
 def _assert(d):
     alphas = []
     while len(set(alphas)) < d and all(a != 0 for a in alphas):
         alphas.append(random_prime(100000))
         alphas = list(set(alphas))
     A = matrix([[alpha ** i for alpha in alphas] for i in range(d)])
     v = [random_prime(100000) for _ in range(d)]
     x = PolynomialRing(QQ, names="x").gens()[0]
     chpy = mul(x - alpha for alpha in alphas)
     self.assertEqual(first_elt_of_kern_of_vandermonde(chpy, alphas[0], v),
                      (A ** (-1) * vector(v))[0])
 def Gram_det(self):
     p = self.p
     if p != 2:
         return mul(p ** a * b for a, b in self.blocks)
     else:
         res = ZZ(1)
         for a, b in self.blocks:
             # b is 'h' or 'y'
             if isinstance(b, str):
                 res *= p ** (2 * a) * _hy_det[b]
             else:
                 res *= p ** a * b
         return res
def jordan_blocks_odd(S, p):
    '''
    p: odd prime,
    S: half integral matrix.
    Let S ~ sum p**a_i * b_i * x_i^2 be a jordan decomposition.
    Returns the instance of JordanBlocks attached to
    a list of (a_i, b_i) sorted so that a_0 >= a_1 >= ...
    '''
    p = Integer(p)
    res = []
    u = least_quadratic_nonresidue(p)
    for e, ls in groupby(_jordan_decomposition_odd_p(S, p),
                         key=lambda x: valuation(x, p)):
        ls = [x // p ** e for x in ls]
        part_res = [(e, ZZ(1)) for _ in ls]
        if legendre_symbol(mul(ls), p) == -1:
            part_res[-1] = (e, u)
        res.extend(part_res)
    return JordanBlocks(list(reversed(res)), p)
def L_operator(k, m, _A, _D, r_ls, pol, us, d_up_down_mlt):
    '''
    Return (k)_m * Fourier coefficient of
    L_tilde^{k, m}(pol exp(2pi block_matrix([[A, R/2], [R^t/2, D]])Z))/
    exp(-2pi block_matrix([[A, R/2], [R^t/2, D]])Z).
    as an element of _Z_ring or _Z_U_ring.
    '''
    if m == 0:
        return pol
    zero = _Z_U_ring(0)
    res = zero
    u1, u2, u3, u4 = us
    for n in range(m // 2 + 1):
        pol_tmp = _Z_U_ring(pol)
        for _ in range(m - 2 * n):
            pol_tmp = _D_D_up_D_down(u1, u2, u3, u4, r_ls, pol_tmp)
        for _ in range(n):
            pol_tmp *= d_up_down_mlt

        pol_tmp *= QQ(factorial(n) * factorial(m - 2 * n) *
                      mul(2 - k - m + i for i in range(n))) ** (-1)

        res += pol_tmp
    return res
def _sign(a1, a2):
    return mul(mul(-1 for b in a1 if b < a) for a in a2)
def _C(p, s):
    return mul(s + ZZ(i) / ZZ(2) for i in range(p))
def binomial(x, m):
    '''Return the binomial coefficient (x m).
    '''
    m = ZZ(m)
    return mul(x - i for i in range(m)) / m.factorial()
Beispiel #10
0
 def _monm(ws):
     return mul(dct[k] for k in ws)