def _eval_sl2(self, A): r""" Return the value of self on the unimodular divisor corresponding to `A`. Note that `A` must be in `SL_2(Z)` for this to work. INPUT: - ``A`` -- an element of `SL_2(Z)` OUTPUT: The value of self on the divisor corresponding to `A` -- i.e. on the divisor `{A(0)} - {A(\infty)}`. """ # EXAMPLES:: # # sage: from sage.modular.pollack_stevens.manin_map import M2Z, ManinMap # sage: D = Distributions(0, 11, 10) # sage: MR = ManinRelations(11) # sage: data = {M2Z([1,0,0,1]):D([1,2]), M2Z([0,-1,1,3]):D([3,5]), M2Z([-1,-1,3,2]):D([1,1])} # sage: f = ManinMap(D, MR, data) # sage: A = MR.reps()[1] # sage: f._eval_sl2(A) # (10 + 10*11 + O(11^2), 8 + O(11)) # # """ SN = Sigma0(self._manin._N) A = M2Z(A) B = self._manin.equivalent_rep(A) gaminv = SN(B * M2Z(A).inverse()) return self[B] * gaminv
def __init__(self, Dk, character, adjuster, on_left, dettwist, padic=True): #ensures there's a p in the level. #self._Np = self._Np.lcm(self._p) self._autfactors = {} WeightKAction_generic.__init__(self, Dk, character, adjuster, on_left, dettwist) self._Np = self._Np.lcm(Dk._p) Action.__init__(self, Sigma0(Dk._p ** self._Np.valuation(Dk._p), base_ring=Dk.base_ring().base_ring(), \ adjuster=self._adjuster), Dk, on_left, operator.mul)
def __init__(self, group, coefficients, sign=0, element_class=ModularSymbolElement_generic): R = coefficients.base_ring() Parent.__init__(self, base=R, category=ModularSymbolSpaces(R)) if sign not in (0, -1, 1): # sign must be be 0, -1 or 1 raise ValueError("sign must be 0, -1, or 1") self._group = group self._coefficients = coefficients self.Element = element_class self._sign = sign self._source = ManinRelations(group.level()) try: action = ModSymAction(Sigma0(self.prime()), self) except AttributeError: action = ModSymAction(Sigma0(1), self) self._populate_coercion_lists_(action_list=[action])
def __init__(self, p, base_ring=None, adjuster=None): ## This is a parent in the category of monoids; initialise children Parent.__init__(self, category=Monoids()) self.Element = Sigma0SquaredElement ## base data initialisation self._R = ZZ self._p = p if base_ring is None: base_ring = ZpCA(p, 20) ## create Zp self._Rmod = base_ring ## underlying Sigma_0(p) self._Sigma0 = Sigma0(self._p, base_ring=base_ring, adjuster=adjuster) self._populate_coercion_lists_()
def __init__(self, p, depth): Module.__init__(self, base=ZZ) self._R = ZZ self._p = p self._Rmod = ZpCA(p, depth - 1) self._depth = depth self._pN = self._p**(depth - 1) self._PowerSeries = PowerSeriesRing(self._Rmod, default_prec=self._depth, name='z') self._cache_powers = dict() self._unset_coercions_used() self._Sigma0 = Sigma0(self._p, base_ring=self._Rmod, adjuster=our_adjuster()) self.register_action(Sigma0Action(self._Sigma0, self)) self._populate_coercion_lists_()
def p_stabilize(self, p, alpha, V): r""" Return the `p`-stablization of self to level `N*p` on which `U_p` acts by `alpha`. INPUT: - ``p`` -- a prime. - ``alpha`` -- a `U_p`-eigenvalue. - ``V`` -- a space of modular symbols. OUTPUT: - The image of this ManinMap under the Hecke operator `T_{\ell}` """ # EXAMPLES: # # :: # # sage: E = EllipticCurve('11a') # sage: from sage.modular.pollack_stevens.space import ps_modsym_from_elliptic_curve # sage: phi = ps_modsym_from_elliptic_curve(E) # sage: f = phi._map # sage: V = phi.parent() # sage: f.p_stabilize(5,1,V) # Map from the set of right cosets of Gamma0(11) in SL_2(Z) to Sym^0 Q^2 # """ manin = V.source() S0 = Sigma0(self._codomain._act._Np) pmat = S0([p,0,0,1]) D = {} scalar = 1/alpha one = scalar.parent()(1) for g in map(M2Z, manin.gens()): # we use scale here so that we don't need to define a # construction functor in order to scale by something # outside the base ring. D[g] = self._eval_sl2(g).scale(one) - (self(pmat * g) * pmat).scale(1/alpha) return self.__class__(self._codomain.change_ring(scalar.parent()), manin, D, check=False)
def plus_part(self): r""" Returns the plus part of self -- i.e. self + self | [1,0,0,-1]. Note that we haven't divided by 2. Is this a problem? OUTPUT: - self + self | [1,0,0,-1] EXAMPLES:: sage: MS = OverconvergentModularSymbols(3, p=5, prec_cap=5, weight=2) sage: Phi = MS.random_element() sage: Phi_p = Phi.plus_part() sage: Phi_m = Phi.minus_part() sage: Phi_p + Phi_m == 2 * Phi True sage: Phi_p.minus_part() == 0 True sage: Phi_m.plus_part() == 0 True sage: Phi_p.hecke(2) == Phi.hecke(2).plus_part() True """ # EXAMPLES:: # # sage: E = EllipticCurve('11a') # sage: from sage.modular.pollack_stevens.space import ps_modsym_from_elliptic_curve # sage: phi = ps_modsym_from_elliptic_curve(E); phi.values() # [-1/5, 3/2, -1/2] # sage: (phi.plus_part()+phi.minus_part()) == 2 * phi # True # """ #if sign != 0 could simply return 2*self or 0 accordingly S0N = Sigma0(self.parent().level()) return self + self * S0N(minusproj)
def hecke(self, ell, algorithm = 'prep'): r""" Return the image of this Manin map under the Hecke operator `T_{\ell}`. INPUT: - ``ell`` -- a prime - ``algorithm`` -- a string, either 'prep' (default) or 'naive' OUTPUT: - The image of this ManinMap under the Hecke operator `T_{\ell}` """ # EXAMPLES: # # :: # # sage: E = EllipticCurve('11a') # sage: from sage.modular.pollack_stevens.space import ps_modsym_from_elliptic_curve # sage: phi = ps_modsym_from_elliptic_curve(E) # sage: phi.values() # [-1/5, 3/2, -1/2] # sage: phi.is_Tq_eigensymbol(7,7,10) # True # sage: phi.hecke(7).values() # [2/5, -3, 1] # sage: phi.Tq_eigenvalue(7,7,10) # -2 # """ verbose("Compute full data.") self.compute_full_data() self.normalize() M = self._manin if algorithm == 'prep': ## psi will denote self | T_ell psi = {} for g in M.gens(): verbose("Looping over generators; at generator %s"%(g)) ## v is a dictionary so that the value of self | T_ell ## on g is given by ## sum_h sum_A self(h) * A ## where h runs over all coset reps and A runs over ## the entries of v[h] (a list) # verbose("prepping for T_%s: %s"%(ell, g), level = 2) v = M.prep_hecke_on_gen(ell, g) psi[g] = self._codomain.zero_element() for h in M: for A in v[h]: psi[g] += self[h] * A psi[g].normalize() return self.__class__(self._codomain, self._manin, psi, check=False) elif algorithm == 'naive': S0N = Sigma0(self._manin.level()) psi = self._right_action(S0N([1,0,0,ell])) for a in range(1, ell): psi += self._right_action(S0N([1,a,0,ell])) if self._manin.level() % ell != 0: psi += self._right_action(S0N([ell,0,0,1])) return psi.normalize()
def __init__(self, codomain, manin_relations, defining_data, check=True): """ INPUT: - ``codomain`` -- coefficient module - ``manin_relations`` -- a ManinRelations object - ``defining_data`` -- a dictionary whose keys are a superset of manin_relations.gens() and a subset of manin_relations.reps(), and whose values are in the codomain. - ``check`` -- do numerous (slow) checks and transformations to ensure that the input data is perfect. """ # EXAMPLES:: # # sage: from sage.modular.pollack_stevens.manin_map import M2Z, ManinMap # sage: D = Distributions(0, 11, 10) # sage: manin = sage.modular.pollack_stevens.fund_domain.ManinRelations(11) # sage: data = {M2Z([1,0,0,1]):D([1,2]), M2Z([0,-1,1,3]):D([3,5]), M2Z([-1,-1,3,2]):D([1,1])} # sage: f = ManinMap(D, manin, data); f # indirect doctest # Map from the set of right cosets of Gamma0(11) in SL_2(Z) to Space of 11-adic distributions with k=0 action and precision cap 10 # sage: f(M2Z([1,0,0,1])) # (1 + O(11^2), 2 + O(11)) # # TESTS: # # Test that it fails gracefully on some bogus inputs:: # # sage: rels = ManinRelations(37) # sage: ManinMap(ZZ, rels, {}) # Traceback (most recent call last): # ... # ValueError: Codomain must have an action of Sigma0(N) # sage: ManinMap(Symk(0), rels, []) # Traceback (most recent call last): # ... # ValueError: length of defining data must be the same as number of Manin generators # """ self._codomain = codomain self._manin = manin_relations if check: if not codomain.get_action(Sigma0(manin_relations._N)): raise ValueError("Codomain must have an action of Sigma0(N)") self._dict = {} if isinstance(defining_data, (list, tuple)): if len(defining_data) != manin_relations.ngens(): raise ValueError("length of defining data must be the same as number of Manin generators") for i in xrange(len(defining_data)): self._dict[manin_relations.gen(i)] = codomain(defining_data[i]) elif isinstance(defining_data, dict): for g in manin_relations.gens(): self._dict[g] = codomain(defining_data[g]) else: # constant function try: c = codomain(defining_data) except TypeError: raise TypeError("unrecognized type %s for defining_data" % type(defining_data)) g = manin_relations.gens() self._dict = dict(zip(g, [c]*len(g))) else: self._dict = defining_data