def __init__(self, K, F, minimal_ramification=1): minimal_ramification = ZZ(minimal_ramification) # print "entering WeakPadicGaloisExtension with" # print "F = %s"%F # if F is a polynomial, replace it by the list of its irreducible factors # if isinstance(F, Polynomial): # F = [f for f, m in F.factor()] assert K.is_Qp(), "for the moment, K has to be Q_p" # assert not K.p().divides(minimal_ramification), "minimal_ramification has to be prime to p" if not isinstance(F, Polynomial): if F == []: F = PolynomialRing(K.number_field(), 'x')(1) else: F = prod(F) self._base_field = K L = K.weak_splitting_field(F) e = ZZ(L.absolute_ramification_degree() / K.absolute_ramification_degree()) if not minimal_ramification.divides(e): # enlarge the absolute ramification index of vL # such that minimal_ramification divides e(vL/vK): m = ZZ(minimal_ramification / e.gcd(minimal_ramification)) # assert not self.p().divides(m), "p = %s, m = %s, e = %s,\nminimal_ramification = %s"%(self.p(), m, e, minimal_ramification) L = L.ramified_extension(m) # if m was not prime to p, L/K may not be weak Galois anymore else: m = ZZ(1) self._extension_field = L self._ramification_degree = e * m self._degree = ZZ(L.absolute_degree() / K.absolute_degree()) self._inertia_degree = ZZ(L.absolute_inertia_degree() / K.absolute_inertia_degree()) assert self._degree == self._ramification_degree * self._inertia_degree
def get_cusp_expansions_of_newform(k, N=1, fi=0, prec=10): r""" Get and return Fourier coefficients of all cusps where there exist Atkin-Lehner involutions for these cusps. INPUT: - ''k'' -- positive integer : the weight - ''N'' -- positive integer (default 1) : level - ''fi'' -- non-neg. integer (default 0) We want to use the element nr. fi f=Newforms(N,k)[fi] - ''prec'' -- integer (the number of coefficients to get) OUTPUT: - ''s'' string giving the Atkin-Lehner eigenvalues corresponding to the Cusps (where possible) """ res = dict() (t, f) = _get_newform(k, N, 0, fi) if (not t): return s res[Infinity] = 1 for c in f.group().cusps(): if (c == Cusp(Infinity)): continue res[c] = list() cusp = QQ(c) q = cusp.denominator() p = cusp.numerator() d = ZZ(cusp * N) if (d == 0): ep = f.atkin_lehner_eigenvalue() if (d.divides(N) and gcd(ZZ(N / d), ZZ(d)) == 1): ep = f.atkin_lehner_eigenvalue(ZZ(d)) else: # this case is not known... res[c] = None continue res[c] = ep s = html.table([res.keys(), res.values()]) return s
def get_cusp_expansions_of_newform(k, N=1, fi=0, prec=10): r""" Get and return Fourier coefficients of all cusps where there exist Atkin-Lehner involutions for these cusps. INPUT: - ''k'' -- positive integer : the weight - ''N'' -- positive integer (default 1) : level - ''fi'' -- non-neg. integer (default 0) We want to use the element nr. fi f=Newforms(N,k)[fi] - ''prec'' -- integer (the number of coefficients to get) OUTPUT: - ''s'' string giving the Atkin-Lehner eigenvalues corresponding to the Cusps (where possible) """ res = dict() (t, f) = _get_newform(k, N, 0, fi) if(not t): return s res[Infinity] = 1 for c in f.group().cusps(): if(c == Cusp(Infinity)): continue res[c] = list() cusp = QQ(c) q = cusp.denominator() p = cusp.numerator() d = ZZ(cusp * N) if(d == 0): ep = f.atkin_lehner_eigenvalue() if(d.divides(N) and gcd(ZZ(N / d), ZZ(d)) == 1): ep = f.atkin_lehner_eigenvalue(ZZ(d)) else: # this case is not known... res[c] = None continue res[c] = ep s = html.table([res.keys(), res.values()]) return s
#ar = ArtinRepresentation('2.2e3_3e2.6t5.1c1') baselabel = label.split('c') a = rep.find_one({'Baselabel': baselabel[0]}) ar = ArtinRepresentation(label) outfile = open(label, 'w') cf = a['CharacterField'] cfz = ZZ(cf) nf = ar.nf() nfcc = nf.conjugacy_classes() nfcc = [int(z.order()) for z in nfcc] nfcc = lcm(nfcc) if not cfz.divides(nfcc): print("Failure " + str(cfz) + " divides " + str(nfcc) + " from " + label) sys.exit() R, x = QQ['x'].objgen() pol1 = R.cyclotomic_polynomial(nfcc) K, z = NumberField(R.cyclotomic_polynomial(nfcc), 'z').objgen() RR, y = K['y'].objgen() zsmall = z**(nfcc / cfz) allpols = [ sum(y**k * sum(pp[k][j] * zsmall**j for j in range(len(pp[k]))) for k in range(len(pp))) for pp in ar.local_factors_table() ] allroots = [myroots(pp, nfcc, z) for pp in allpols] outfile.write(str(nfcc) + "\n") outfile.write(str(allroots) + "\n")
def char_order_valid(m, ell): """Return True iff the positive integer m has the form (ell^k)*m1 where m1 is 1 mod ell """ m1 = ZZ(m).prime_to_m_part(ell) return m1.divides(ell-1)
baselabel=label.split('c') a = rep.find_one({'Baselabel': baselabel[0]}) ar=ArtinRepresentation(label) outfile=open(label, 'w') cf=a['CharacterField'] cfz = ZZ(cf) nf = ar.nf() nfcc = nf.conjugacy_classes() nfcc = [int(z.order()) for z in nfcc] nfcc = lcm(nfcc) if not cfz.divides(nfcc): print "Failure "+str(cfz)+" divides "+str(nfcc)+" from "+label sys.exit() R,x = QQ['x'].objgen() pol1 = R.cyclotomic_polynomial(nfcc) K,z=NumberField(R.cyclotomic_polynomial(nfcc),'z').objgen() RR,y = K['y'].objgen() zsmall = z**(nfcc/cfz) allpols = [sum(y**k * sum(pp[k][j] * zsmall**j for j in range(len(pp[k]))) for k in range(len(pp))) for pp in ar.local_factors_table()] allroots = [myroots(pp, nfcc, z) for pp in allpols] outfile.write(str(nfcc)+"\n") outfile.write(str(allroots)+"\n") j=0 p=1 while j<bound: