def aplist(E, B=100): """ Compute aplist for an elliptic curve E over Q(sqrt(5)), as a string->number dictionary. INPUT: - E -- an elliptic curve - B -- a positive integer (default: 100) OUTPUT: - dictionary mapping strings (labeled primes) to Python ints, with keys the primes of P with norm up to B such that the norm of the conductor is coprime to the characteristic of P. """ from psage.modform.hilbert.sqrt5.tables import canonical_gen v = {} from psage.modform.hilbert.sqrt5.sqrt5 import F labels, primes = labeled_primes_of_bounded_norm(F, B) from sage.all import ZZ N = E.conductor() try: N = ZZ(N.norm()) except: N = ZZ(N) for i in range(len(primes)): p = primes[i] k = p.residue_field() if N.gcd(k.cardinality()) == 1: v[labels[i]] = int(k.cardinality() + 1 - E.change_ring(k).cardinality()) return v
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