Esempio n. 1
0
    def _compute_hecke_matrix(self, n):
        r"""
        EXAMPLES::

            sage: CuspForms(GammaH(31, [7]), 1).hecke_matrix(7)
            [-1]
            sage: C = CuspForms(GammaH(124, [33]), 1) # long time
            sage: C.hecke_matrix(2) # long time
            [ 0  0 -1 -1  0  1  0]
            [ 1  0  0 -1 -1 -1  0]
            [ 0  0  0 -1  1  1 -1]
            [ 0  1  0 -1  0  0  0]
            [ 0  0 -1  0  0  1  1]
            [ 0  0  0 -1  0  0 -1]
            [ 0  0  0  0  0  1  0]
            sage: C.hecke_matrix(7) # long time
            [ 0  1  0 -1  0  0  1]
            [ 0 -1  0  0  0  0  0]
            [ 0  1 -1  0  0  0  1]
            [ 0  0  0 -1  0  0  0]
            [ 0  1  1  0  0 -1  0]
            [ 1  0 -1 -1 -1  0  1]
            [ 0  1  0  0  1  0  0]
            sage: C.hecke_matrix(23) == 0 # long time
            True

        """
        chars = self.group().characters_mod_H(sign=-1, galois_orbits=True)
        A = Matrix(QQ, 0, 0)
        for c in chars:
            chi = c.minimize_base_ring()
            d = weight1.dimension_wt1_cusp_forms(chi)
            e = chi.base_ring().degree()
            H = Matrix(QQ, d * e, d * e)
            from .constructor import CuspForms
            M = CuspForms(chi, 1).hecke_matrix(n)
            if e == 1:
                H = M
            else:
                for i in range(d):
                    for j in range(d):
                        H[e * i:e * (i + 1),
                          e * j:e * (j + 1)] = M[i, j].matrix().transpose()
            A = A.block_sum(H)
        t = self._transformation_matrix()
        return t * A * ~t
Esempio n. 2
0
    def _compute_diamond_matrix(self, d):
        r"""
        EXAMPLES::

            sage: CuspForms(GammaH(31, [7]), 1).diamond_bracket_matrix(3)
            [-1]

            sage: C = CuspForms(GammaH(124, [33]), 1)   # long time
            sage: D = C.diamond_bracket_matrix(3); D    # long time
            [ 0  0  0 -1  1  0  0]
            [ 0 -1  0  0  0  0  0]
            [ 2  1  1 -2 -1 -2 -1]
            [ 0  0  0 -1  0  0  0]
            [-1  0  0  1  1  0  0]
            [ 2  0  0 -2 -1 -1  0]
            [ 0  2  1  0  0 -1  0]
            sage: t = C._transformation_matrix(); ~t * D * t   # long time
            [ 1  1  0  0  0  0  0]
            [-1  0  0  0  0  0  0]
            [ 0  0  1  1  0  0  0]
            [ 0  0 -1  0  0  0  0]
            [ 0  0  0  0 -1  0  0]
            [ 0  0  0  0  0 -1  0]
            [ 0  0  0  0  0  0 -1]
        """
        chars=self.group().characters_mod_H(sign=-1, galois_orbits=True)
        A = Matrix(QQ, 0, 0)
        for c in chars:
            chi = c.minimize_base_ring()
            dim = weight1.dimension_wt1_cusp_forms(chi)
            if chi.base_ring() == QQ:
                m = Matrix(QQ, 1, 1, [chi(d)])
            else:
                m = chi(d).matrix().transpose()
            for i in range(dim):
                A = A.block_sum(m)
        t = self._transformation_matrix()
        return t * A * ~t