Attachment 'abelian_field_dirichlet_group.sage'
Download 1 def conductor(self):
2 R = self.maximal_order()
3 m = 1
4 for p in R.discriminant().prime_factors():
5 m*=p^(R.fractional_ideal(p).prime_factors()[0].ramification_index().valuation(p)+1)
6 return m
7
8
9 def conductorf(self):
10 m = 1
11 dsc = self.polynomial().discriminant()
12 A = dsc.numerator().prime_factors()+dsc.denominator().prime_factors()
13 for p in A:
14 R = self.maximal_order(p)
15 e = R.fractional_ideal(p).prime_factors()[0].ramification_index()
16 if e!=1:
17 m*=p^(e.valuation(p)+1)
18 return m
19
20
21 def dirichlet_group(self):
22 m = conductor(self)
23 d = self.degree()
24 G = IntegerModRing(m)
25 R = self.ring_of_integers()
26 A = [G.0]
27 j = 2*G.0
28 while (len(A)==euler_phi(m)/d)==False:
29 if (j in A)==False and gcd(j,m)==1:
30 b = j.lift()
31 while b.is_prime()==False:
32 b = b+m
33 c = j^(R.ideal(b).prime_factors()[0].residue_class_degree())
34 k = c
35 B = A
36 if (k in A)==False:
37 while (k==1)==False:
38 for x in A:
39 if (k*x in B)==False:
40 B.append(k*x)
41 k = k*c
42 for y in B:
43 if (y in A)==False:
44 A.append(y)
45 j = j + G.0
46 n = len(A)
47 G = DirichletGroup(m)
48 H = []
49 i = 0
50 while (len(H)==d)==False:
51 t = 0
52 q = 1
53 while t < n and q==1:
54 q = G[i](A[t])
55 t = t+1
56 if t == n:
57 H.append(G[i])
58 i = i+1
59 return H
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.