Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/libs/cremona/constructor.py
4057 views
1
def CremonaModularSymbols(level, sign=0, cuspidal=False, verbose=0):
2
"""
3
Return the space of Cremona modular symbols with given level, sign, etc.
4
5
INPUT:
6
7
- ``level`` -- an integer >= 2 (at least 2, not just positive!)
8
- ``sign`` -- an integer either 0 (the default) or 1 or -1.
9
- ``cuspidal`` -- (default: False); if True, compute only the cuspidal subspace
10
- ``verbose`` -- (default: False): if True, print verbose information while creating space
11
12
EXAMPLES::
13
14
sage: M = CremonaModularSymbols(43); M
15
Cremona Modular Symbols space of dimension 7 for Gamma_0(43) of weight 2 with sign 0
16
sage: M = CremonaModularSymbols(43, sign=1); M
17
Cremona Modular Symbols space of dimension 4 for Gamma_0(43) of weight 2 with sign 1
18
sage: M = CremonaModularSymbols(43, cuspidal=True); M
19
Cremona Cuspidal Modular Symbols space of dimension 6 for Gamma_0(43) of weight 2 with sign 0
20
sage: M = CremonaModularSymbols(43, cuspidal=True, sign=1); M
21
Cremona Cuspidal Modular Symbols space of dimension 3 for Gamma_0(43) of weight 2 with sign 1
22
23
When run interactively, the following command will display verbose output::
24
25
sage: M = CremonaModularSymbols(43, verbose=1); M # not tested, since verbose output goes to stderr.
26
After 2-term relations, ngens = 22
27
predicted value of ngens = 22
28
ngens = 22
29
maxnumrel = 22
30
relation matrix has = 484 entries...
31
Finished 3-term relations: numrel = 17 ( maxnumrel = 22)
32
predicted value of ntriangles = 16 --WRONG!
33
Computing kernel...
34
rk = 7
35
About to compute cusps
36
ncusps = 2
37
About to compute matrix of delta
38
delta matrix done: size 2x7.
39
About to compute kernel of delta
40
done
41
Finished constructing homspace.
42
Cremona Modular Symbols space of dimension 7 for Gamma_0(43) of weight 2 with sign 0
43
44
The input must be valid or a ValueError is raised::
45
46
sage: M = CremonaModularSymbols(-1)
47
Traceback (most recent call last):
48
...
49
ValueError: the level (= -1) must be at least 2
50
sage: M = CremonaModularSymbols(0)
51
Traceback (most recent call last):
52
...
53
ValueError: the level (= 0) must be at least 2
54
55
The sign can only be 0 or 1 or -1::
56
57
sage: M = CremonaModularSymbols(10, sign = -2)
58
Traceback (most recent call last):
59
...
60
ValueError: sign (= -2) is not supported; use 0, +1 or -1
61
62
We do allow -1 as a sign (see #9476)::
63
64
sage: CremonaModularSymbols(10, sign = -1)
65
Cremona Modular Symbols space of dimension 0 for Gamma_0(10) of weight 2 with sign -1
66
"""
67
from homspace import ModularSymbols
68
return ModularSymbols(level=level, sign=sign, cuspidal=cuspidal, verbose=verbose)
69
70