Beispiel #1
0
 def new_decomposition(self, verbose=False):
     """
     Return complete irreducible Hecke decomposition of new subspace of self.
     """
     V = self.degeneracy_matrix().kernel()
     p = next_prime_of_characteristic_coprime_to(F.ideal(1), self.level())
     T = self.hecke_matrix(p)
     D = T.decomposition_of_subspace(V)
     while len([X for X in D if not X[1]]) > 0:
         p = next_prime_of_characteristic_coprime_to(p, self.level())
         if verbose: print p.norm()
         T = self.hecke_matrix(p)
         D2 = []
         for X in D:
             if X[1]:
                 D2.append(X)
             else:
                 if verbose: print T.restrict(X[0]).fcp()
                 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
Beispiel #2
0
    def decomposition(self, B, verbose=False):
        """
        Return Hecke decomposition of self using Hecke operators T_p
        coprime to the level with norm(p) <= B.
        """

        # TODO: rewrite to use primes_of_bounded_norm so that we
        # iterate through primes ordered by *norm*, which is
        # potentially vastly faster.  Delete these functions
        # involving characteristic!
        
        p = next_prime_of_characteristic_coprime_to(F.ideal(1), self.level())
        T = self.hecke_matrix(p)
        D = T.decomposition()
        while len([X for X in D if not X[1]]) > 0:
            p = next_prime_of_characteristic_coprime_to(p, self.level())
            if p.norm() > B:
                break
            if verbose: print p.norm()
            T = self.hecke_matrix(p)
            D2 = []
            for X in D:
                if X[1]:
                    D2.append(X)
                else:
                    if verbose: print T.restrict(X[0]).fcp()
                    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
Beispiel #3
0
 def new_decomposition(self, verbose=False):
     """
     Return complete irreducible Hecke decomposition of new subspace of self.
     """
     V = self.degeneracy_matrix().kernel()
     p = next_prime_of_characteristic_coprime_to(F.ideal(1), self.level())
     T = self.hecke_matrix(p)
     D = T.decomposition_of_subspace(V)
     while len([X for X in D if not X[1]]) > 0:
         p = next_prime_of_characteristic_coprime_to(p, self.level())
         if verbose: print p.norm()
         T = self.hecke_matrix(p)
         D2 = []
         for X in D:
             if X[1]:
                 D2.append(X)
             else:
                 if verbose: print T.restrict(X[0]).fcp()
                 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
Beispiel #4
0
    def decomposition(self, B, verbose=False):
        """
        Return Hecke decomposition of self using Hecke operators T_p
        coprime to the level with norm(p) <= B.
        """

        # TODO: rewrite to use primes_of_bounded_norm so that we
        # iterate through primes ordered by *norm*, which is
        # potentially vastly faster.  Delete these functions
        # involving characteristic!
        
        p = next_prime_of_characteristic_coprime_to(F.ideal(1), self.level())
        T = self.hecke_matrix(p)
        D = T.decomposition()
        while len([X for X in D if not X[1]]) > 0:
            p = next_prime_of_characteristic_coprime_to(p, self.level())
            if p.norm() > B:
                break
            if verbose: print p.norm()
            T = self.hecke_matrix(p)
            D2 = []
            for X in D:
                if X[1]:
                    D2.append(X)
                else:
                    if verbose: print T.restrict(X[0]).fcp()
                    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
Beispiel #5
0
def next_prime_not_dividing(P, I):
    while True:
        p = P.smallest_integer()
        if p == 1:
            Q = F.ideal(2)
        elif p % 5 in [2,3]: # inert
            Q = F.primes_above(next_prime(p))[0]
        elif p == 5:
            Q = F.ideal(7)
        else: # p split
            A = F.primes_above(p)
            if A[0] == P:
                Q = A[1]
            else:
                Q = F.primes_above(next_prime(p))[0]
        if not Q.divides(I):
            return Q
        else:
            P = Q # try again
Beispiel #6
0
def next_prime_not_dividing(P, I):
    while True:
        p = P.smallest_integer()
        if p == 1:
            Q = F.ideal(2)
        elif p % 5 in [2,3]: # inert
            Q = F.primes_above(next_prime(p))[0]
        elif p == 5:
            Q = F.ideal(7)
        else: # p split
            A = F.primes_above(p)
            if A[0] == P:
                Q = A[1]
            else:
                Q = F.primes_above(next_prime(p))[0]
        if not Q.divides(I):
            return Q
        else:
            P = Q # try again
Beispiel #7
0
 def elliptic_curve_factors(self):
     D = [X for X in self.new_decomposition() if X.dimension() == 1]
     # Have to get rid of the Eisenstein factor
     p = next_prime_of_characteristic_coprime_to(F.ideal(1), self.level())
     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 = next_prime_of_characteristic_coprime_to(p, self.level())
     return Sequence([EllipticCurveFactor(X, number) for number, X in enumerate(D)],
                     immutable=True, cr=True, universe=int, check=False)
Beispiel #8
0
 def elliptic_curve_factors(self):
     D = [X for X in self.new_decomposition() if X.dimension() == 1]
     # Have to get rid of the Eisenstein factor
     p = next_prime_of_characteristic_coprime_to(F.ideal(1), self.level())
     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 = next_prime_of_characteristic_coprime_to(p, self.level())
     return Sequence([EllipticCurveFactor(X, number) for number, X in enumerate(D)],
                     immutable=True, cr=True, universe=int, check=False)