Path: blob/master/src/sage/libs/cremona/constructor.py
8815 views
def CremonaModularSymbols(level, sign=0, cuspidal=False, verbose=0):1"""2Return the space of Cremona modular symbols with given level, sign, etc.34INPUT:56- ``level`` -- an integer >= 2 (at least 2, not just positive!)7- ``sign`` -- an integer either 0 (the default) or 1 or -1.8- ``cuspidal`` -- (default: False); if True, compute only the cuspidal subspace9- ``verbose`` -- (default: False): if True, print verbose information while creating space1011EXAMPLES::1213sage: M = CremonaModularSymbols(43); M14Cremona Modular Symbols space of dimension 7 for Gamma_0(43) of weight 2 with sign 015sage: M = CremonaModularSymbols(43, sign=1); M16Cremona Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 117sage: M = CremonaModularSymbols(43, cuspidal=True); M18Cremona Cuspidal Modular Symbols space of dimension 6 for Gamma_0(43) of weight 2 with sign 019sage: M = CremonaModularSymbols(43, cuspidal=True, sign=1); M20Cremona Cuspidal Modular Symbols space of dimension 3 for Gamma_0(43) of weight 2 with sign 12122When run interactively, the following command will display verbose output::2324sage: M = CremonaModularSymbols(43, verbose=1); M # not tested, since verbose output goes to stderr.25After 2-term relations, ngens = 2226predicted value of ngens = 2227ngens = 2228maxnumrel = 2229relation matrix has = 484 entries...30Finished 3-term relations: numrel = 17 ( maxnumrel = 22)31predicted value of ntriangles = 16 --WRONG!32Computing kernel...33rk = 734About to compute cusps35ncusps = 236About to compute matrix of delta37delta matrix done: size 2x7.38About to compute kernel of delta39done40Finished constructing homspace.41Cremona Modular Symbols space of dimension 7 for Gamma_0(43) of weight 2 with sign 04243The input must be valid or a ValueError is raised::4445sage: M = CremonaModularSymbols(-1)46Traceback (most recent call last):47...48ValueError: the level (= -1) must be at least 249sage: M = CremonaModularSymbols(0)50Traceback (most recent call last):51...52ValueError: the level (= 0) must be at least 25354The sign can only be 0 or 1 or -1::5556sage: M = CremonaModularSymbols(10, sign = -2)57Traceback (most recent call last):58...59ValueError: sign (= -2) is not supported; use 0, +1 or -16061We do allow -1 as a sign (see #9476)::6263sage: CremonaModularSymbols(10, sign = -1)64Cremona Modular Symbols space of dimension 0 for Gamma_0(10) of weight 2 with sign -165"""66from homspace import ModularSymbols67return ModularSymbols(level=level, sign=sign, cuspidal=cuspidal, verbose=verbose)686970