def form_modsym_from_elliptic_curve(E): r""" Returns the modular symbol (in the sense of Stevens) associated to `E` INPUT: - ``E`` -- OUTPUT: EXAMPLES: """ L = E.padic_lseries(3) #initializing the L-function at 3 to access mod sym data N = E.conductor() from fund_domain import manin_relations manin = manin_relations(N) v = [] R = PolynomialRing(QQ,2,names='X,Y') X,Y = R.gens() for j in range(len(manin.generator_indices())): rj = manin.generator_indices(j) g = manin.coset_reps(rj) a,b,c,d = g.list() if c != 0: a1 = L.modular_symbol(a/c,1)+L.modular_symbol(a/c,-1) else: a1 = L.modular_symbol(oo,1)+L.modular_symbol(oo,-1) if d != 0: a2 = L.modular_symbol(b/d,1)+L.modular_symbol(b/d,-1) else: a2 = L.modular_symbol(oo,1)+L.modular_symbol(oo,-1) v = v + [symk(0,R(a1)) - symk(0,R(a2))] print "manin = ", manin return modsym_symk(v,manin)
def p_stabilize(self,p,alpha): r""" Returns the `p`-stablization of self to level `N*p` on which `U_p` acts by `alpha`. Note that alpha is p-adic and so the resulting symbol is just an approximation to the true p-stabilization (depending on how well alpha is approximated). INPUT: - ``p`` -- prime not dividing the level of self. - ``alpha`` -- eigenvalue for `U_p` OUTPUT: A modular symbol with the same Hecke-eigenvalues as self away from `p` and eigenvalue `alpha` at `p`. EXAMPLES: :: sage: E = EllipticCurve('11a') sage: p = 3 sage: M = 100 sage: R = pAdicField(p,M)['y'] sage: y = R.gen() sage: ap = -1 sage: f = y**2-ap*y+p sage: v = f.roots() sage: alpha = v[0][0] sage: alpha 2 + 3^2 + 2*3^3 + 2*3^4 + 2*3^6 + 3^8 + 2*3^9 + 2*3^11 + 2*3^13 + 3^14 + 2*3^15 + 3^18 + 3^19 + 2*3^20 + 2*3^23 + 2*3^25 + 3^28 + 3^29 + 2*3^32 + 3^33 + 3^34 + 3^36 + 3^37 + 2*3^38 + 3^39 + 3^40 + 2*3^43 + 3^44 + 3^45 + 3^46 + 2*3^48 + 3^49 + 2*3^50 + 3^51 + 3^52 + 3^53 + 3^55 + 3^56 + 3^58 + 3^60 + 3^62 + 3^63 + 2*3^65 + 3^67 + 3^70 + 3^71 + 2*3^73 + 2*3^75 + 2*3^78 + 2*3^79 + 3^82 + 2*3^84 + 3^86 + 3^87 + 3^88 + 3^89 + 2*3^91 + 2*3^92 + 3^93 + 3^94 + 3^95 + O(3^100) sage: alpha^2 - E.ap(3)*alpha + 3 O(3^100) sage: alpha=ZZ(alpha) """ N = self.level() assert N % p != 0, "The level isn't prime to p" pp = Matrix(ZZ,[[p,0],[0,1]]) manin = manin_relations(N*p) v = [] ## this list will contain the data of the p-stabilized symbol of level N*p ## This loop runs through each generator at level Np and computes the value of the ## p-stabilized symbol on each generator. Here the following formula is being used: ## ## (p-stabilize phi with U_p-eigenvalue alpha) = phi - 1/alpha phi | [p,0;0,1] ## --------------------------------------------------------------------------------- for j in range(len(manin.generator_indices())): rj = manin.generator_indices(j) v = v+[self.eval(manin.coset_reps(rj))-self.eval(pp*manin.coset_reps(rj)).act_right(pp).scale(1/alpha)] return modsym_symk(v,manin)
def form_modsym_from_decomposition(A): r""" `A` is a piece of the result from a command like ModularSymbols(---).decomposition() INPUT: - ``A`` -- OUTPUT: EXAMPLES: """ M = A.ambient_module() N = A.level() k = A.weight() manin = manin_relations(N) w = A.dual_eigenvector() K = w.parent().base_field() v = [] R = PolynomialRing(K,2,names='X,Y') X,Y = R.gens() for j in range(len(manin._manin_relations__gens)): rj = manin._manin_relations__gens[j] g = manin._manin_relations__mats[rj] a,b,c,d = g.list() ans = 0 if c<>0: r1 = ZZ(a)/ZZ(c) else: r1 = oo if d<>0: r2 = ZZ(b)/ZZ(d) else: r2 = oo for j in range(k-1): coef = w.dot_product(M.modular_symbol([j,r1,r2]).element()) ans = ans+X**j*Y**(ZZ(k-2-j))*binomial(ZZ(k-2),ZZ(j))*coef v = v+[symk(ZZ(k-2),ans,K)] return modsym_symk(v,manin)