Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
AndrewVSutherland
GitHub Repository: AndrewVSutherland/lmfdb
Path: blob/main/scripts/belyi/old/sample_example.py
1128 views
1
import db
2
Cw = db.getDBconnection_write()
3
4
belyidb = Cw['belyi']
5
passports = belyidb['passports']
6
galmaps = belyidb['galmaps']
7
8
# sample passport
9
sample_pass = {
10
'plabel':'6T15-[5,5,5]-51-51-51-g1',
11
'deg' : 6,
12
'group' : '6T15',
13
'geomtype' : 'H',
14
'abc' : [5,5,5],
15
'lambdas' : [[5,1], [5,1], [5,1]],
16
'g' : 1,
17
'maxdegbf' : 2,
18
'pass_size' : 8,
19
'num_orbits' : 3
20
}
21
22
# sample galmap
23
sample_galmap = {
24
'label':'6T15-[5,5,5]-51-51-51-g1-a',
25
'plabel' : '6T15-[5,5,5]-51-51-51-g1',
26
'triples' : [[[ 2, 3, 4, 5, 1, 6 ],[ 3, 1, 4, 6, 5, 2 ],[ 5, 2, 6, 1, 3, 4 ]],[[ 2, 3, 4, 5, 1, 6 ],[ 1, 3, 5, 6, 4, 2 ],[ 3, 1, 6, 2, 5, 4 ]]],
27
'aut_group' : [[ 3, 6, 5, 2, 1, 4 ],[ 5, 4, 1, 6, 2, 3 ]],
28
'base_field' : [4,-1,1],
29
'embeddings' : [[0.500000, 1.93649], [0.500000, -1.93649]],
30
'curve' : "y^2 = x^3 + 1/160000*(657*nu - 5076)*x + 1/6400000*(-20013*nu - 34044)",
31
'map' :"(1/200000*(11745*nu - 17172)*x^2 + 1/625000*(19197*nu - 41796)*x + 1/32000000000*(12725667*nu - 373299516))/(x^6 + 1/200*(21*nu + 12)*x^5 + 1/32000*(1935*nu + 8532)*x^4 + 1/3200000*(-106701*nu + 262020)*x^3 + 1/5120000000*(-28837917*nu - 9389628)*x^2 + 1/5120000000000*(70827885*nu - 3813131268)*x + 1/4096000000000000*(36228501693*nu - 41819362884))*y + (1/200000*(-11745*nu + 17172)*x^3 + 1/80000000*(-26973*nu + 1192644)*x^2 + 1/160000000000*(668868435*nu + 309542148)*x + 1/64000000000000*(35387022501*nu - 38387253348))/(x^6 + 1/200*(21*nu + 12)*x^5 + 1/32000*(1935*nu + 8532)*x^4 + 1/3200000*(-106701*nu + 262020)*x^3 + 1/5120000000*(-28837917*nu - 9389628)*x^2 + 1/5120000000000*(70827885*nu - 3813131268)*x + 1/4096000000000000*(36228501693*nu - 41819362884))",
32
'orbit_size' : 2,
33
'deg' : 6,
34
'group' : '6T15',
35
'geomtype' : 'H',
36
'abc' : [5,5,5],
37
'abc_sorted' : [5,5,5],
38
'lambdas' : [[5,1], [5,1], [5,1]],
39
'g' : 1
40
}
41
42
# insert the sample passport
43
passports.insert_one(sample_pass)
44
45
# insert the sample galmap
46
galmaps.insert_one(sample_galmap)
47
48
# loops over all passports
49
for elt in passports.find():
50
for key, val in elt.items():
51
print("%s : %s") % (key, val.__repr__())
52
53
for elt in galmaps.find():
54
for key, val in elt.items():
55
print("%s : %s") % (key, val.__repr__())
56
57
print("############")
58
print("############")
59
60
# passports.delete_one({'plabel':'6T15-[5,5,5]-51-51-51-g1'})
61
passports.find().count()
62
63