-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sage
More file actions
49 lines (37 loc) · 1.52 KB
/
script.sage
File metadata and controls
49 lines (37 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
r"""
SageMath script that execute the functions defined in `relation.sage`.
The results are saved in a text file.
"""
load('relations.sage')
if __name__=='__main__':
name_of_text_file = 'result' #Choose the name of the results text file
o = open(name_of_text_file + '.txt','w')
text = """
The rows of the relation matrix gives the coefficients of the relations.
For example, if G = Gamma0(6), the relation matrix is
[ 0 0 1 -1 2 11]
so a polynomial relation in weight 4 is given by:
g1*g3 - g2^2 + 2*g2*g3 + 11*g3^2 = 0
where g1, g2 and g3 are generators for M(Gamma0(6))
\n"""
print("Writing on file 'result.txt' ")
o.write(text)
G = Gamma0 # The code currently only works for Gamma0
k = 4
maxN = 25 # Maximum level
print("Maximum level: %s"%(maxN))
verbose = False # Set this to True if you want more console outputs
for N in range(1,maxN+1):
M = ModularFormsRing(G(N))
if verbose:
print("Group: %s, Weight: %s"%(G(N), k))
if check_generators_weights(M):
#k = weights_of_generators(M)[0]
relation_matrix = relations(M, k)
o.write("Group: %s, Weight: %s \nRelation matrix: \n"%(G(N), k))
o.write(relation_matrix.str() + "\n\n")
print(check_generators_relations(M, relation_matrix, k))
if not check_generators_relations(M, relation_matrix, k):
print("Problem detected ---> Group: %s, Weight: %s !"%(M, G(N), k))
print("End of computations")
o.close()