def new_decomposition(self): """ Return complete irreducible Hecke decomposition of "new" subspace of self. OUTPUT: - sorted Sequence of subspaces of self EXAMPLES:: sage: from sage.modular.hilbert.sqrt5_hmf import F, QuaternionicModule sage: H = QuaternionicModule(3 * F.prime_above(31)); H Quaternionic module of dimension 6, level 15*a-6 (of norm 279=3^2*31) over QQ(sqrt(5)) sage: H.new_decomposition() [ Subspace of dimension 1 ..., Subspace of dimension 1 ..., Subspace of dimension 1 ..., Subspace of dimension 1 ... ] """ V = self.degeneracy_matrix().kernel() primes = PrimesCoprimeTo(self.level()) p = primes.next() T = self.hecke_matrix(p) D = T.decomposition_of_subspace(V) while len([X for X in D if not X[1]]) > 0: p = primes.next() verbose('Norm(p) = %s'%p.norm()) T = self.hecke_matrix(p) D2 = [] for X in D: if X[1]: D2.append(X) else: for Z in T.decomposition_of_subspace(X[0]): D2.append(Z) D = D2 D = [self.subspace(X[0]) for X in D] D.sort() S = Sequence(D, immutable=True, cr=True, universe=int, check=False) return S
def rational_newforms(self): """ Return the newforms with QQ-rational Hecke eigenvalues. Conjecturally, these correspond to the isogeny classes of elliptic curves over Q(sqrt(5)) having conductor self.level(). WARNING/TODO: This relies on an unproven (but surely correct) bound to determine whether a system of Hecke eigenvalues is really old. EXAMPLES:: The smallest level example:: sage: from sage.modular.hilbert.sqrt5_hmf import F, QuaternionicModule sage: H = QuaternionicModule(F.prime_above(31)); D = H.rational_newforms(); D [ Rational newform number 0... ] sage: f = D[0]; f Rational newform number 0 over QQ(sqrt(5)) in Quaternionic module of dimension 2, level 5*a-2 (of norm 31=31) over QQ(sqrt(5)) Notice that computing `a_P` at the bad primes `P` isn't implemented (it just gives '?'):: sage: f.aplist(50) [-3, -2, 2, -4, 4, 4, -4, -2, -2, 8, '?', -6, -6, 2] Another example of higher level:: sage: H = QuaternionicModule(2*F.prime_above(31)); D = H.rational_newforms(); D [ Rational newform number 0 ... ] sage: D[0].aplist(33) ['?', 0, -2, 0, -6, 2, 2, 6, 0, -4, '?'] """ primes = PrimesCoprimeTo(self._level) D = [X for X in self.new_decomposition() if X.dimension() == 1] # Have to get rid of the Eisenstein factor p = primes.next() while True: q = p.residue_field().cardinality() + 1 E = [A for A in D if A.hecke_matrix(p)[0,0] == q] if len(E) == 0: break elif len(E) == 1: D = [A for A in D if A != E[0]] break else: p = primes.next() Z = [] for number, X in enumerate(D): f = QuaternionicRationalNewform(X, number) try: # ensure that dual eigenspace is defined, i.e., that # newform really is new. f.dual_eigenspace() Z.append(f) except RuntimeError: pass return Sequence(Z, immutable=True, cr=True, universe=int, check=False)
def decomposition(self, B): """ Return Hecke decomposition of self using Hecke operators T_p coprime to the level with norm(p) <= B. INPUT: - `B` -- positive integer OUTPUT: - sorted Sequence of subspaces of self EXAMPLES:: sage: from sage.modular.hilbert.sqrt5_hmf import F, QuaternionicModule sage: H = QuaternionicModule(F.prime_above(31)) sage: H.decomposition(10) [ Subspace of dimension 1 of Quaternionic module of dimension 2, level 5*a-2 (of norm 31=31) over QQ(sqrt(5)), Subspace of dimension 1 of Quaternionic module of dimension 2, level 5*a-2 (of norm 31=31) over QQ(sqrt(5)) ] sage: H.decomposition(2) [ Quaternionic module of dimension 2, level 5*a-2 (of norm 31=31) over QQ(sqrt(5)) ] sage: H = QuaternionicModule(3 * F.prime_above(31)); H Quaternionic module of dimension 6, level 15*a-6 (of norm 279=3^2*31) over QQ(sqrt(5)) sage: H.decomposition(10) [ Subspace of dimension 1 ..., Subspace of dimension 1 ..., Subspace of dimension 1 ..., Subspace of dimension 1 ..., Subspace of dimension 2 ... ] """ primes = PrimesCoprimeTo(self.level(), B) if len(primes) == 0: D = [self] else: T = self.hecke_matrix(primes.next()) D = T.decomposition() while len([X for X in D if not X[1]]) > 0 and len(primes) > 0: p = primes.next() verbose('Norm(p) = %s'%p.norm()) T = self.hecke_matrix(p) D2 = [] for X in D: if X[1]: D2.append(X) else: for Z in T.decomposition_of_subspace(X[0]): D2.append(Z) D = D2 D = [self.subspace(X[0]) for X in D] D.sort() S = Sequence(D, immutable=True, cr=True, universe=int, check=False) return S