snappy 3.0.3__cp38-cp38-macosx_11_0_arm64.whl → 3.2__cp38-cp38-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- snappy/CyOpenGL.cpython-38-darwin.so +0 -0
- snappy/SnapPy.cpython-38-darwin.so +0 -0
- snappy/SnapPyHP.cpython-38-darwin.so +0 -0
- snappy/__init__.py +373 -426
- snappy/app.py +240 -75
- snappy/app_menus.py +93 -78
- snappy/browser.py +87 -63
- snappy/cache.py +5 -8
- snappy/canonical.py +249 -0
- snappy/{verify/cusp_shapes.py → cusps/__init__.py} +11 -19
- snappy/cusps/cusp_area_matrix.py +101 -0
- snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +39 -54
- snappy/cusps/maximal_cusp_area_matrix.py +136 -0
- snappy/cusps/test.py +21 -0
- snappy/cusps/trig_cusp_area_matrix.py +63 -0
- snappy/database.py +40 -31
- snappy/db_utilities.py +13 -14
- snappy/decorated_isosig.py +377 -133
- snappy/dev/extended_ptolemy/complexVolumesClosed.py +42 -9
- snappy/dev/extended_ptolemy/extended.py +32 -25
- snappy/dev/extended_ptolemy/giac_rur.py +23 -8
- snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
- snappy/dev/vericlosed/computeApproxHyperbolicStructureOrb.py +2 -1
- snappy/dev/vericlosed/gimbalLoopFinder.py +5 -5
- snappy/dev/vericlosed/hyperbolicStructure.py +3 -3
- snappy/dev/vericlosed/oneVertexTruncatedComplex.py +2 -2
- snappy/dev/vericlosed/truncatedComplex.py +3 -2
- snappy/dev/vericlosed/verifyHyperbolicStructureEngine.py +4 -3
- snappy/doc/_images/geodesics.jpg +0 -0
- snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
- snappy/doc/_images/m125_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
- snappy/doc/_sources/additional_classes.rst.txt +1 -0
- snappy/doc/_sources/credits.rst.txt +6 -1
- snappy/doc/_sources/development.rst.txt +69 -50
- snappy/doc/_sources/index.rst.txt +101 -66
- snappy/doc/_sources/installing.rst.txt +148 -165
- snappy/doc/_sources/news.rst.txt +136 -32
- snappy/doc/_sources/ptolemy.rst.txt +1 -1
- snappy/doc/_sources/ptolemy_examples1.rst.txt +9 -8
- snappy/doc/_sources/ptolemy_examples2.rst.txt +3 -3
- snappy/doc/_sources/ptolemy_examples3.rst.txt +14 -14
- snappy/doc/_sources/ptolemy_prelim.rst.txt +1 -1
- snappy/doc/_sources/snap.rst.txt +2 -2
- snappy/doc/_sources/snappy.rst.txt +1 -1
- snappy/doc/_sources/triangulation.rst.txt +3 -2
- snappy/doc/_sources/verify.rst.txt +89 -29
- snappy/doc/_sources/verify_internals.rst.txt +5 -16
- snappy/doc/_static/SnapPy-horizontal-128.png +0 -0
- snappy/doc/_static/SnapPy.ico +0 -0
- snappy/doc/_static/_sphinx_javascript_frameworks_compat.js +123 -0
- snappy/doc/_static/basic.css +47 -27
- snappy/doc/_static/css/badge_only.css +1 -0
- snappy/doc/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
- snappy/doc/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
- snappy/doc/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
- snappy/doc/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
- snappy/doc/_static/css/fonts/fontawesome-webfont.eot +0 -0
- snappy/doc/_static/css/fonts/fontawesome-webfont.svg +2671 -0
- snappy/doc/_static/css/fonts/fontawesome-webfont.ttf +0 -0
- snappy/doc/_static/css/fonts/fontawesome-webfont.woff +0 -0
- snappy/doc/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
- snappy/doc/_static/css/fonts/lato-bold-italic.woff +0 -0
- snappy/doc/_static/css/fonts/lato-bold-italic.woff2 +0 -0
- snappy/doc/_static/css/fonts/lato-bold.woff +0 -0
- snappy/doc/_static/css/fonts/lato-bold.woff2 +0 -0
- snappy/doc/_static/css/fonts/lato-normal-italic.woff +0 -0
- snappy/doc/_static/css/fonts/lato-normal-italic.woff2 +0 -0
- snappy/doc/_static/css/fonts/lato-normal.woff +0 -0
- snappy/doc/_static/css/fonts/lato-normal.woff2 +0 -0
- snappy/doc/_static/css/theme.css +4 -0
- snappy/doc/_static/doctools.js +107 -274
- snappy/doc/_static/documentation_options.js +6 -5
- snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
- snappy/doc/_static/jquery.js +2 -2
- snappy/doc/_static/js/badge_only.js +1 -0
- snappy/doc/_static/js/theme.js +1 -0
- snappy/doc/_static/js/versions.js +228 -0
- snappy/doc/_static/language_data.js +3 -101
- snappy/doc/_static/pygments.css +1 -0
- snappy/doc/_static/searchtools.js +489 -398
- snappy/doc/_static/snappy_furo.css +33 -0
- snappy/doc/_static/snappy_sphinx_rtd_theme.css +42 -0
- snappy/doc/_static/sphinx_highlight.js +154 -0
- snappy/doc/additional_classes.html +688 -263
- snappy/doc/bugs.html +107 -94
- snappy/doc/censuses.html +155 -127
- snappy/doc/credits.html +115 -104
- snappy/doc/development.html +184 -146
- snappy/doc/genindex.html +287 -204
- snappy/doc/index.html +189 -150
- snappy/doc/installing.html +259 -266
- snappy/doc/manifold.html +1626 -592
- snappy/doc/manifoldhp.html +119 -105
- snappy/doc/news.html +198 -104
- snappy/doc/objects.inv +0 -0
- snappy/doc/other.html +117 -105
- snappy/doc/platonic_census.html +161 -114
- snappy/doc/plink.html +113 -105
- snappy/doc/ptolemy.html +131 -108
- snappy/doc/ptolemy_classes.html +242 -223
- snappy/doc/ptolemy_examples1.html +144 -130
- snappy/doc/ptolemy_examples2.html +141 -129
- snappy/doc/ptolemy_examples3.html +148 -132
- snappy/doc/ptolemy_examples4.html +131 -111
- snappy/doc/ptolemy_prelim.html +162 -138
- snappy/doc/py-modindex.html +104 -69
- snappy/doc/screenshots.html +117 -108
- snappy/doc/search.html +115 -84
- snappy/doc/searchindex.js +1 -1
- snappy/doc/snap.html +109 -96
- snappy/doc/snappy.html +134 -97
- snappy/doc/spherogram.html +259 -187
- snappy/doc/todo.html +107 -94
- snappy/doc/triangulation.html +1380 -111
- snappy/doc/tutorial.html +107 -94
- snappy/doc/verify.html +194 -125
- snappy/doc/verify_internals.html +248 -686
- snappy/drilling/__init__.py +456 -0
- snappy/drilling/barycentric.py +103 -0
- snappy/drilling/constants.py +5 -0
- snappy/drilling/crush.py +270 -0
- snappy/drilling/cusps.py +125 -0
- snappy/drilling/debug.py +242 -0
- snappy/drilling/epsilons.py +6 -0
- snappy/drilling/exceptions.py +55 -0
- snappy/drilling/moves.py +620 -0
- snappy/drilling/peripheral_curves.py +210 -0
- snappy/drilling/perturb.py +188 -0
- snappy/drilling/shorten.py +36 -0
- snappy/drilling/subdivide.py +274 -0
- snappy/drilling/test.py +23 -0
- snappy/drilling/test_cases.py +126 -0
- snappy/drilling/tracing.py +351 -0
- snappy/exceptions.py +23 -3
- snappy/export_stl.py +20 -14
- snappy/exterior_to_link/__init__.py +2 -0
- snappy/exterior_to_link/barycentric_geometry.py +463 -0
- snappy/exterior_to_link/exceptions.py +6 -0
- snappy/exterior_to_link/geodesic_map.json +14408 -0
- snappy/exterior_to_link/hyp_utils.py +112 -0
- snappy/exterior_to_link/link_projection.py +323 -0
- snappy/exterior_to_link/main.py +197 -0
- snappy/exterior_to_link/mcomplex_with_expansion.py +261 -0
- snappy/exterior_to_link/mcomplex_with_link.py +687 -0
- snappy/exterior_to_link/mcomplex_with_memory.py +162 -0
- snappy/exterior_to_link/pl_utils.py +491 -0
- snappy/exterior_to_link/put_in_S3.py +156 -0
- snappy/exterior_to_link/rational_linear_algebra.py +123 -0
- snappy/exterior_to_link/rational_linear_algebra_wrapped.py +135 -0
- snappy/exterior_to_link/simplify_to_base_tri.py +114 -0
- snappy/exterior_to_link/stored_moves.py +475 -0
- snappy/exterior_to_link/test.py +31 -0
- snappy/geometric_structure/__init__.py +212 -0
- snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
- snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
- snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
- snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
- snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
- snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
- snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
- snappy/geometric_structure/geodesic/__init__.py +0 -0
- snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
- snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
- snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
- snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
- snappy/geometric_structure/geodesic/constants.py +6 -0
- snappy/geometric_structure/geodesic/exceptions.py +22 -0
- snappy/geometric_structure/geodesic/fixed_points.py +93 -0
- snappy/geometric_structure/geodesic/geodesic_start_point_info.py +435 -0
- snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
- snappy/geometric_structure/geodesic/line.py +30 -0
- snappy/geometric_structure/geodesic/multiplicity.py +127 -0
- snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
- snappy/geometric_structure/test.py +22 -0
- snappy/gui.py +36 -36
- snappy/horoviewer.py +50 -48
- snappy/hyperboloid/__init__.py +212 -0
- snappy/hyperboloid/distances.py +245 -0
- snappy/hyperboloid/horoball.py +19 -0
- snappy/hyperboloid/line.py +35 -0
- snappy/hyperboloid/point.py +9 -0
- snappy/hyperboloid/triangle.py +29 -0
- snappy/{infodialog.py → infowindow.py} +32 -33
- snappy/isometry_signature.py +382 -0
- snappy/len_spec/__init__.py +596 -0
- snappy/len_spec/geodesic_info.py +110 -0
- snappy/len_spec/geodesic_key_info_dict.py +117 -0
- snappy/len_spec/geodesic_piece.py +143 -0
- snappy/len_spec/geometric_structure.py +182 -0
- snappy/len_spec/geometry.py +80 -0
- snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
- snappy/len_spec/spine.py +206 -0
- snappy/len_spec/test.py +24 -0
- snappy/len_spec/test_cases.py +69 -0
- snappy/len_spec/tile.py +275 -0
- snappy/len_spec/word.py +86 -0
- snappy/manifolds/__init__.py +1 -1
- snappy/math_basics.py +176 -0
- snappy/matrix.py +525 -0
- snappy/number.py +97 -21
- snappy/numeric_output_checker.py +37 -27
- snappy/pari.py +30 -69
- snappy/phone_home.py +25 -20
- snappy/polyviewer.py +39 -37
- snappy/ptolemy/__init__.py +4 -6
- snappy/ptolemy/component.py +14 -12
- snappy/ptolemy/coordinates.py +312 -295
- snappy/ptolemy/fieldExtensions.py +14 -12
- snappy/ptolemy/findLoops.py +43 -31
- snappy/ptolemy/geometricRep.py +24 -26
- snappy/ptolemy/homology.py +12 -7
- snappy/ptolemy/manifoldMethods.py +69 -70
- snappy/ptolemy/matrix.py +65 -26
- snappy/ptolemy/numericalSolutionsToGroebnerBasis.py +18 -14
- snappy/ptolemy/polynomial.py +125 -119
- snappy/ptolemy/processComponents.py +36 -30
- snappy/ptolemy/processFileBase.py +79 -18
- snappy/ptolemy/processFileDispatch.py +13 -14
- snappy/ptolemy/processMagmaFile.py +44 -39
- snappy/ptolemy/processRurFile.py +18 -11
- snappy/ptolemy/ptolemyGeneralizedObstructionClass.py +20 -17
- snappy/ptolemy/ptolemyObstructionClass.py +13 -17
- snappy/ptolemy/ptolemyVariety.py +190 -121
- snappy/ptolemy/ptolemyVarietyPrimeIdealGroebnerBasis.py +20 -19
- snappy/ptolemy/reginaWrapper.py +25 -29
- snappy/ptolemy/rur.py +6 -14
- snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +27 -22
- snappy/ptolemy/test.py +247 -188
- snappy/ptolemy/utilities.py +41 -43
- snappy/raytracing/__init__.py +64 -0
- snappy/raytracing/additional_horospheres.py +64 -0
- snappy/raytracing/additional_len_spec_choices.py +63 -0
- snappy/raytracing/cohomology_fractal.py +10 -6
- snappy/raytracing/eyeball.py +123 -0
- snappy/raytracing/finite_raytracing_data.py +48 -38
- snappy/raytracing/finite_viewer.py +218 -210
- snappy/raytracing/geodesic_tube_info.py +174 -0
- snappy/raytracing/geodesics.py +246 -0
- snappy/raytracing/geodesics_window.py +258 -0
- snappy/raytracing/gui_utilities.py +152 -40
- snappy/raytracing/hyperboloid_navigation.py +102 -52
- snappy/raytracing/hyperboloid_utilities.py +114 -261
- snappy/raytracing/ideal_raytracing_data.py +256 -179
- snappy/raytracing/inside_viewer.py +522 -253
- snappy/raytracing/pack.py +22 -0
- snappy/raytracing/raytracing_data.py +46 -34
- snappy/raytracing/raytracing_view.py +190 -109
- snappy/raytracing/shaders/Eye.png +0 -0
- snappy/raytracing/shaders/NonGeometric.png +0 -0
- snappy/raytracing/shaders/__init__.py +60 -4
- snappy/raytracing/shaders/fragment.glsl +575 -148
- snappy/raytracing/test.py +29 -0
- snappy/raytracing/tooltip.py +146 -0
- snappy/raytracing/upper_halfspace_utilities.py +98 -0
- snappy/raytracing/view_scale_controller.py +98 -0
- snappy/raytracing/zoom_slider/__init__.py +32 -29
- snappy/raytracing/zoom_slider/test.py +2 -0
- snappy/sage_helper.py +69 -123
- snappy/{preferences.py → settings.py} +167 -145
- snappy/shell.py +4 -0
- snappy/snap/__init__.py +12 -8
- snappy/snap/character_varieties.py +24 -18
- snappy/snap/find_field.py +35 -34
- snappy/snap/fundamental_polyhedron.py +99 -85
- snappy/snap/generators.py +6 -8
- snappy/snap/interval_reps.py +18 -6
- snappy/snap/kernel_structures.py +8 -3
- snappy/snap/mcomplex_base.py +1 -2
- snappy/snap/nsagetools.py +107 -53
- snappy/snap/peripheral/__init__.py +1 -1
- snappy/snap/peripheral/dual_cellulation.py +15 -7
- snappy/snap/peripheral/link.py +20 -16
- snappy/snap/peripheral/peripheral.py +22 -14
- snappy/snap/peripheral/surface.py +47 -50
- snappy/snap/peripheral/test.py +8 -8
- snappy/snap/polished_reps.py +65 -40
- snappy/snap/shapes.py +41 -22
- snappy/snap/slice_obs_HKL.py +64 -25
- snappy/snap/t3mlite/arrow.py +88 -51
- snappy/snap/t3mlite/corner.py +5 -6
- snappy/snap/t3mlite/edge.py +32 -21
- snappy/snap/t3mlite/face.py +7 -9
- snappy/snap/t3mlite/files.py +31 -23
- snappy/snap/t3mlite/homology.py +14 -10
- snappy/snap/t3mlite/linalg.py +158 -56
- snappy/snap/t3mlite/mcomplex.py +739 -291
- snappy/snap/t3mlite/perm4.py +236 -84
- snappy/snap/t3mlite/setup.py +9 -10
- snappy/snap/t3mlite/simplex.py +65 -48
- snappy/snap/t3mlite/spun.py +42 -30
- snappy/snap/t3mlite/surface.py +45 -45
- snappy/snap/t3mlite/test.py +3 -0
- snappy/snap/t3mlite/test_vs_regina.py +17 -13
- snappy/snap/t3mlite/tetrahedron.py +25 -24
- snappy/snap/t3mlite/vertex.py +8 -13
- snappy/snap/test.py +45 -52
- snappy/snap/utilities.py +66 -65
- snappy/test.py +155 -158
- snappy/test_cases.py +263 -0
- snappy/testing.py +131 -0
- snappy/tiling/__init__.py +2 -0
- snappy/tiling/canonical_key_dict.py +59 -0
- snappy/tiling/dict_based_set.py +79 -0
- snappy/tiling/floor.py +49 -0
- snappy/tiling/hyperboloid_dict.py +54 -0
- snappy/tiling/iter_utils.py +78 -0
- snappy/tiling/lifted_tetrahedron.py +22 -0
- snappy/tiling/lifted_tetrahedron_set.py +54 -0
- snappy/tiling/real_hash_dict.py +164 -0
- snappy/tiling/test.py +23 -0
- snappy/tiling/tile.py +215 -0
- snappy/tiling/triangle.py +33 -0
- snappy/tkterminal.py +313 -203
- snappy/twister/main.py +1 -8
- snappy/twister/twister_core.cpython-38-darwin.so +0 -0
- snappy/upper_halfspace/__init__.py +146 -0
- snappy/upper_halfspace/ideal_point.py +26 -0
- snappy/verify/__init__.py +4 -8
- snappy/verify/{verifyCanonical.py → canonical.py} +114 -97
- snappy/verify/complex_volume/__init__.py +3 -2
- snappy/verify/complex_volume/adjust_torsion.py +13 -11
- snappy/verify/complex_volume/closed.py +29 -24
- snappy/verify/complex_volume/compute_ptolemys.py +8 -6
- snappy/verify/complex_volume/cusped.py +10 -9
- snappy/verify/complex_volume/extended_bloch.py +14 -12
- snappy/verify/{cuspTranslations.py → cusp_translations.py} +15 -14
- snappy/verify/edge_equations.py +80 -0
- snappy/verify/exceptions.py +23 -56
- snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +19 -15
- snappy/verify/interval_newton_shapes_engine.py +51 -211
- snappy/verify/interval_tree.py +27 -25
- snappy/verify/krawczyk_shapes_engine.py +47 -50
- snappy/verify/maximal_cusp_area_matrix/__init__.py +17 -86
- snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +58 -48
- snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +53 -57
- snappy/verify/{realAlgebra.py → real_algebra.py} +26 -20
- snappy/verify/shapes.py +10 -7
- snappy/verify/short_slopes.py +41 -42
- snappy/verify/{squareExtensions.py → square_extensions.py} +96 -92
- snappy/verify/test.py +59 -57
- snappy/verify/upper_halfspace/extended_matrix.py +5 -5
- snappy/verify/upper_halfspace/finite_point.py +44 -31
- snappy/verify/upper_halfspace/ideal_point.py +69 -57
- snappy/verify/volume.py +15 -12
- snappy/version.py +2 -3
- {snappy-3.0.3.dist-info → snappy-3.2.dist-info}/METADATA +14 -12
- snappy-3.2.dist-info/RECORD +503 -0
- {snappy-3.0.3.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
- {snappy-3.0.3.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -1
- {snappy-3.0.3.dist-info → snappy-3.2.dist-info}/top_level.txt +10 -1
- snappy/doc/_sources/verify_canon.rst.txt +0 -90
- snappy/doc/_static/classic.css +0 -266
- snappy/doc/_static/jquery-3.5.1.js +0 -10872
- snappy/doc/_static/sidebar.js +0 -159
- snappy/doc/_static/underscore-1.13.1.js +0 -2042
- snappy/doc/_static/underscore.js +0 -6
- snappy/doc/verify_canon.html +0 -283
- snappy/ppm_to_png.py +0 -243
- snappy/togl/__init__.py +0 -3
- snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
- snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
- snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
- snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
- snappy/verify/cuspCrossSection.py +0 -1413
- snappy/verify/mathHelpers.py +0 -64
- snappy-3.0.3.dist-info/RECORD +0 -360
snappy/snap/nsagetools.py
CHANGED
@@ -1,16 +1,13 @@
|
|
1
1
|
"""
|
2
2
|
Tools for use in Sage.
|
3
3
|
"""
|
4
|
-
|
5
|
-
import os, sys, re, string, tempfile
|
4
|
+
import string
|
6
5
|
from ..sage_helper import _within_sage, sage_method
|
7
6
|
|
8
7
|
if _within_sage:
|
9
|
-
import
|
10
|
-
from
|
11
|
-
|
12
|
-
SageObject, PolynomialRing, LaurentPolynomialRing)
|
13
|
-
|
8
|
+
from ..sage_helper import ZZ, vector, matrix, block_matrix, identity_matrix, gcd, prod, det
|
9
|
+
from ..sage_helper import MatrixSpace, PolynomialRing, LaurentPolynomialRing
|
10
|
+
from ..sage_helper import SageObject, AbelianGroup, GroupAlgebra
|
14
11
|
from .polished_reps import polished_holonomy, MatrixRepresentation
|
15
12
|
Id2 = MatrixSpace(ZZ, 2)(1)
|
16
13
|
else:
|
@@ -36,15 +33,16 @@ def search_for_low_rank_triangulation(M, tries=100, target_lower_bound=0):
|
|
36
33
|
return rank_upper_bound, rank_lower_bound, curr_best_tri
|
37
34
|
|
38
35
|
|
39
|
-
|
36
|
+
# ----------------------------------------------------------------
|
40
37
|
#
|
41
38
|
# Abelianization of the fundamental group
|
42
39
|
#
|
43
|
-
|
40
|
+
# ----------------------------------------------------------------
|
44
41
|
|
45
42
|
def abelianize_word(word, gens):
|
46
43
|
return vector(ZZ, [ word.count(g) - word.count(g.swapcase()) for g in gens])
|
47
44
|
|
45
|
+
|
48
46
|
class MapToAbelianization(SageObject):
|
49
47
|
"""
|
50
48
|
sage: M = Manifold('v2037')
|
@@ -108,6 +106,7 @@ class MapToAbelianization(SageObject):
|
|
108
106
|
def __call__(self, word):
|
109
107
|
return self._range(self._exponents_of_word(word))
|
110
108
|
|
109
|
+
|
111
110
|
class MapToFreeAbelianization(MapToAbelianization):
|
112
111
|
def range(self):
|
113
112
|
return ZZ**self.elementary_divisors.count(0)
|
@@ -119,6 +118,7 @@ class MapToFreeAbelianization(MapToAbelianization):
|
|
119
118
|
|
120
119
|
# Finding the longitude
|
121
120
|
|
121
|
+
|
122
122
|
@sage_method
|
123
123
|
def homological_longitude(manifold, cusp=None):
|
124
124
|
"""
|
@@ -162,18 +162,18 @@ def homological_longitude(manifold, cusp=None):
|
|
162
162
|
G = manifold.fundamental_group()
|
163
163
|
f = MapToFreeAbelianization(G)
|
164
164
|
m, l = G.peripheral_curves()[cusp]
|
165
|
-
kernel_basis =
|
165
|
+
kernel_basis = matrix(ZZ, [f(m), f(l)]).left_kernel().basis()
|
166
166
|
if len(kernel_basis) >= 2:
|
167
167
|
raise ValueError('Every curve on cusp is homologically trivial')
|
168
168
|
if len(kernel_basis) == 0:
|
169
169
|
return None
|
170
170
|
return kernel_basis[0]
|
171
171
|
|
172
|
-
|
172
|
+
# --------------------------------------------------------------
|
173
173
|
#
|
174
174
|
# Computing the Alexander polynomial
|
175
175
|
#
|
176
|
-
|
176
|
+
# --------------------------------------------------------------
|
177
177
|
|
178
178
|
|
179
179
|
class MapToGroupRingOfAbelianization(MapToAbelianization):
|
@@ -196,6 +196,7 @@ class MapToGroupRingOfAbelianization(MapToAbelianization):
|
|
196
196
|
v = MapToAbelianization.__call__(self, word)
|
197
197
|
return self.R.monomial(v)
|
198
198
|
|
199
|
+
|
199
200
|
class MapToGroupRingOfFreeAbelianization(MapToFreeAbelianization):
|
200
201
|
def __init__(self, fund_group, base_ring=ZZ):
|
201
202
|
MapToFreeAbelianization.__init__(self, fund_group)
|
@@ -209,6 +210,7 @@ class MapToGroupRingOfFreeAbelianization(MapToFreeAbelianization):
|
|
209
210
|
v = MapToFreeAbelianization.__call__(self, word)
|
210
211
|
return prod([ g**v[i] for i, g in enumerate(self.R.gens())])
|
211
212
|
|
213
|
+
|
212
214
|
def setup_fox_derivative(word, phi, var, involute=False):
|
213
215
|
R = phi.range()
|
214
216
|
if len(word) == 0:
|
@@ -230,6 +232,7 @@ def setup_fox_derivative(word, phi, var, involute=False):
|
|
230
232
|
|
231
233
|
return R, phi_ims, fox_ders
|
232
234
|
|
235
|
+
|
233
236
|
def fox_derivative(word, phi, var):
|
234
237
|
"""
|
235
238
|
Given a homorphism phi of a group pi, computes
|
@@ -239,11 +242,11 @@ def fox_derivative(word, phi, var):
|
|
239
242
|
|
240
243
|
R, phi_ims, fox_ders = setup_fox_derivative(word, phi, var)
|
241
244
|
D = 0
|
242
|
-
curr_prod = R.one()
|
243
245
|
for w in reverse_word(word):
|
244
|
-
D = fox_ders[w] + phi_ims[w]*D
|
246
|
+
D = fox_ders[w] + phi_ims[w] * D
|
245
247
|
return D
|
246
248
|
|
249
|
+
|
247
250
|
def fox_derivative_with_involution(word, phi, var):
|
248
251
|
"""
|
249
252
|
The group ring Z[pi] has a natural involution iota sends
|
@@ -254,11 +257,11 @@ def fox_derivative_with_involution(word, phi, var):
|
|
254
257
|
"""
|
255
258
|
R, phi_ims, fox_ders = setup_fox_derivative(word, phi, var, involute=True)
|
256
259
|
D = 0
|
257
|
-
curr_prod = R.one()
|
258
260
|
for w in reverse_word(word):
|
259
|
-
D = fox_ders[w] + D*phi_ims[w]
|
261
|
+
D = fox_ders[w] + D * phi_ims[w]
|
260
262
|
return D
|
261
263
|
|
264
|
+
|
262
265
|
# It's best to deal with matrices of polynomials rather than Laurent
|
263
266
|
# polynomials, so we need to be able to clear denominators. This add
|
264
267
|
# to the complexity of the code.
|
@@ -303,6 +306,8 @@ def alexander_polynomial_basic(G, phi):
|
|
303
306
|
M = matrix(P, [[ convert_laurent_to_poly(p, minexp, P) for p in row]
|
304
307
|
for row in M])
|
305
308
|
alex_poly = gcd(M.minors(G.num_generators() - 1))
|
309
|
+
if alex_poly == 0:
|
310
|
+
return alex_poly
|
306
311
|
# Normalize it
|
307
312
|
return convert_laurent_to_poly(alex_poly, minimum_exponents( [alex_poly] ), P)
|
308
313
|
|
@@ -325,21 +330,27 @@ def alexander_polynomial(manifold, **kwargs):
|
|
325
330
|
sage: N.alexander_polynomial()
|
326
331
|
a^2*b + a*b^2 + a*b + a + b
|
327
332
|
|
328
|
-
Any provided keyword arguments are passed to
|
333
|
+
Any provided keyword arguments are passed to
|
334
|
+
:meth:`fundamental_group <snappy.Triangulation.fundamental_group>` and
|
329
335
|
so affect the group presentation used in the computation.
|
330
336
|
"""
|
337
|
+
if manifold.homology().order() != 'infinite':
|
338
|
+
raise ValueError(
|
339
|
+
"Alexander polynomial only defined for manifolds with "
|
340
|
+
"infinite homology.")
|
341
|
+
|
331
342
|
ans = alexander_polynomial_group(manifold.fundamental_group(**kwargs))
|
332
343
|
coeffs = ans.coefficients()
|
333
344
|
if coeffs and coeffs[0] < 0:
|
334
345
|
ans = -ans
|
335
346
|
return ans
|
336
347
|
|
337
|
-
|
348
|
+
# --------------------------------------------------------------
|
338
349
|
#
|
339
350
|
# Computing the twisted torsion polynomials
|
340
351
|
# for deficiency one presentations.
|
341
352
|
#
|
342
|
-
|
353
|
+
# --------------------------------------------------------------
|
343
354
|
|
344
355
|
|
345
356
|
class PhiAlpha():
|
@@ -358,39 +369,47 @@ class PhiAlpha():
|
|
358
369
|
M[0,0], M[0,1], M[1,0], M[1,1] = a*A[0,0], a*A[0,1], a*A[1,0], a*A[1,1]
|
359
370
|
return M
|
360
371
|
|
372
|
+
|
361
373
|
def free_monoid_elt_to_string(elt):
|
362
374
|
vars = elt.parent().variable_names()
|
363
375
|
return "".join([e*vars[v] for v, e in elt._element_list])
|
364
376
|
|
377
|
+
|
365
378
|
def inverse_word(word):
|
366
379
|
L = list(word.swapcase())
|
367
380
|
L.reverse()
|
368
381
|
return "".join(L)
|
369
382
|
|
383
|
+
|
370
384
|
def reverse_word(word):
|
371
385
|
L = list(word)
|
372
386
|
L.reverse()
|
373
387
|
return "".join(L)
|
374
388
|
|
389
|
+
|
375
390
|
def clean_RR(r, error):
|
376
391
|
return 0 if abs(r) < error else r
|
377
392
|
|
393
|
+
|
378
394
|
def clean_CC(z, error):
|
379
395
|
CC = z.parent()
|
380
396
|
return CC( clean_RR(z.real(),error), clean_RR(z.imag(), error) ) if not CC.is_exact() else z
|
381
397
|
|
398
|
+
|
382
399
|
def univ_exponents(p):
|
383
400
|
try:
|
384
401
|
return [a[0] for a in p.exponents()]
|
385
402
|
except TypeError:
|
386
403
|
return p.exponents()
|
387
404
|
|
405
|
+
|
388
406
|
def clean_laurent(p, error):
|
389
407
|
R = p.parent()
|
390
408
|
t = R.gen()
|
391
409
|
new_coeffs = [clean_CC(z, error) for z in p.coefficients()]
|
392
410
|
return sum( [a*t**n for a , n in zip(new_coeffs, univ_exponents(p))], R.zero())
|
393
411
|
|
412
|
+
|
394
413
|
def clean_laurent_to_poly(p, error=10**-8):
|
395
414
|
R = p.parent()
|
396
415
|
P = PolynomialRing(R.base_ring(), R.variable_names())
|
@@ -402,20 +421,23 @@ def clean_laurent_to_poly(p, error=10**-8):
|
|
402
421
|
m = min(exponents)
|
403
422
|
return sum( [a*t**(n-m) for a,n in zip(cp.coefficients(), exponents)], P(0))
|
404
423
|
|
424
|
+
|
405
425
|
def univ_abs(z):
|
406
426
|
"""
|
407
427
|
Compute a reasonable choice for the absolute value of z.
|
408
428
|
"""
|
409
429
|
try:
|
410
430
|
return z.abs()
|
411
|
-
except:
|
431
|
+
except (TypeError, AttributeError):
|
412
432
|
if hasattr(z, 'coefficients'):
|
413
433
|
return max([0,] + [univ_abs(c) for c in z.coefficients()])
|
414
434
|
else:
|
415
435
|
return 0 if z == 0 else Infinity
|
416
436
|
|
437
|
+
|
417
438
|
def univ_matrix_norm(A):
|
418
|
-
return max([0
|
439
|
+
return max([0] + [univ_abs(a) for a in A.list()])
|
440
|
+
|
419
441
|
|
420
442
|
def matrix_has_small_entries(A, bound):
|
421
443
|
if A.base_ring().is_exact():
|
@@ -423,6 +445,7 @@ def matrix_has_small_entries(A, bound):
|
|
423
445
|
else:
|
424
446
|
return univ_matrix_norm(A) < bound
|
425
447
|
|
448
|
+
|
426
449
|
def last_square_submatrix(A):
|
427
450
|
r, c = A.nrows(), A.ncols()
|
428
451
|
if r <= c:
|
@@ -430,6 +453,7 @@ def last_square_submatrix(A):
|
|
430
453
|
else:
|
431
454
|
return A.matrix_from_rows( range( r - c, r) )
|
432
455
|
|
456
|
+
|
433
457
|
def first_square_submatrix(A):
|
434
458
|
r, c = A.nrows(), A.ncols()
|
435
459
|
if r <= c:
|
@@ -441,25 +465,6 @@ def first_square_submatrix(A):
|
|
441
465
|
class TorsionComputationError(Exception):
|
442
466
|
pass
|
443
467
|
|
444
|
-
@sage_method
|
445
|
-
def hyperbolic_torsion(manifold, bits_prec=100, all_lifts=False, wada_conventions=False, phi=None):
|
446
|
-
"""
|
447
|
-
Computes the hyperbolic torsion polynomial as defined in
|
448
|
-
`[DFJ] <http://arxiv.org/abs/1108.3045>`_::
|
449
|
-
|
450
|
-
sage: M = Manifold('K11n42')
|
451
|
-
sage: M.alexander_polynomial()
|
452
|
-
1
|
453
|
-
sage: tau = M.hyperbolic_torsion(bits_prec=200)
|
454
|
-
sage: tau.degree()
|
455
|
-
6
|
456
|
-
"""
|
457
|
-
G = alpha = polished_holonomy(manifold, bits_prec=bits_prec, lift_to_SL2 = True)
|
458
|
-
if not all_lifts:
|
459
|
-
return compute_torsion(G, bits_prec, alpha, phi, wada_conventions=wada_conventions)
|
460
|
-
else:
|
461
|
-
return [compute_torsion(G, bits_prec, beta, phi, wada_conventions=wada_conventions)
|
462
|
-
for beta in alpha.all_lifts_to_SL2C()]
|
463
468
|
|
464
469
|
def fast_determinant_of_laurent_poly_matrix(A):
|
465
470
|
"""
|
@@ -468,14 +473,17 @@ def fast_determinant_of_laurent_poly_matrix(A):
|
|
468
473
|
polynomial entries.
|
469
474
|
"""
|
470
475
|
R = A.base_ring()
|
471
|
-
minexp = minimum_exponents(A.list())
|
472
476
|
P = R.polynomial_ring()
|
477
|
+
if A == 0:
|
478
|
+
return P(0)
|
479
|
+
minexp = minimum_exponents(A.list())
|
473
480
|
MS = A.parent().change_ring(P)
|
474
481
|
Ap = MS([convert_laurent_to_poly(p, minexp, P) for p in A.list()])
|
475
482
|
return Ap.det()
|
476
483
|
|
477
|
-
|
478
|
-
|
484
|
+
|
485
|
+
def compute_torsion(G, bits_prec, alpha=None, phi=None, phialpha=None,
|
486
|
+
return_parts=False, return_as_poly=True,
|
479
487
|
wada_conventions=False, symmetry_test=True):
|
480
488
|
if alpha:
|
481
489
|
F = alpha('a').base_ring()
|
@@ -484,12 +492,19 @@ def compute_torsion(G, bits_prec, alpha=None, phi=None, phialpha = None,
|
|
484
492
|
epsilon = ZZ(2)**(-bits_prec//3) if not F.is_exact() else None
|
485
493
|
big_epsilon = ZZ(2)**(-bits_prec//5) if not F.is_exact() else None
|
486
494
|
gens, rels = G.generators(), G.relators()
|
495
|
+
|
496
|
+
if len(rels) != len(gens) - 1:
|
497
|
+
raise ValueError(
|
498
|
+
"Algorithm to compute torsion requires a group presentation "
|
499
|
+
"with deficiency one")
|
500
|
+
|
487
501
|
k = len(gens)
|
488
502
|
if phi is None:
|
489
503
|
phi = MapToGroupRingOfFreeAbelianization(G, F)
|
490
504
|
|
491
|
-
|
492
|
-
|
505
|
+
if len(phi.range().gens()) != 1:
|
506
|
+
raise ValueError(
|
507
|
+
"Algorithm to compute torsion requires betti number 1")
|
493
508
|
|
494
509
|
# Want the first variable to be homologically nontrivial
|
495
510
|
i0 = [i for i, g in enumerate(gens) if phi(g) != 1][0]
|
@@ -502,18 +517,18 @@ def compute_torsion(G, bits_prec, alpha=None, phi=None, phialpha = None,
|
|
502
517
|
if not wada_conventions: # Using the conventions of our paper.
|
503
518
|
d2 = [ [fox_derivative_with_involution(R, phialpha, g) for R in rels] for g in gens]
|
504
519
|
d2 = block_matrix(d2, nrows=k, ncols=k-1)
|
505
|
-
d1 = [phialpha(g.swapcase())
|
520
|
+
d1 = [phialpha(g.swapcase()) - 1 for g in gens]
|
506
521
|
d1 = block_matrix(d1, nrows=1, ncols=k)
|
507
522
|
dsquared = d1 * d2
|
508
523
|
|
509
524
|
else: # Using those implicit in Wada's paper.
|
510
525
|
d2 = [ [fox_derivative(R, phialpha, g) for g in gens] for R in rels]
|
511
526
|
d2 = block_matrix(sum(d2, []), nrows=k-1, ncols=k)
|
512
|
-
d1 = [phialpha(g)
|
527
|
+
d1 = [phialpha(g) - 1 for g in gens]
|
513
528
|
d1 = block_matrix(d1, nrows=k, ncols=1)
|
514
529
|
dsquared = d2 * d1
|
515
530
|
|
516
|
-
if not matrix_has_small_entries( dsquared
|
531
|
+
if not matrix_has_small_entries( dsquared, epsilon ):
|
517
532
|
raise TorsionComputationError("(boundary)^2 != 0")
|
518
533
|
|
519
534
|
T = last_square_submatrix(d2)
|
@@ -542,24 +557,25 @@ def compute_torsion(G, bits_prec, alpha=None, phi=None, phialpha = None,
|
|
542
557
|
|
543
558
|
if symmetry_test:
|
544
559
|
coeffs = ans.coefficients()
|
545
|
-
error = max(
|
560
|
+
error = max([univ_abs(a-b) for a,b in zip(coeffs, reversed(coeffs))], default=0)
|
546
561
|
if (not F.is_exact() and error > epsilon) or (F.is_exact() and error != 0):
|
547
562
|
raise TorsionComputationError("Torsion polynomial doesn't seem symmetric")
|
548
563
|
|
549
564
|
return ans
|
550
565
|
|
551
|
-
|
566
|
+
# --------------------------------------------------------------
|
552
567
|
#
|
553
568
|
# Computing the torsion polynomials
|
554
569
|
# for the *adjoint* representation
|
555
570
|
# i.e. the poly of Dubois-Yamaguichi
|
556
|
-
|
571
|
+
# --------------------------------------------------------------
|
557
572
|
|
558
573
|
|
559
574
|
def adjoint_action(A):
|
560
575
|
a, b, c, d = A.list()
|
561
576
|
return matrix( [[a**2, 2*a*b, b**2],[a*c,b*c+a*d,b*d],[c**2,2*c*d,d**2]] )
|
562
577
|
|
578
|
+
|
563
579
|
def SL2_to_SLN(A, N):
|
564
580
|
F = A.base_ring()
|
565
581
|
R = PolynomialRing(F, ['x', 'y'])
|
@@ -569,6 +585,7 @@ def SL2_to_SLN(A, N):
|
|
569
585
|
image_vectors = [m(X, Y) for m in monomials]
|
570
586
|
return matrix(F, [[v.monomial_coefficient(m) for m in monomials] for v in image_vectors])
|
571
587
|
|
588
|
+
|
572
589
|
class PhiAlpha3():
|
573
590
|
def __init__(self, phi, alpha):
|
574
591
|
self.base_ring = phi.range()
|
@@ -588,6 +605,7 @@ class PhiAlpha3():
|
|
588
605
|
|
589
606
|
return M
|
590
607
|
|
608
|
+
|
591
609
|
class PhiAlphaN():
|
592
610
|
def __init__(self, phi, alpha, N):
|
593
611
|
self.base_ring = phi.range()
|
@@ -607,11 +625,40 @@ class PhiAlphaN():
|
|
607
625
|
|
608
626
|
return M
|
609
627
|
|
628
|
+
|
610
629
|
def test_rep(G, phialpha):
|
611
630
|
def manually_apply_word(w):
|
612
631
|
return prod(phialpha(x) for x in w)
|
613
632
|
return max([univ_matrix_norm(manually_apply_word(R) - 1) for R in G.relators()])
|
614
633
|
|
634
|
+
|
635
|
+
@sage_method
|
636
|
+
def hyperbolic_torsion(manifold, bits_prec=100, all_lifts=False, wada_conventions=False, phi=None):
|
637
|
+
"""
|
638
|
+
Computes the hyperbolic torsion polynomial as defined in
|
639
|
+
`[DFJ] <http://arxiv.org/abs/1108.3045>`_::
|
640
|
+
|
641
|
+
sage: M = Manifold('K11n42')
|
642
|
+
sage: M.alexander_polynomial()
|
643
|
+
1
|
644
|
+
sage: tau = M.hyperbolic_torsion(bits_prec=200)
|
645
|
+
sage: tau.degree()
|
646
|
+
6
|
647
|
+
"""
|
648
|
+
if manifold.homology().betti_number() != 1:
|
649
|
+
raise ValueError('Algorithm needs H^1(M; Z) = Z to be able to compute torsion')
|
650
|
+
H = manifold.fundamental_group()
|
651
|
+
if H.num_generators() != H.num_relators() + 1:
|
652
|
+
raise ValueError('Algorithm to compute torsion requires a group presentation '
|
653
|
+
'with deficiency one')
|
654
|
+
G = alpha = polished_holonomy(manifold, bits_prec=bits_prec, lift_to_SL2=True)
|
655
|
+
if not all_lifts:
|
656
|
+
return compute_torsion(G, bits_prec, alpha, phi, wada_conventions=wada_conventions)
|
657
|
+
else:
|
658
|
+
return [compute_torsion(G, bits_prec, beta, phi, wada_conventions=wada_conventions)
|
659
|
+
for beta in alpha.all_lifts_to_SL2C()]
|
660
|
+
|
661
|
+
|
615
662
|
@sage_method
|
616
663
|
def hyperbolic_SLN_torsion(manifold, N, bits_prec=100):
|
617
664
|
"""
|
@@ -623,13 +670,20 @@ def hyperbolic_SLN_torsion(manifold, N, bits_prec=100):
|
|
623
670
|
sage: [M.hyperbolic_SLN_torsion(N).degree() for N in [2, 3, 4]]
|
624
671
|
[18, 27, 36]
|
625
672
|
"""
|
626
|
-
|
673
|
+
if manifold.homology().betti_number() != 1:
|
674
|
+
raise ValueError('Algorithm needs H^1(M; Z) = Z to be able to compute torsion')
|
675
|
+
H = manifold.fundamental_group()
|
676
|
+
if H.num_generators() != H.num_relators() + 1:
|
677
|
+
raise ValueError('Algorithm to compute torsion requires a group presentation '
|
678
|
+
'with deficiency one')
|
627
679
|
G = alpha = polished_holonomy(manifold, bits_prec)
|
628
680
|
phi = MapToGroupRingOfFreeAbelianization(G, alpha('a').base_ring())
|
629
681
|
phialpha = PhiAlphaN(phi, alpha, N)
|
630
|
-
|
682
|
+
if not test_rep(G, phialpha) < ZZ(2)**(bits_prec // 2):
|
683
|
+
raise RuntimeError("Invalid representation")
|
631
684
|
return compute_torsion(G, bits_prec, phialpha=phialpha, symmetry_test=False)
|
632
685
|
|
686
|
+
|
633
687
|
@sage_method
|
634
688
|
def hyperbolic_adjoint_torsion(manifold, bits_prec=100):
|
635
689
|
"""
|
@@ -1 +1 @@
|
|
1
|
-
from .peripheral import peripheral_cohomology_basis
|
1
|
+
from .peripheral import peripheral_cohomology_basis
|
@@ -6,9 +6,11 @@ from ... import sage_helper
|
|
6
6
|
from .. import t3mlite as t3m
|
7
7
|
|
8
8
|
if sage_helper._within_sage:
|
9
|
-
from
|
9
|
+
from ...sage_helper import ZZ, matrix, vector, ChainComplex
|
10
|
+
from sage.graphs.graph import Graph
|
10
11
|
|
11
|
-
|
12
|
+
|
13
|
+
class DualCell():
|
12
14
|
"""
|
13
15
|
A cell in the dual cellulation
|
14
16
|
"""
|
@@ -16,11 +18,13 @@ class DualCell(object):
|
|
16
18
|
self.dual_cell = dual_cell
|
17
19
|
self.index = dual_cell.index
|
18
20
|
|
21
|
+
|
19
22
|
class Vertex(DualCell):
|
20
23
|
"""
|
21
24
|
A vertex of the dual cellulation.
|
22
25
|
"""
|
23
26
|
|
27
|
+
|
24
28
|
class Edge(DualCell):
|
25
29
|
"""
|
26
30
|
An oriented edge of the dual cellulation. The orientation
|
@@ -31,6 +35,7 @@ class Edge(DualCell):
|
|
31
35
|
DualCell.__init__(self, dual_cell)
|
32
36
|
self.vertices = [None, None]
|
33
37
|
|
38
|
+
|
34
39
|
class Face(DualCell):
|
35
40
|
"""
|
36
41
|
A face of the dual cellulation, which is just an n-gon. The
|
@@ -46,13 +51,14 @@ class Face(DualCell):
|
|
46
51
|
def __repr__(self):
|
47
52
|
return "<Face: %s>" % self.index
|
48
53
|
|
49
|
-
|
54
|
+
|
55
|
+
class DualCellulation():
|
50
56
|
"""
|
51
57
|
The dual cellulation to a triangulation of a surface.
|
52
58
|
"""
|
53
59
|
def __init__(self, triangulation):
|
54
60
|
self.dual_triangulation = triangulation
|
55
|
-
self.from_original =
|
61
|
+
self.from_original = {}
|
56
62
|
self.vertices = []
|
57
63
|
self.edges = []
|
58
64
|
self.faces = []
|
@@ -151,7 +157,7 @@ class DualCellulation(object):
|
|
151
157
|
assert CD.homology() == CT.homology()
|
152
158
|
|
153
159
|
|
154
|
-
class OneCycle(
|
160
|
+
class OneCycle():
|
155
161
|
"""
|
156
162
|
A cycle on the 1-skeleton of a DualCellulation.
|
157
163
|
"""
|
@@ -174,7 +180,7 @@ class OneCycle(object):
|
|
174
180
|
G = Graph(multiedges=True)
|
175
181
|
for edge in D.edges:
|
176
182
|
if self.weights[edge.index] != 0:
|
177
|
-
i, j =
|
183
|
+
i, j = (v.index for v in edge.vertices)
|
178
184
|
G.add_edge(i, j, edge.index)
|
179
185
|
|
180
186
|
assert G.num_verts() == G.num_edges()
|
@@ -187,7 +193,8 @@ class OneCycle(object):
|
|
187
193
|
ans.append(OneCycle(self.cellulation, weights))
|
188
194
|
return ans
|
189
195
|
|
190
|
-
|
196
|
+
|
197
|
+
class OneCocycle():
|
191
198
|
"""
|
192
199
|
A cocycle on the 1-skeleton of a DualCellulation.
|
193
200
|
"""
|
@@ -206,6 +213,7 @@ def doctest_globals():
|
|
206
213
|
import link
|
207
214
|
return {'LinkSurface':link.LinkSurface}
|
208
215
|
|
216
|
+
|
209
217
|
if __name__ == '__main__':
|
210
218
|
import doctest
|
211
219
|
doctest.testmod(extraglobs=doctest_globals())
|
snappy/snap/peripheral/link.py
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
r"""
|
2
2
|
Studying the vertex links of triangulations of 3-manifolds.
|
3
3
|
|
4
|
-
Recall that in t3m and SnapPea, a 3-simplex is oriented like this
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
Recall that in t3m and SnapPea, a 3-simplex is oriented like this::
|
5
|
+
|
6
|
+
1
|
7
|
+
/|\
|
8
|
+
/ | \
|
9
|
+
/ | \
|
10
|
+
2---|---3
|
11
|
+
\ | /
|
12
|
+
\ | /
|
13
|
+
\|/
|
14
|
+
0
|
15
15
|
|
16
16
|
Now consider the truncated tetrahedron; there, each vertex gives rise to a
|
17
17
|
small triangular face whose vertices correspond to edges of the original
|
@@ -40,9 +40,11 @@ TruncatedSimplexCorners = {
|
|
40
40
|
VerticesOfFace = { F0 : (V1, V2, V3), F1 : (V0, V3, V2),
|
41
41
|
F2 : (V0, V1, V3), F3 : (V0, V2, V1) }
|
42
42
|
|
43
|
+
|
43
44
|
def cusp_corner_label(v, w):
|
44
45
|
return TruncatedSimplexCorners[v].index( v | w )
|
45
46
|
|
47
|
+
|
46
48
|
class LinkSurface(surface.Surface):
|
47
49
|
def __init__(self, t3m_triangulation):
|
48
50
|
self.parent_triangulation = t3m_triangulation
|
@@ -90,7 +92,7 @@ class LinkSurface(surface.Surface):
|
|
90
92
|
sign = edge.orientation_with_respect_to(tet, a, b)
|
91
93
|
for (v, s) in [(a, sign), (b, -sign)]:
|
92
94
|
label = s*(edge.Index + 1)
|
93
|
-
i = TruncatedSimplexCorners[v].index(a|b)
|
95
|
+
i = TruncatedSimplexCorners[v].index(a | b)
|
94
96
|
tri = tet.CuspCorners[v]
|
95
97
|
tri.vertices[i].index = label
|
96
98
|
|
@@ -110,13 +112,15 @@ class LinkSphere(LinkSurface):
|
|
110
112
|
22
|
111
113
|
"""
|
112
114
|
def __init__(self, t3m_triangulation):
|
113
|
-
|
114
|
-
|
115
|
-
|
115
|
+
N = t3m_triangulation
|
116
|
+
assert len(N.Vertices) == 1 and N.Vertices[0].link_genus() == 0
|
117
|
+
LinkSurface.__init__(self, N)
|
118
|
+
|
116
119
|
|
117
120
|
def doctest_globals():
|
118
121
|
import snappy.snap.t3mlite
|
119
|
-
return {'Mcomplex':snappy.snap.t3mlite.Mcomplex}
|
122
|
+
return {'Mcomplex': snappy.snap.t3mlite.Mcomplex}
|
123
|
+
|
120
124
|
|
121
125
|
if __name__ == '__main__':
|
122
126
|
import doctest
|