Attachment 'demo.sage'
Download 1 def problems(E):
2 for d in E.local_data():
3 problems_local(E, d.prime())
4
5 def problems_local(E, P):
6 print "at", P, "we feel",
7 K = E.base_field()
8 d = E.local_data(P)
9 if d.has_good_reduction():
10 print "good :)"
11 elif d.has_nonsplit_multiplicative_reduction():
12 print "nonsplit multiplicative :)"
13 elif d.has_split_multiplicative_reduction():
14 print "split multiplicative :)"
15 else: # additive reduction
16 j = E.j_invariant()
17 jv = j.valuation(P) if not K is QQ else valuation(j, P.gen())
18 if jv < 0:
19 print "bad but potential multiplicative"
20 # potential multiplicative reduction
21 return
22 else:
23 # potential good reduction
24 p = P if K is QQ else P.smallest_integer()
25 if p==2: # prime | 2
26 t = polygen(K)
27 assert E.a1() == 0
28 assert E.a3() == 0
29 f = t^3+E.a2()*t^2+E.a4()*t+E.a6()
30
31 d = 1
32 roots = []
33 for g,_ in f.factor():
34 if g.degree() == 1:
35 roots += g.roots(multiplicities=False)
36 if g.degree() == 2:
37 d = 2
38 K2.<a2> = K.extension(g)
39 # roots += g.change_ring(K2).roots(multiplicities=False)
40 if g.degree() == 3:
41 d = 3
42 K3.<a3> = K.extension(g)
43 for h,_ in g.change_ring(K3).factor():
44 if h.degree() == 1:
45 # roots += h.roots(multiplicities=False)
46 pass
47 if h.degree() == 2:
48 d = 6
49 K6.<a6> = K3.extension(h)
50 print "bad and potential good -- at 2, d=", d, " :("
51 return
52 if p==3: # prime | 3
53 print "bad and potential good -- at 3 :("
54 return
55
56 print "bad and potential good"
57
58
59 # def _root_number_local_3(E, P):
60 # def _val(a, P):
61 # if P.base_ring() is ZZ:
62 # return valuation(a, P.gen())
63 # return a.valuation(P)
64 # def quadr_residue_symbol(a):
65 # return Kr(a).is_square() and 1 or -1
66 # def quadr_symbol(a):
67 # av = _val(a, P)
68 # if av%2==1:
69 # return -1
70 # if P.base_ring() is ZZ:
71 # pi = P.gen()
72 # else:
73 # pi = P.number_field().uniformizer(P)
74 # # print "piv = ", pi.valuation(P)
75 # b = a / pi^av
76 # return quadr_residue_symbol(b)
77 # # assume potential good reduction
78 # Es = E.local_data(P).minimal_model(tidy=False)
79 # Es = Es.short_weierstrass_model(complete_cube=False)
80
81 # disc = Es.discriminant()
82 # vD = _val(disc, P)
83 # Kr = P.residue_field()
84
85 # ks = str(Es.kodaira_symbol(P))
86 # if ks=='I0' or ks=='I0*':
87 # assert vD%2==0, "error -- valuation of discriminant should be even"
88 # return quadr_residue_symbol(-1)^(vD/2)
89 # elif ks=='III' or ks=='III*':
90 # return quadr_residue_symbol(-2)
91 # else:
92 # assert ks=='II' or ks=='II*' or ks=='IV' or ks=='IV*', "error -- unexpected kodeira symbol"
93 # # print "vD = ", vD, disc
94 # d = quadr_symbol(disc)
95 # c = Es.a6()
96 # cv = _val(c, P)
97 # assert cv%3!=0, "error -- 3 should not divide the valuation of the constant term anymore"
98 # # print disc, c, P
99 # hs = generalized_hilbert_symbol(disc, c, P)
100 # # hs = hilbert_symbol_magma(disc, c, P)
101 # qr1 = quadr_residue_symbol(cv)^vD
102 # qr2 = quadr_residue_symbol(-1)^(vD*(vD-1)/2)
103 # # print d, hs, qr1, qr2
104 # return d*hs*qr1*qr2
105
106
107 # def transl_ell_curve_w_2_isog(E, rt):
108 # Echange = E.change_weierstrass_model(1,rt,0,0)
109 # E2 = EllipticCurve(E.base_field(), [0,-2*Echange.a2(),0,Echange.a2()^2-4*Echange.a4(),0])
110 # # print E.is_isogenous(E2)
111 # return E2
112
113 # def _root_number_local_2(E, P):
114 # K = E.base_field()
115
116 # if K is QQ:
117 # rn = -1
118 # else:
119 # rn = (-1)^(P.residue_class_degree() * P.ramification_index())
120
121 # t = polygen(K)
122 # assert E.a1() == 0
123 # assert E.a3() == 0
124 # f = t^3+E.a2()*t^2+E.a4()*t+E.a6()
125
126 # d = 1
127 # roots = []
128 # for g,_ in f.factor():
129 # if g.degree() == 1:
130 # roots += g.roots(multiplicities=False)
131 # if g.degree() == 2:
132 # d = 2
133 # K2.<a2> = K.extension(g)
134 # # roots += g.change_ring(K2).roots(multiplicities=False)
135 # if g.degree() == 3:
136 # d = 3
137 # K3.<a3> = K.extension(g)
138 # for h,_ in g.change_ring(K3).factor():
139 # if h.degree() == 1:
140 # # roots += h.roots(multiplicities=False)
141 # pass
142 # if h.degree() == 2:
143 # d = 6
144 # K6.<a6> = K3.extension(h)
145 # # roots += h.change_ring(K6).roots(multiplicities=False)
146
147 # print "d = ", d
148
149 # def _compute_H(E, P, ord2=True, ord3=False):
150 # t = E.tamagawa_number(P)
151 # if ord2:
152 # cv = valuation(t,2) + _u_of_E(E, P)
153 # H2 = 1 if cv%2==0 else -1
154 # if ord3:
155 # cv = valuation(t,3)
156 # H3 = 1 if cv%2==0 else -1
157 # if ord2 and ord3: return (H2, H3)
158 # if ord2: return H2
159 # return H3
160
161 # def _val(a, P):
162 # if P.base_ring() is ZZ:
163 # return valuation(a, P.gen())
164 # return a.valuation(P)
165
166 # def _u_of_E(E, P):
167 # disc = E.discriminant()
168 # Emin = E.local_data(P).minimal_model(tidy=False)
169 # discmin = Emin.discriminant()
170 # assert _val(discmin, P) == E.local_data(P)._val_disc
171 # # print "quot = ", disc/discmin
172 # # return (disc/discmin).norm()^(1/12)
173 # # print "quot = ", (disc/discmin).valuation(P) / 12
174 # # print "rd = ", P.residue_class_degree()
175 # # if not E.base_field() is QQ:
176 # # print P.ramification_index()
177 # if E.base_field() is QQ:
178 # return Integer(_val(disc/discmin, P) / 12)
179 # else:
180 # return Integer(P.residue_class_degree() * _val(disc/discmin, P) / 12)
181
182 # if d==1:
183 # # print roots
184 # H = _compute_H(E, P)
185 # E1 = transl_ell_curve_w_2_isog(E, roots[0])
186 # H1 = _compute_H(E1, P)
187 # E2 = transl_ell_curve_w_2_isog(E, roots[1])
188 # H2 = _compute_H(E2, P)
189 # E3 = transl_ell_curve_w_2_isog(E, roots[2])
190 # H3 = _compute_H(E3, P)
191 # return rn * H * H1 * H2 * H3
192 # elif d==2:
193 # H = _compute_H(E, P)
194 # # 2-isogenous curve over base field
195 # # print roots[0]
196 # E1 = transl_ell_curve_w_2_isog(E, roots[0]) # root[0] is the root over the base field
197 # # print E1
198 # H1 = _compute_H(E1, P)
199
200 # # a2 in K2 is root not in base field
201 # K2b.<b2> = K2.absolute_field()
202 # from2, to2 = K2b.structure()
203 # # Unfairly picking one prime factor
204 # Pfactors = K2b.ideal([ to2(pgen) for pgen in P.gens() ]).factor()
205 # print Pfactors
206 # P2b = K2b.ideal([ to2(pgen) for pgen in P.gens() ]).factor()[0][0]
207 # E2b = E.change_ring(K2b)
208 # # print E2b
209 # H2 = _compute_H(E2b, P2b)
210 # # print "H2 = ", H2
211
212 # E3b = transl_ell_curve_w_2_isog(E2b, to2(a2))
213 # assert E3b.a6() == 0
214 # H3 = _compute_H(E3b, P2b)
215
216 # return rn * H * H1 * H2 * H3
217 # elif d==3:
218 # # a3 in K3
219 # K3b.<b3> = K3.absolute_field()
220 # from3, to3 = K3b.structure()
221 # # Unfairly picking one prime factor
222 # # print K3b.ideal([ to3(pgen) for pgen in P.gens() ]).factor()
223 # P3b = K3b.ideal([ to3(pgen) for pgen in P.gens() ]).factor()[0][0]
224 # E3b = E.change_ring(K3b)
225 # H = _compute_H(E3b, P3b)
226 # # print "H = ", H
227 # E3bt = transl_ell_curve_w_2_isog(E3b, to3(a3))
228 # H2 = _compute_H(E3bt, P3b)
229 # # print "H2 = ", H2
230 # return rn * H * H2
231 # elif d==6:
232 # # a3 in K3
233 # K3b.<b3> = K3.absolute_field()
234 # from3, to3 = K3b.structure()
235 # # Unfairly picking one prime factor
236 # P3b = K3b.ideal([ to3(pgen) for pgen in P.gens() ]).factor()[0][0]
237 # E3b = E.change_ring(K3b)
238 # H = _compute_H(E3b, P3b)
239
240 # E3bt = transl_ell_curve_w_2_isog(E3b, to3(a3))
241 # H2 = _compute_H(E3bt, P3b)
242
243 # # a6 in K6
244 # K6b.<b6> = K6.absolute_field()
245 # from6, to6 = K6b.structure()
246 # # Unfairly picking one prime factor
247 # P6b = K6b.ideal([ to6(pgen) for pgen in P.gens() ]).factor()[0][0]
248 # E6b = E.change_ring(K6b)
249 # H3, H33 = _compute_H(E6b, P6b, ord2=True, ord3=True)
250
251 # E6bt = transl_ell_curve_w_2_isog(E6b, to6(a6))
252 # H4 = _compute_H(E6bt, P6b)
253
254 # x = polygen(K)
255 # Kd.<d> = K.extension(x^2 - E.discriminant())
256 # KDb.<bd> = Kd.absolute_field()
257 # fromD, toD = KDb.structure()
258 # # Unfairly picking one prime factor
259 # PDb = KDb.ideal([ toD(pgen) for pgen in P.gens() ]).factor()[0][0]
260 # EDb = E.change_ring(KDb)
261 # HD = _compute_H(EDb, PDb, ord2=False, ord3=True)
262
263 # return rn * H * H2 * H3 * H33 * H4 * HD
264
265 # raise NotImplementedError("additive reduction over a prime dividing 2")
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.