Esempio n. 1
0
def taut_polynomial_image(tri, angle, cycles = [], alpha = True, mode = "taut"):
    """
    If cycles = [] then this is the taut polynomial.  If cycles != []
    then this is the image of the taut polynomial under the
    epimorphism obtained by killing the given boundary cycles.
    """
    taut_poly = taut_polynomial_via_tree(tri, angle, alpha = alpha, mode = mode)
    ZG = group_ring(tri, angle, [], alpha = alpha)
    ZH = group_ring(tri, angle, cycles, alpha = alpha)
    P = ZH.polynomial_ring()

    image_in_laurent = epimorphism_in_laurent(tri, angle, cycles, ZH)
    epi = ZG.Hom(ZH)(image_in_laurent)
    return normalise_poly( epi(taut_poly), ZH, P ) 
Esempio n. 2
0
def veering_polynomial(tri,
                       angle,
                       alpha=True,
                       normalisation=True,
                       mode="lower"):
    # set up
    ZH = group_ring(tri, angle, [], alpha=alpha)
    P = ZH.polynomial_ring()
    if verbose > 0:
        print(("angle", angle))

    coorientations = is_transverse_taut(tri,
                                        angle,
                                        return_type="tet_vert_coorientations")

    if mode == "upper":
        coorientations = [[-x for x in coor] for coor in coorientations]

    ET = edges_to_tetrahedra_matrix(tri, angle, coorientations, normalisation,
                                    ZH, P)
    #print(ET)
    if normalisation == True:
        return normalise_poly(ET.determinant(), ZH, P)
    else:
        perm = permutation_tet_top_diagonal(tri, angle, coorientations)
        #print(perm, "sign", sign(perm))
        return sign(perm) * ET.determinant()
Esempio n. 3
0
def taut_polynomial(tri, angle, cycles = [], alpha = True, mode = "taut"):
    # set up
    ZH = group_ring(tri, angle, cycles, alpha = alpha)
    P = ZH.polynomial_ring()

    ET = edges_to_triangles_matrix(tri, angle, cycles, ZH, P, mode = mode)

    # compute via minors
    minors = ET.minors(tri.countTetrahedra())
    return normalise_poly(gcd(minors), ZH, P)
Esempio n. 4
0
def taut_polynomial_via_smith(tri, angle, cycles = [], alpha = True, mode = "taut"):
    # set up
    assert tri.homology().rank() == 1 # need the polynomial ring to be a PID
    ZH = group_ring(tri, angle, cycles, alpha = alpha, ring = QQ) # ditto
    P = ZH.polynomial_ring()

    ET = edges_to_triangles_matrix(tri, angle, cycles, ZH, P, mode = mode)

    # compute via smith normal form
    ETs = ET.smith_form()[0]
    a = tri.countEdges()
    ETs_reduced = Matrix([row[:a] for row in ETs])
    return normalise_poly(ETs_reduced.determinant(), ZH, P)
Esempio n. 5
0
def taut_polynomial_via_tree_and_smith(tri, angle, cycles = [], alpha = True, mode = "taut"):
    # set up
    assert tri.homology().rank() == 1 # need the polynomial ring to be a PID
    ZH = group_ring(tri, angle, cycles, alpha = alpha, ring = QQ) # ditto
    P = ZH.polynomial_ring()

    ET = edges_to_triangles_matrix(tri, angle, cycles, ZH, P, mode = mode)
    _, non_tree_faces, _ = spanning_dual_tree(tri)

    ET = ET.transpose()
    ET = Matrix([row for i, row in enumerate(ET) if i in non_tree_faces]).transpose()

    # compute via smith normal form
    ETs = ET.smith_form()[0]
    a = tri.countEdges()
    ETs_reduced = Matrix([row[:a] for row in ETs])
    return normalise_poly(ETs_reduced.determinant(), ZH, P)
Esempio n. 6
0
def taut_polynomial_via_tree(tri, angle, cycles = [], alpha = True, mode = "taut"):
    """
    If cycles = [] then this is the taut polynomial.  If cycles != []
    then this is the zero-Fitting invariant of the module obtained by
    'extension of scalars' - that is, form the epimorphism obtained by
    killing the given boundary cycles, apply it to the presentation
    matrix, and only then compute the gcd of the (correct minors).       
    """

    # set up 
    ZH = group_ring(tri, angle, cycles, alpha = alpha)
    P = ZH.polynomial_ring()

    ET = edges_to_triangles_matrix(tri, angle, cycles, ZH, P, mode = mode)
    _, non_tree_faces, _ = spanning_dual_tree(tri)

    ET = ET.transpose()
    ET = Matrix([row for i, row in enumerate(ET) if i in non_tree_faces]).transpose()

    # compute via minors
    minors = ET.minors(tri.countTetrahedra())
    return normalise_poly(gcd(minors), ZH, P)
Esempio n. 7
0
def edges_to_triangles_matrix_wrapper(tri, angle, cycles):
    ZH = group_ring(tri, angle, cycles, alpha = True)
    P = ZH.polynomial_ring()
    return edges_to_triangles_matrix(tri, angle, cycles, ZH, P, mode = "taut")