Ticket #4307: trac4307-ssmod_init.patch

File trac4307-ssmod_init.patch, 2.4 KB (added by AlexGhitza, 13 years ago)
  • sage/modular/ssmod/ssmod.py

    # HG changeset patch
    # User Alexandru Ghitza <aghitza@alum.mit.edu>
    # Date 1224302560 -39600
    # Node ID ce6f28d24dfd6e5c7063c97a378f4cafc8b68519
    # Parent  ba420fedb04b39498ada0613da9109a0c3cdd6fa
    trac 4307: fix error messages in SupersingularModule constructor
    
    diff -r ba420fedb04b -r ce6f28d24dfd sage/modular/ssmod/ssmod.py
    a b  
    580580    return FF(j_invss)
    581581
    582582class SupersingularModule(hecke.HeckeModule_free_module):
     583    r"""
     584    The module of supersingular points in a given characteristic, with
     585    given level structure.
     586
     587    The characteristic must not divide the level.
     588
     589    NOTE: Currently, only level 1 is implemented.
     590
     591    EXAMPLES:
     592        sage: S = SupersingularModule(17)
     593        sage: S
     594        Module of supersingular points on X_0(1)/F_17 over Integer Ring
     595        sage: S = SupersingularModule(16)
     596        Traceback (most recent call last):
     597        ...
     598        ValueError: the argument prime must be a prime number
     599        sage: S = SupersingularModule(prime=17, level=34)
     600        Traceback (most recent call last):
     601        ...
     602        ValueError: the argument level must be coprime to the argument prime
     603        sage: S = SupersingularModule(prime=17, level=5)
     604        Traceback (most recent call last):
     605        ...
     606        NotImplementedError: supersingular modules of level > 1 not yet implemented
     607    """
    583608    def __init__(self, prime=2, level=1, base_ring=rings.IntegerRing()):
     609        if not prime.is_prime():
     610            raise ValueError, "the argument prime must be a prime number"
     611        if prime.divides(level):
     612            raise ValueError, "the argument level must be coprime to the argument prime"
     613        if level != 1:
     614            raise NotImplementedError, "supersingular modules of level > 1 not yet implemented"
    584615        self.__prime = prime
    585616        self.__finite_field = rings.FiniteField(prime**2,'a')
    586617        self.__level = level
     
    594625
    595626    def dimension(self):
    596627        r"""
    597         This function returns the dimension of the space of modular
    598         forms of weight 2 and level equal to the level associated to
    599         self.
     628        Return the dimension of the space of modular forms of weight 2
     629        and level equal to the level associated to self.
    600630
    601631        INPUT:
    602632            self -- SupersingularModule object