# Ticket #6071: trac_6071.patch

File trac_6071.patch, 6.7 KB (added by davidloeffler, 14 years ago)

patch against 4.0.alpha0

• ## sage/modular/modform/ambient.py

# HG changeset patch
# User David Loeffler <D.Loeffler@dpmms.cam.ac.uk>
# Date 1241513458 -3600
# Parent  7488340543618251888907e60499593a1c911890
#6071: weight 1 Eisenstein series

diff -r 748834054361 -r daf2231db478 sage/modular/modform/ambient.py
 a character = dirichlet.TrivialCharacter(group.level(), base_ring) space.ModularFormsSpace.__init__(self, group, weight, character, base_ring) hecke.AmbientHeckeModule.__init__(self, base_ring, self.dimension(), group.level(), weight) try: d = self.dimension() except NotImplementedError: d = None hecke.AmbientHeckeModule.__init__(self, base_ring, d, group.level(), weight) def _repr_(self): """ sage: m._repr_() 'Modular Forms space of dimension 1198 for Congruence Subgroup Gamma1(20) of weight 100 over Rational Field' """ try: d = self.dimension() except NotImplementedError: d = "(unknown)" return "Modular Forms space of dimension %s for %s of weight %s over %s"%( self.dimension(), self.group(), self.weight(), self.base_ring()) d, self.group(), self.weight(), self.base_ring()) def _submodule_class(self): """ Vector space of dimension 27 over Finite Field in b of size 7^2 """ if hasattr(self, "__module"): return self.__module self.__module = free_module.VectorSpace(self.base_ring(), self.dimension()) try: d = self.dimension() except NotImplementedError: d = self._dim_eisenstein() self.__module = free_module.VectorSpace(self.base_ring(), d) return self.__module def free_module(self): return self.module() # stupid thing: there are functions in classes ModularFormsSpace and # HeckeModule that both do much the same thing, and one has to override # both of them! def prec(self, new_prec=None): """ Set or get default initial precision for printing modular forms.
• ## sage/modular/modform/ambient_eps.py

diff -r 748834054361 -r daf2231db478 sage/modular/modform/ambient_eps.py
 a sage: m Modforms of level 8 """ try: d = self.dimension() except NotImplementedError: d = "(unknown)" return "Modular Forms space of dimension %s, character %s and weight %s over %s"%( self.dimension(), self.character(), self.weight(), self.base_ring()) d, self.character(), self.weight(), self.base_ring()) def cuspidal_submodule(self): """
• ## sage/modular/modform/constructor.py

diff -r 748834054361 -r daf2231db478 sage/modular/modform/constructor.py
 a ValueError: group and level do not match. """ weight = rings.Integer(weight) if weight <= 1: raise NotImplementedError, "weight must be at least 2" if weight <= 0: raise NotImplementedError, "weight must be at least 1" if isinstance(group, dirichlet.DirichletCharacter): if ( group.level() != rings.Integer(level) ):
• ## sage/modular/modform/cuspidal_submodule.py

diff -r 748834054361 -r daf2231db478 sage/modular/modform/cuspidal_submodule.py
 a prec = self.prec() else: prec = Integer(prec) if self.dimension() == 0: return [] M = self.modular_symbols(sign = 1) return M.q_expansion_basis(prec)
• ## sage/modular/modform/eis_series.py

diff -r 748834054361 -r daf2231db478 sage/modular/modform/eis_series.py
 a if chi*psi == eps: chi0, psi0 = __common_minimal_basering(chi, psi) for t in divisors(N//(R*L)): params.append( (chi0,psi0,t) ) if k != 1 or ((psi0, chi0, t) not in params): params.append( (chi0,psi0,t) ) return params for j in range(i,len(E)): if parity[i]*parity[j] == s and N % (E[i].conductor()*E[j].conductor()) == 0: chi, psi = __common_minimal_basering(E[i], E[j]) pairs.append((chi, psi)) if i!=j: pairs.append((psi,chi)) if k != 1: pairs.append((chi, psi)) if i!=j: pairs.append((psi,chi)) else: # if weight is 1 then (chi, psi) and (chi, psi) are the # same form if psi.is_trivial() and not chi.is_trivial(): # need to put the trivial character first to get the L-value right pairs.append((psi, chi)) else: pairs.append((chi, psi)) #end fors #end if Compute and return a list of all parameters (\chi,\psi,t) that define the Eisenstein series with given character and weight k. Only the parity of k is relevant. Only the parity of k is relevant (unless k = 1, which is a slightly different case). If character is an integer N, then the parameters for \Gamma_1(N) are computed instead.  Then the condition is that ([1, 1], [1, 1], 10), ([1, 1], [1, 1], 15), ([1, 1], [1, 1], 30)] sage: sage.modular.modform.eis_series.compute_eisenstein_params(15, 1) [([1, 1], [-1, 1], 1), ([1, 1], [-1, 1], 5), ([1, 1], [1, zeta4], 1), ([1, 1], [1, zeta4], 3), ([1, 1], [-1, -1], 1), ([1, 1], [1, -zeta4], 1), ([1, 1], [1, -zeta4], 3), ([-1, 1], [1, -1], 1)] sage: sage.modular.modform.eis_series.compute_eisenstein_params(DirichletGroup(15).0, 1) [([1, 1], [-1, 1], 1), ([1, 1], [-1, 1], 5)] """ if isinstance(character, (int,long,Integer)): N = character