from snappy import * def prove_link_complement(filename, order = 0): # Load manifold as triangulation, this avoids computing # hyperbolic structure which is slow and not needed here M = Triangulation(filename) # Fill cusps, 20 at a time, replace manifold by filled # manifold. # Do not fill the last cusp. This would result in a triangulation # with no ideal vertices and SnapPy doesn't do to well on them. while M.num_cusps() > 1: n = min(20, M.num_cusps() - 1) M.dehn_fill(n*[(1,0)]) M = M.filled_triangulation() # Mark the last cusp as filled without changing the triangulation M.dehn_fill((1,0)) if order == 0: # We want to show trivial fundamental group. # It suffices to show that it has no generators if not M.fundamental_group().generators(): print filename + " is a link complement" return True else: raise Exception, filename + " is NOT a link complement!!!" else: # We want to show cyclic fundamental group of given order. # It suffices to show that the fundamental group has only one # generator and that the homology group is isomorphic to the # cyclic group of given order. if (len(M.fundamental_group().generators()) == 1 and M.homology().coefficients == [order]): print filename + " is a link complement" return True else: raise Exception, filename + " is NOT a link complement!!!" def main(): tetrahedral = [ "universal_tets_2_plus_0_zeta_0010_tets_with_meridians.trig", "universal_tets_2_plus_1_zeta_0028_tets_with_meridians.trig", "universal_tets_2_plus_2_zeta_0120_tets_with_meridians.trig", "universal_tets_3_plus_0_zeta_0054_tets_with_meridians.trig", "universal_tets_3_plus_1_zeta_0182_tets_with_meridians.trig", "universal_tets_3_plus_2_zeta_0570_tets_with_meridians.trig", "universal_tets_4_plus_0_zeta_0640_tets_with_meridians.trig", "universal_tets_4_plus_1_zeta_0672_tets_with_meridians.trig"] octahedral = [ "universal_octahedra_2_plus_0_i_0004_octahedra_with_meridians.trig", "universal_octahedra_2_plus_1_i_0005_octahedra_with_meridians.trig", "universal_octahedra_2_plus_2_i_0016_octahedra_with_meridians.trig", "universal_octahedra_3_plus_0_i_0030_octahedra_with_meridians.trig", "universal_octahedra_3_plus_1_i_0030_octahedra_with_meridians.trig", "universal_octahedra_3_plus_2_i_0091_octahedra_with_meridians.trig", "universal_octahedra_4_plus_1_i_0204_octahedra_with_meridians.trig"] cubical = [ "universal_cubes_1_plus_1_zeta_0006_cubes_with_meridians.trig", "universal_cubes_2_plus_0_zeta_0016_cubes_with_meridians.trig", "universal_cubes_2_plus_1_zeta_0084_cubes_with_meridians.trig"] dodecahedral = [ ("universal_dodecahedra_2_plus_0_zeta_0240_dodecahedra_quotient_with_meridians.trig", 15)] for filename in tetrahedral + octahedral + cubical: prove_link_complement(filename) for filename, order in dodecahedral: prove_link_complement(filename, order) if __name__ == "__main__": main()