Beispiel #1
0
def DC_char_to_gp_char(chi, G=None):
    """
    If this function is to be called repeatedly with the same modulus it
    is better to precompute G and pass it, so save recomputation:
    """
    if G is None:
        G = pari(chi.modulus()).znstar(1)
    return G.znconreylog(DC.number(chi))
Beispiel #2
0
def char_orbit_index_to_DC_number(N, o):
    """Returns the index in the Dirichlet-Conrey numbering of one character in orbit number o"""
    if o == 1:
        return 1
    global char_table_dict
    if not char_table_dict:
        char_table_dict = {}
        try:
            chartab = open("chartab.txt")
            for L in chartab.readlines():
                NN, oo, nn = [int(x) for x in L.split()]
                if not NN in char_table_dict:
                    char_table_dict[NN] = {}
                char_table_dict[NN][oo] = nn
            chartab.close()
        except IOError:
            Chars = DirichletCharacterGaloisReps(N)
            return DC.number(Chars[o - 1])
    try:
        return char_table_dict[N][o]
    except KeyError:  # N too big for precomputed table
        Chars = DirichletCharacterGaloisReps(N)
        return DC.number(Chars[o - 1])
Beispiel #3
0
def primitivize(label):
    m, n = [ZZ(a) for a in label.split(".")]
    char = DirichletCharacter_conrey(DirGroup(m), n).primitive_character()
    return "%d.%d" % (char.modulus(), char.number())
Beispiel #4
0
def GP_DirichletCharacterGaloisReps(N):
    G = pari(N).znstar(1)
    return [
        G.znconreylog(DC.number(chi))
        for chi in DirichletCharacterGaloisReps(N)
    ]
Beispiel #5
0
def DC_char_to_gp_char(chi, G=None):
    if G == None:
        G = pari(chi.modulus()).znstar(1)
    return G.znconreylog(DC.number(chi))
Beispiel #6
0
def OrderedConreyLabels(N):
    return [DC.number(chi) for chi in DirichletCharacterGaloisReps(N)]