Ejemplo n.º 1
0
def weight_one_half_dim(FQM,
                        use_reduction=True,
                        proof=False,
                        debug=0,
                        local=True):
    N = Integer(FQM.level())
    if not N % 4 == 0:
        return 0
    m = Integer(N / Integer(4))
    d = 0
    for l in m.divisors():
        if is_squarefree(m / l):
            if debug > 1: print "l = {0}".format(l)
            TM = FiniteQuadraticModule([2 * l], [-1 / Integer(4 * l)])
            if local:
                dd = [0, 0]  # eigenvalue 1, -1 multiplicity
                for p, n in lcm(FQM.level(), 4 * l).factor():
                    N = None
                    TN = None
                    J = FQM.jordan_decomposition()
                    L = TM.jordan_decomposition()
                    for j in xrange(1, n + 1):
                        C = J.constituent(p**j)[0]
                        D = L.constituent(p**j)[0]
                        if debug > 1: print "C = {0}, D = {1}".format(C, D)
                        if N == None and C.level() != 1:
                            N = C
                        elif C.level() != 1:
                            N = N + C
                        if TN == None and D.level() != 1:
                            TN = D
                        elif D.level() != 1:
                            TN = TN + D
                    dd1 = invariants_eps(N, TN, use_reduction, proof, debug)
                    if debug > 1: print "dd1 = {}".format(dd1)
                    if dd1 == [0, 0]:
                        # the result is multiplicative
                        # a single [0,0] as a local result
                        # yields [0,0] in the end
                        # and we're done here
                        dd = [0, 0]
                        break
                    if dd == [0, 0]:
                        # this is the first prime
                        dd = dd1
                    else:
                        # some basic arithmetic ;-)
                        # 1 = 1*1 = (-1)(-1)
                        # -1 = 1*(-1) = (-1)*1
                        ddtmp = copy(dd)
                        ddtmp[0] = dd[0] * dd1[0] + dd[1] * dd1[1]
                        ddtmp[1] = dd[0] * dd1[1] + dd[1] * dd1[0]
                        dd = ddtmp
                    if debug > 1: print "dd = {0}".format(dd)
                d += dd[0]
            else:
                d += invariants_eps(FQM, TM, use_reduction, proof, debug)[0]
    return d
Ejemplo n.º 2
0
def weight_one_half_dim(FQM, use_reduction = True, proof = False, debug = 0, local=True):
    N = Integer(FQM.level())
    if not N % 4 == 0:
        return 0
    m = Integer(N/Integer(4))
    d = 0
    for l in m.divisors():
        if is_squarefree(m/l):
            if debug > 1: print "l = {0}".format(l)
            TM = FiniteQuadraticModule([2*l],[-1/Integer(4*l)])
            if local:
                dd = [0,0] # eigenvalue 1, -1 multiplicity
                for p,n in lcm(FQM.level(),4*l).factor():
                    N = None
                    TN = None
                    J = FQM.jordan_decomposition()
                    L = TM.jordan_decomposition()
                    for j in xrange(1,n+1):
                        C = J.constituent(p**j)[0]
                        D = L.constituent(p**j)[0]
                        if debug > 1: print "C = {0}, D = {1}".format(C,D)
                        if N == None and C.level() != 1:
                            N = C
                        elif C.level() != 1:
                            N = N + C
                        if TN == None and D.level() != 1:
                            TN = D
                        elif D.level() != 1:
                            TN = TN + D
                    dd1 = invariants_eps(N, TN, use_reduction, proof, debug)
                    if debug > 1: print "dd1 = {}".format(dd1)
                    if dd1 == [0,0]:
                        # the result is multiplicative
                        # a single [0,0] as a local result
                        # yields [0,0] in the end
                        # and we're done here
                        dd = [0,0]
                        break
                    if dd == [0,0]:
                        # this is the first prime
                        dd = dd1
                    else:
                        # some basic arithmetic ;-)
                        # 1 = 1*1 = (-1)(-1)
                        # -1 = 1*(-1) = (-1)*1
                        ddtmp = copy(dd)
                        ddtmp[0] = dd[0]*dd1[0] + dd[1]*dd1[1]
                        ddtmp[1] = dd[0]*dd1[1] + dd[1]*dd1[0]
                        dd = ddtmp
                    if debug > 1: print "dd = {0}".format(dd)
                d += dd[0]
            else:
                d += invariants_eps(FQM, TM, use_reduction, proof, debug)[0]
    return d
Ejemplo n.º 3
0
def compute_charpolies():
    """Compute the characteristic polynomials of homology actions of finite
    order mapping classes.
    """
    from sage.all import Integer
    data = {}
    for genus in finite_order_primitives.keys():
        data[genus] = []
        count = 0
        for order, f in finite_order_primitives[genus]:
            count += 1
            order = Integer(order)
            for divisor in order.divisors():
                if divisor == order:
                    continue
                g = f**divisor
                action = g.action_on_homology()
                char_poly = action.charpoly()
                data[genus].append(
                    (order // divisor, char_poly.factor(), order))
        data[genus].sort()
    return data