def _coefficient_by_restriction__with_restriction_matrix( precision, k, relation_precision, global_restriction_matrix__big, row_groups, row_labels, column_labels, global_relation_matrix, column_labels_relations, dim = None ) :
    r"""
    Compute the Fourier expansions of Jacobi forms (over `\QQ`) of weight `k` and 
    index `L` (an even symmetric matrix) up to given precision.

    NOTE:
    
    In case ``relation_precision`` is not ``None``, we assume that it is of the form
    `\{ (n, r) : n < B \}`, where `B` is the index of the filter.
    
    INPUT:
    
    - ``precision`` -- A filter for Jacobi forms of arbitrary index.
    
    - `k` -- An integer.
    
    - ``relation_precision`` -- A filter for Jacobi forms or ``None`` (default: ``None``).
    
    OUTPUT:
    
    - A list of elements of the corresponding Fourier expansion module.
    
    TESTS:
    
    See ``_test__coefficient_by_restriction`` for further tests.
    
    ::
    
        sage: from psage.modform.jacobiforms.jacobiformd1_fourierexpansion import *
        sage: from psage.modform.jacobiforms.jacobiformd1_fegenerators import _coefficient_by_restriction
        sage: indices = JacobiFormD1Indices(QuadraticForm(matrix(2, [2,1,1,2])))
        sage: precision = indices.filter(20)
        sage: relation_precision = indices.filter(10)
        sage: _coefficient_by_restriction(precision, 10) == _coefficient_by_restriction(precision, 10, relation_precision) 
        True
    """
    L = precision.jacobi_index()
    Lmat = L.matrix()
    Lmat.set_immutable()

    if dim is None :
        dim = dimension__jacobi(k, Lmat)

    
    if relation_precision == precision :
        assert column_labels == column_labels_relations
    if column_labels != column_labels_relations :
        row_groups__small = [ len(filter( lambda (n,r): n < relation_precision.index(), row_labels[m].keys())) for (_, m, _, _) in row_groups ]
def _coefficient_by_restriction( precision, k, relation_precision = None ) :
    r"""
    Compute the Fourier expansions of Jacobi forms (over `\QQ`) of weight `k` and 
    index `L` (an even symmetric matrix) up to given precision.
    
    ALGORITHM:
    
    See [Raum, Computing vector valued modular forms and Jacobi forms]. The algorithm will be applied for precision ``relation_precision``.
    The remaining Fourier coefficients will be determined using fewer restrictions.
    
    NOTE:
    
    In case ``relation_precision`` is not ``None``, we assume that it is of the form
    `\{ (n, r) : n < B \}`, where `B` is the index of the filter.
    
    INPUT:
    
    - ``precision`` -- A filter for Jacobi forms of arbitrary index.
    
    - `k` -- An integer.
    
    - ``relation_precision`` -- A filter for Jacobi forms or ``None`` (default: ``None``).
    
    OUTPUT:
    
    - A list of elements of the corresponding Fourier expansion module.
    
    TESTS:
    
    See ``_test__coefficient_by_restriction`` for further tests.
    
    ::
    
        sage: from psage.modform.jacobiforms.jacobiformd1_fourierexpansion import *
        sage: from psage.modform.jacobiforms.jacobiformd1_fegenerators import _coefficient_by_restriction
        sage: indices = JacobiFormD1Indices(QuadraticForm(matrix(2, [2,1,1,2])))
        sage: precision = indices.filter(20)
        sage: relation_precision = indices.filter(10)
        sage: _coefficient_by_restriction(precision, 10) == _coefficient_by_restriction(precision, 10, relation_precision) 
        True
    """
    L = precision.jacobi_index()
    Lmat = L.matrix()
    Lmat.set_immutable()
    
    global _coefficient_by_restriction__cache
    try :
        expansions = _coefficient_by_restriction__cache[(k, Lmat)]

        if len(expansions) == 0 \
          or expansions[0].precision() >= precision :
            ## TODO: This should be checked in the framework
            return [ f.truncate(precision) for f in expansions ]
    except KeyError :
        pass
    
    dim = dimension__jacobi(k, Lmat)
    if dim == 0 :
        return []

    if relation_precision is None :
        relation_precision = precision

    R = precision.monoid()._r_representatives
    S_extended = _find_complete_set_of_restriction_vectors(L, R, reduction_function = precision.monoid().reduce_r)
    S = list()
    for (s, _) in S_extended :
        if s not in S :
            S.append(s) 
    max_S_length = max([L(s) for s in S])
    B_correction = 1 + (k + max_S_length) // 12
    if precision.index() < B_correction :
        precision = precision.monoid().filter(B_correction)
    if relation_precision.index() < B_correction :
        relation_precision = precision.monoid().filter(B_correction)

    (global_restriction_matrix__big, row_groups, row_labels, column_labels, global_relation_matrix, column_labels_relations) = \
        _prepare_coefficient_by_restriction(precision, k, relation_precision, S)

    expansions = _coefficient_by_restriction__with_restriction_matrix( precision, k, relation_precision, global_restriction_matrix__big,
                                                                       row_groups, row_labels, column_labels, global_relation_matrix, column_labels_relations, dim )

    _coefficient_by_restriction__cache[(k, Lmat)] = expansions
    return expansions
