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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167
|
import sys
import os
from files import HOME
sys.path.append(os.path.join(HOME, 'lmfdb'))
from lmfdb import db
db.create_table(name='ec_curvedata',
search_columns={
'text': ['Clabel', 'lmfdb_label', 'Ciso', 'lmfdb_iso'],
'numeric': ['regulator', 'absD', 'faltings_height', 'stable_faltings_height'],
'numeric[]': ['ainvs', 'jinv', 'min_quad_twist_ainvs'],
'smallint': ['iso_nlabel', 'Cnumber', 'lmfdb_number', 'cm', 'num_bad_primes',
'optimality', 'manin_constant', 'torsion', 'rank',
'analytic_rank', 'signD', 'class_deg', 'class_size',
'min_quad_twist_disc', 'faltings_index', 'faltings_ratio'],
'smallint[]': ['isogeny_degrees', 'nonmax_primes', 'torsion_structure', 'torsion_primes', 'sha_primes'],
'integer': ['conductor', 'nonmax_rad', 'num_int_pts', 'sha'],
'integer[]': ['bad_primes'],
'bigint': ['degree'],
'boolean': ['semistable', 'potential_good_reduction'],
},
label_col='lmfdb_label',
sort=['conductor', 'iso_nlabel', 'lmfdb_number'],
id_ordered=True
)
db.create_table(name='ec_localdata',
search_columns={
'text': ['lmfdb_label'],
'smallint': ['tamagawa_number', 'kodaira_symbol', 'reduction_type', 'root_number', 'conductor_valuation', 'discriminant_valuation', 'j_denominator_valuation'],
'integer': ['prime']
},
label_col='lmfdb_label',
sort=['lmfdb_label', 'prime'],
id_ordered=False
)
db.create_table(name='ec_mwbsd',
search_columns={
'text': ['lmfdb_label'],
'numeric': ['special_value', 'real_period', 'area', 'sha_an'],
'integer': ['tamagawa_product'],
'smallint': ['ngens'],
'smallint[]': ['rank_bounds'],
'numeric[]': ['torsion_generators', 'xcoord_integral_points', 'gens', 'heights'],
},
label_col='lmfdb_label',
sort=['lmfdb_label'],
id_ordered=False
)
db.create_table(name='ec_classdata',
search_columns={
'text': ['lmfdb_iso'],
'bigint': ['trace_hash'],
'smallint': ['class_size', 'class_deg'],
'smallint[]': ['isogeny_matrix', 'aplist', 'anlist'],
},
label_col='lmfdb_iso',
sort=['lmfdb_iso'],
id_ordered=False
)
db.create_table(name='ec_2adic',
search_columns={
'text': ['lmfdb_label', 'twoadic_label'],
'smallint': ['twoadic_index', 'twoadic_log_level'],
'smallint[]': ['twoadic_gens'],
},
label_col='lmfdb_label',
sort=['lmfdb_label'],
id_ordered=False
)
db.create_table(name='ec_galrep',
search_columns={
'text': ['lmfdb_label', 'image'],
'smallint': ['prime'],
},
label_col='lmfdb_label',
sort=['lmfdb_label', 'prime'],
id_ordered=False
)
db.create_table(name='ec_torsion_growth',
search_columns={
'text': ['lmfdb_label'],
'smallint': ['degree'],
'numeric[]': ['field'],
'smallint[]': ['torsion'],
},
label_col='lmfdb_label',
sort=['lmfdb_label', 'degree'],
id_ordered=False
)
db.create_table(name='ec_iwasawa',
search_columns={
'text': ['lmfdb_label'],
'smallint': ['iwp0'],
'jsonb': ['iwdata'],
},
label_col='lmfdb_label',
sort=['lmfdb_label'],
id_ordered=False
)
####### Indexes ##############
db.ec_curvedata.create_index(['isogeny_degrees'], type='gin')
db.ec_curvedata.create_index(['nonmax_primes'], type='gin')
db.ec_curvedata.create_index(['ainvs'], type='btree')
db.ec_curvedata.create_index(['cm'], type='btree')
db.ec_curvedata.create_index(['conductor', 'iso_nlabel', 'lmfdb_number'], type='btree')
db.ec_curvedata.create_index(['Ciso'], type='btree')
db.ec_curvedata.create_index(['jinv', 'id'], type='btree')
db.ec_curvedata.create_index(['Clabel'], type='btree')
db.ec_curvedata.create_index(['Clabel', 'Cnumber'], type='btree')
db.ec_curvedata.create_index(['lmfdb_label'], type='btree')
db.ec_curvedata.create_index(['lmfdb_label', 'lmfdb_number'], type='btree')
db.ec_curvedata.create_index(['lmfdb_iso'], type='btree')
db.ec_curvedata.create_index(['lmfdb_number'], type='btree')
db.ec_curvedata.create_index(['Cnumber'], type='btree')
db.ec_curvedata.create_index(['rank'], type='btree')
db.ec_curvedata.create_index(['rank', 'lmfdb_number'], type='btree')
db.ec_curvedata.create_index(['sha', 'id'], type='btree')
db.ec_curvedata.create_index(['sha', 'rank', 'id'], type='btree')
db.ec_curvedata.create_index(['sha', 'rank', 'torsion', 'id'], type='btree')
db.ec_curvedata.create_index(['torsion'], type='btree')
db.ec_curvedata.create_index(['torsion_structure'], type='btree')
db.ec_curvedata.create_index(['nonmax_rad', 'id'], type='btree')
db.ec_curvedata.create_index(['id'], type='btree')
db.ec_curvedata.create_index(['semistable'], type='btree')
db.ec_curvedata.create_index(['semistable', 'conductor', 'iso_nlabel', 'lmfdb_number'], type='btree')
db.ec_curvedata.create_index(['potential_good_reduction'], type='btree')
db.ec_curvedata.create_index(['potential_good_reduction', 'conductor', 'iso_nlabel', 'lmfdb_number'], type='btree')
db.ec_curvedata.create_index(['class_size'], type='btree')
db.ec_curvedata.create_index(['class_deg'], type='btree')
db.ec_curvedata.create_index(['conductor'], type='btree')
db.ec_curvedata.create_index(['absD'], type='btree')
db.ec_curvedata.create_index(['faltings_height'], type='btree')
db.ec_curvedata.create_index(['stable_faltings_height'], type='btree')
db.ec_classdata.create_index(['lmfdb_iso'], type='btree')
db.ec_classdata.create_index(['conductor'], type='btree')
db.ec_localdata.create_index(['lmfdb_label'], type='btree')
db.ec_localdata.create_index(['lmfdb_label', 'prime'], type='btree')
db.ec_localdata.create_index(['conductor'], type='btree')
db.ec_mwbsd.create_index(['lmfdb_label'], type='btree')
db.ec_mwbsd.create_index(['conductor'], type='btree')
db.ec_2adic.create_index(['lmfdb_label'], type='btree')
db.ec_2adic.create_index(['conductor'], type='btree')
db.ec_galrep.create_index(['lmfdb_label'], type='btree')
db.ec_galrep.create_index(['lmfdb_label', 'prime'], type='btree')
db.ec_galrep.create_index(['conductor'], type='btree')
db.ec_torsion_growth.create_index(['lmfdb_label'], type='btree')
db.ec_torsion_growth.create_index(['lmfdb_label', 'degree'], type='btree')
db.ec_torsion_growth.create_index(['conductor'], type='btree')
db.ec_iwasawa.create_index(['lmfdb_label'], type='btree')
db.ec_iwasawa.create_index(['conductor'], type='btree')
|