Example #3
0
def _coefficient_by_restriction__with_restriction_matrix(
        precision,
        k,
        relation_precision,
        global_restriction_matrix__big,
        row_groups,
        row_labels,
        column_labels,
        global_relation_matrix,
        column_labels_relations,
        dim=None):
    r"""
    Compute the Fourier expansions of Jacobi forms (over `\QQ`) of weight `k` and 
    index `L` (an even symmetric matrix) up to given precision.

    NOTE:
    
    In case ``relation_precision`` is not ``None``, we assume that it is of the form
    `\{ (n, r) : n < B \}`, where `B` is the index of the filter.
    
    INPUT:
    
    - ``precision`` -- A filter for Jacobi forms of arbitrary index.
    
    - `k` -- An integer.
    
    - ``relation_precision`` -- A filter for Jacobi forms or ``None`` (default: ``None``).
    
    OUTPUT:
    
    - A list of elements of the corresponding Fourier expansion module.
    
    TESTS:
    
    See ``_test__coefficient_by_restriction`` for further tests.
    
    ::
    
        sage: from psage.modform.jacobiforms.jacobiformd1_fourierexpansion import *
        sage: from psage.modform.jacobiforms.jacobiformd1_fegenerators import _coefficient_by_restriction
        sage: indices = JacobiFormD1Indices(QuadraticForm(matrix(2, [2,1,1,2])))
        sage: precision = indices.filter(20)
        sage: relation_precision = indices.filter(10)
        sage: _coefficient_by_restriction(precision, 10) == _coefficient_by_restriction(precision, 10, relation_precision) 
        True
    """
    L = precision.jacobi_index()
    Lmat = L.matrix()
    Lmat.set_immutable()

    if dim is None:
        dim = dimension__jacobi(k, Lmat)

    if relation_precision == precision:
        assert column_labels == column_labels_relations
    if column_labels != column_labels_relations:
        row_groups__small = [
            len(
                filter(lambda (n, r): n < relation_precision.index(),
                       row_labels[m].keys())) for (_, m, _, _) in row_groups
        ]
Example #4
0
def _coefficient_by_restriction(precision, k, relation_precision=None):
    r"""
    Compute the Fourier expansions of Jacobi forms (over `\QQ`) of weight `k` and 
    index `L` (an even symmetric matrix) up to given precision.
    
    ALGORITHM:
    
    See [Raum, Computing vector valued modular forms and Jacobi forms]. The algorithm will be applied for precision ``relation_precision``.
    The remaining Fourier coefficients will be determined using fewer restrictions.
    
    NOTE:
    
    In case ``relation_precision`` is not ``None``, we assume that it is of the form
    `\{ (n, r) : n < B \}`, where `B` is the index of the filter.
    
    INPUT:
    
    - ``precision`` -- A filter for Jacobi forms of arbitrary index.
    
    - `k` -- An integer.
    
    - ``relation_precision`` -- A filter for Jacobi forms or ``None`` (default: ``None``).
    
    OUTPUT:
    
    - A list of elements of the corresponding Fourier expansion module.
    
    TESTS:
    
    See ``_test__coefficient_by_restriction`` for further tests.
    
    ::
    
        sage: from psage.modform.jacobiforms.jacobiformd1_fourierexpansion import *
        sage: from psage.modform.jacobiforms.jacobiformd1_fegenerators import _coefficient_by_restriction
        sage: indices = JacobiFormD1Indices(QuadraticForm(matrix(2, [2,1,1,2])))
        sage: precision = indices.filter(20)
        sage: relation_precision = indices.filter(10)
        sage: _coefficient_by_restriction(precision, 10) == _coefficient_by_restriction(precision, 10, relation_precision) 
        True
    """
    L = precision.jacobi_index()
    Lmat = L.matrix()
    Lmat.set_immutable()

    global _coefficient_by_restriction__cache
    try:
        expansions = _coefficient_by_restriction__cache[(k, Lmat)]

        if len(expansions) == 0 \
          or expansions[0].precision() >= precision :
            ## TODO: This should be checked in the framework
            return [f.truncate(precision) for f in expansions]
    except KeyError:
        pass

    dim = dimension__jacobi(k, Lmat)
    if dim == 0:
        return []

    if relation_precision is None:
        relation_precision = precision

    R = precision.monoid()._r_representatives
    S_extended = _find_complete_set_of_restriction_vectors(
        L, R, reduction_function=precision.monoid().reduce_r)
    S = list()
    for (s, _) in S_extended:
        if s not in S:
            S.append(s)
    max_S_length = max([L(s) for s in S])
    B_correction = 1 + (k + max_S_length) // 12
    if precision.index() < B_correction:
        precision = precision.monoid().filter(B_correction)
    if relation_precision.index() < B_correction:
        relation_precision = precision.monoid().filter(B_correction)

    (global_restriction_matrix__big, row_groups, row_labels, column_labels, global_relation_matrix, column_labels_relations) = \
        _prepare_coefficient_by_restriction(precision, k, relation_precision, S)

    expansions = _coefficient_by_restriction__with_restriction_matrix(
        precision, k, relation_precision, global_restriction_matrix__big,
        row_groups, row_labels, column_labels, global_relation_matrix,
        column_labels_relations, dim)

    _coefficient_by_restriction__cache[(k, Lmat)] = expansions
    return expansions
 def _rank(self, K) :
     if K is QQ or K in NumberFields() :
         return dimension__jacobi( self.__weight, QuadraticForm(matrix(1, [2 * self.__index])) )
                 
     raise NotImplementedError
 def _rank(self, K) :
     return dimension__jacobi(self.__weight, self.__index)