snappy 3.2__cp313-cp313-macosx_11_0_arm64.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (503) hide show
  1. snappy/CyOpenGL.cpython-313-darwin.so +0 -0
  2. snappy/SnapPy.cpython-313-darwin.so +0 -0
  3. snappy/SnapPy.ico +0 -0
  4. snappy/SnapPy.png +0 -0
  5. snappy/SnapPyHP.cpython-313-darwin.so +0 -0
  6. snappy/__init__.py +760 -0
  7. snappy/app.py +605 -0
  8. snappy/app_menus.py +372 -0
  9. snappy/browser.py +998 -0
  10. snappy/cache.py +25 -0
  11. snappy/canonical.py +249 -0
  12. snappy/cusps/__init__.py +38 -0
  13. snappy/cusps/cusp_area_matrix.py +101 -0
  14. snappy/cusps/cusp_areas_from_matrix.py +173 -0
  15. snappy/cusps/maximal_cusp_area_matrix.py +136 -0
  16. snappy/cusps/test.py +21 -0
  17. snappy/cusps/trig_cusp_area_matrix.py +63 -0
  18. snappy/database.py +454 -0
  19. snappy/db_utilities.py +79 -0
  20. snappy/decorated_isosig.py +710 -0
  21. snappy/dev/__init__.py +0 -0
  22. snappy/dev/extended_ptolemy/__init__.py +8 -0
  23. snappy/dev/extended_ptolemy/closed.py +106 -0
  24. snappy/dev/extended_ptolemy/complexVolumesClosed.py +149 -0
  25. snappy/dev/extended_ptolemy/direct.py +42 -0
  26. snappy/dev/extended_ptolemy/extended.py +406 -0
  27. snappy/dev/extended_ptolemy/giac_helper.py +43 -0
  28. snappy/dev/extended_ptolemy/giac_rur.py +129 -0
  29. snappy/dev/extended_ptolemy/gluing.py +46 -0
  30. snappy/dev/extended_ptolemy/phc_wrapper.py +220 -0
  31. snappy/dev/extended_ptolemy/printMatrices.py +70 -0
  32. snappy/dev/vericlosed/__init__.py +1 -0
  33. snappy/dev/vericlosed/computeApproxHyperbolicStructureNew.py +159 -0
  34. snappy/dev/vericlosed/computeApproxHyperbolicStructureOrb.py +90 -0
  35. snappy/dev/vericlosed/computeVerifiedHyperbolicStructure.py +111 -0
  36. snappy/dev/vericlosed/gimbalLoopFinder.py +130 -0
  37. snappy/dev/vericlosed/hyperbolicStructure.py +313 -0
  38. snappy/dev/vericlosed/krawczykCertifiedEdgeLengthsEngine.py +165 -0
  39. snappy/dev/vericlosed/oneVertexTruncatedComplex.py +122 -0
  40. snappy/dev/vericlosed/orb/__init__.py +1 -0
  41. snappy/dev/vericlosed/orb/orb_solution_for_snappea_finite_triangulation_mac +0 -0
  42. snappy/dev/vericlosed/parseVertexGramMatrixFile.py +47 -0
  43. snappy/dev/vericlosed/polishApproxHyperbolicStructure.py +61 -0
  44. snappy/dev/vericlosed/test.py +54 -0
  45. snappy/dev/vericlosed/truncatedComplex.py +176 -0
  46. snappy/dev/vericlosed/verificationError.py +58 -0
  47. snappy/dev/vericlosed/verifyHyperbolicStructureEngine.py +177 -0
  48. snappy/doc/_images/SnapPy-196.png +0 -0
  49. snappy/doc/_images/geodesics.jpg +0 -0
  50. snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
  51. snappy/doc/_images/m125_paper_plane.jpg +0 -0
  52. snappy/doc/_images/mac.png +0 -0
  53. snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
  54. snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
  55. snappy/doc/_images/plink-action.png +0 -0
  56. snappy/doc/_images/ubuntu.png +0 -0
  57. snappy/doc/_images/win7.png +0 -0
  58. snappy/doc/_sources/additional_classes.rst.txt +40 -0
  59. snappy/doc/_sources/bugs.rst.txt +14 -0
  60. snappy/doc/_sources/censuses.rst.txt +51 -0
  61. snappy/doc/_sources/credits.rst.txt +75 -0
  62. snappy/doc/_sources/development.rst.txt +259 -0
  63. snappy/doc/_sources/index.rst.txt +182 -0
  64. snappy/doc/_sources/installing.rst.txt +247 -0
  65. snappy/doc/_sources/manifold.rst.txt +6 -0
  66. snappy/doc/_sources/manifoldhp.rst.txt +46 -0
  67. snappy/doc/_sources/news.rst.txt +355 -0
  68. snappy/doc/_sources/other.rst.txt +25 -0
  69. snappy/doc/_sources/platonic_census.rst.txt +20 -0
  70. snappy/doc/_sources/plink.rst.txt +102 -0
  71. snappy/doc/_sources/ptolemy.rst.txt +66 -0
  72. snappy/doc/_sources/ptolemy_classes.rst.txt +42 -0
  73. snappy/doc/_sources/ptolemy_examples1.rst.txt +298 -0
  74. snappy/doc/_sources/ptolemy_examples2.rst.txt +363 -0
  75. snappy/doc/_sources/ptolemy_examples3.rst.txt +301 -0
  76. snappy/doc/_sources/ptolemy_examples4.rst.txt +61 -0
  77. snappy/doc/_sources/ptolemy_prelim.rst.txt +105 -0
  78. snappy/doc/_sources/screenshots.rst.txt +21 -0
  79. snappy/doc/_sources/snap.rst.txt +87 -0
  80. snappy/doc/_sources/snappy.rst.txt +28 -0
  81. snappy/doc/_sources/spherogram.rst.txt +103 -0
  82. snappy/doc/_sources/todo.rst.txt +47 -0
  83. snappy/doc/_sources/triangulation.rst.txt +11 -0
  84. snappy/doc/_sources/tutorial.rst.txt +49 -0
  85. snappy/doc/_sources/verify.rst.txt +210 -0
  86. snappy/doc/_sources/verify_internals.rst.txt +79 -0
  87. snappy/doc/_static/SnapPy-horizontal-128.png +0 -0
  88. snappy/doc/_static/SnapPy.ico +0 -0
  89. snappy/doc/_static/_sphinx_javascript_frameworks_compat.js +123 -0
  90. snappy/doc/_static/basic.css +925 -0
  91. snappy/doc/_static/css/badge_only.css +1 -0
  92. snappy/doc/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  93. snappy/doc/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  94. snappy/doc/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  95. snappy/doc/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  96. snappy/doc/_static/css/fonts/fontawesome-webfont.eot +0 -0
  97. snappy/doc/_static/css/fonts/fontawesome-webfont.svg +2671 -0
  98. snappy/doc/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  99. snappy/doc/_static/css/fonts/fontawesome-webfont.woff +0 -0
  100. snappy/doc/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  101. snappy/doc/_static/css/fonts/lato-bold-italic.woff +0 -0
  102. snappy/doc/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  103. snappy/doc/_static/css/fonts/lato-bold.woff +0 -0
  104. snappy/doc/_static/css/fonts/lato-bold.woff2 +0 -0
  105. snappy/doc/_static/css/fonts/lato-normal-italic.woff +0 -0
  106. snappy/doc/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  107. snappy/doc/_static/css/fonts/lato-normal.woff +0 -0
  108. snappy/doc/_static/css/fonts/lato-normal.woff2 +0 -0
  109. snappy/doc/_static/css/theme.css +4 -0
  110. snappy/doc/_static/doctools.js +156 -0
  111. snappy/doc/_static/documentation_options.js +13 -0
  112. snappy/doc/_static/file.png +0 -0
  113. snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
  114. snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
  115. snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
  116. snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
  117. snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  118. snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  119. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  120. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  121. snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
  122. snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
  123. snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
  124. snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
  125. snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
  126. snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
  127. snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
  128. snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
  129. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  130. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  131. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  132. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  133. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  134. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  135. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  136. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  137. snappy/doc/_static/jquery.js +2 -0
  138. snappy/doc/_static/js/badge_only.js +1 -0
  139. snappy/doc/_static/js/theme.js +1 -0
  140. snappy/doc/_static/js/versions.js +228 -0
  141. snappy/doc/_static/language_data.js +199 -0
  142. snappy/doc/_static/minus.png +0 -0
  143. snappy/doc/_static/plus.png +0 -0
  144. snappy/doc/_static/pygments.css +75 -0
  145. snappy/doc/_static/searchtools.js +620 -0
  146. snappy/doc/_static/snappy_furo.css +33 -0
  147. snappy/doc/_static/snappy_sphinx_rtd_theme.css +42 -0
  148. snappy/doc/_static/sphinx_highlight.js +154 -0
  149. snappy/doc/additional_classes.html +1500 -0
  150. snappy/doc/bugs.html +132 -0
  151. snappy/doc/censuses.html +427 -0
  152. snappy/doc/credits.html +181 -0
  153. snappy/doc/development.html +384 -0
  154. snappy/doc/genindex.html +1331 -0
  155. snappy/doc/index.html +262 -0
  156. snappy/doc/installing.html +346 -0
  157. snappy/doc/manifold.html +3452 -0
  158. snappy/doc/manifoldhp.html +180 -0
  159. snappy/doc/news.html +388 -0
  160. snappy/doc/objects.inv +0 -0
  161. snappy/doc/other.html +161 -0
  162. snappy/doc/platonic_census.html +375 -0
  163. snappy/doc/plink.html +210 -0
  164. snappy/doc/ptolemy.html +254 -0
  165. snappy/doc/ptolemy_classes.html +1144 -0
  166. snappy/doc/ptolemy_examples1.html +409 -0
  167. snappy/doc/ptolemy_examples2.html +471 -0
  168. snappy/doc/ptolemy_examples3.html +414 -0
  169. snappy/doc/ptolemy_examples4.html +195 -0
  170. snappy/doc/ptolemy_prelim.html +248 -0
  171. snappy/doc/py-modindex.html +165 -0
  172. snappy/doc/screenshots.html +141 -0
  173. snappy/doc/search.html +135 -0
  174. snappy/doc/searchindex.js +1 -0
  175. snappy/doc/snap.html +202 -0
  176. snappy/doc/snappy.html +181 -0
  177. snappy/doc/spherogram.html +1211 -0
  178. snappy/doc/todo.html +166 -0
  179. snappy/doc/triangulation.html +1584 -0
  180. snappy/doc/tutorial.html +159 -0
  181. snappy/doc/verify.html +330 -0
  182. snappy/doc/verify_internals.html +1235 -0
  183. snappy/drilling/__init__.py +456 -0
  184. snappy/drilling/barycentric.py +103 -0
  185. snappy/drilling/constants.py +5 -0
  186. snappy/drilling/crush.py +270 -0
  187. snappy/drilling/cusps.py +125 -0
  188. snappy/drilling/debug.py +242 -0
  189. snappy/drilling/epsilons.py +6 -0
  190. snappy/drilling/exceptions.py +55 -0
  191. snappy/drilling/moves.py +620 -0
  192. snappy/drilling/peripheral_curves.py +210 -0
  193. snappy/drilling/perturb.py +188 -0
  194. snappy/drilling/shorten.py +36 -0
  195. snappy/drilling/subdivide.py +274 -0
  196. snappy/drilling/test.py +23 -0
  197. snappy/drilling/test_cases.py +126 -0
  198. snappy/drilling/tracing.py +351 -0
  199. snappy/exceptions.py +26 -0
  200. snappy/export_stl.py +120 -0
  201. snappy/exterior_to_link/__init__.py +2 -0
  202. snappy/exterior_to_link/barycentric_geometry.py +463 -0
  203. snappy/exterior_to_link/exceptions.py +6 -0
  204. snappy/exterior_to_link/geodesic_map.json +14408 -0
  205. snappy/exterior_to_link/hyp_utils.py +112 -0
  206. snappy/exterior_to_link/link_projection.py +323 -0
  207. snappy/exterior_to_link/main.py +197 -0
  208. snappy/exterior_to_link/mcomplex_with_expansion.py +261 -0
  209. snappy/exterior_to_link/mcomplex_with_link.py +687 -0
  210. snappy/exterior_to_link/mcomplex_with_memory.py +162 -0
  211. snappy/exterior_to_link/pl_utils.py +491 -0
  212. snappy/exterior_to_link/put_in_S3.py +156 -0
  213. snappy/exterior_to_link/rational_linear_algebra.py +123 -0
  214. snappy/exterior_to_link/rational_linear_algebra_wrapped.py +135 -0
  215. snappy/exterior_to_link/simplify_to_base_tri.py +114 -0
  216. snappy/exterior_to_link/stored_moves.py +475 -0
  217. snappy/exterior_to_link/test.py +31 -0
  218. snappy/filedialog.py +28 -0
  219. snappy/geometric_structure/__init__.py +212 -0
  220. snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
  221. snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
  222. snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
  223. snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
  224. snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
  225. snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
  226. snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
  227. snappy/geometric_structure/geodesic/__init__.py +0 -0
  228. snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
  229. snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
  230. snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
  231. snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
  232. snappy/geometric_structure/geodesic/constants.py +6 -0
  233. snappy/geometric_structure/geodesic/exceptions.py +22 -0
  234. snappy/geometric_structure/geodesic/fixed_points.py +93 -0
  235. snappy/geometric_structure/geodesic/geodesic_start_point_info.py +435 -0
  236. snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
  237. snappy/geometric_structure/geodesic/line.py +30 -0
  238. snappy/geometric_structure/geodesic/multiplicity.py +127 -0
  239. snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
  240. snappy/geometric_structure/test.py +22 -0
  241. snappy/gui.py +121 -0
  242. snappy/horoviewer.py +443 -0
  243. snappy/hyperboloid/__init__.py +212 -0
  244. snappy/hyperboloid/distances.py +245 -0
  245. snappy/hyperboloid/horoball.py +19 -0
  246. snappy/hyperboloid/line.py +35 -0
  247. snappy/hyperboloid/point.py +9 -0
  248. snappy/hyperboloid/triangle.py +29 -0
  249. snappy/info_icon.gif +0 -0
  250. snappy/infowindow.py +65 -0
  251. snappy/isometry_signature.py +382 -0
  252. snappy/len_spec/__init__.py +596 -0
  253. snappy/len_spec/geodesic_info.py +110 -0
  254. snappy/len_spec/geodesic_key_info_dict.py +117 -0
  255. snappy/len_spec/geodesic_piece.py +143 -0
  256. snappy/len_spec/geometric_structure.py +182 -0
  257. snappy/len_spec/geometry.py +80 -0
  258. snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
  259. snappy/len_spec/spine.py +206 -0
  260. snappy/len_spec/test.py +24 -0
  261. snappy/len_spec/test_cases.py +69 -0
  262. snappy/len_spec/tile.py +275 -0
  263. snappy/len_spec/word.py +86 -0
  264. snappy/manifolds/HTWKnots/alternating.gz +0 -0
  265. snappy/manifolds/HTWKnots/nonalternating.gz +0 -0
  266. snappy/manifolds/__init__.py +3 -0
  267. snappy/math_basics.py +176 -0
  268. snappy/matrix.py +525 -0
  269. snappy/number.py +657 -0
  270. snappy/numeric_output_checker.py +345 -0
  271. snappy/pari.py +41 -0
  272. snappy/phone_home.py +57 -0
  273. snappy/polyviewer.py +259 -0
  274. snappy/ptolemy/__init__.py +17 -0
  275. snappy/ptolemy/component.py +103 -0
  276. snappy/ptolemy/coordinates.py +2290 -0
  277. snappy/ptolemy/fieldExtensions.py +153 -0
  278. snappy/ptolemy/findLoops.py +473 -0
  279. snappy/ptolemy/geometricRep.py +59 -0
  280. snappy/ptolemy/homology.py +165 -0
  281. snappy/ptolemy/magma/default.magma_template +229 -0
  282. snappy/ptolemy/magma/radicalsOfPrimaryDecomposition.magma_template +79 -0
  283. snappy/ptolemy/manifoldMethods.py +395 -0
  284. snappy/ptolemy/matrix.py +350 -0
  285. snappy/ptolemy/numericalSolutionsToGroebnerBasis.py +113 -0
  286. snappy/ptolemy/polynomial.py +857 -0
  287. snappy/ptolemy/processComponents.py +173 -0
  288. snappy/ptolemy/processFileBase.py +247 -0
  289. snappy/ptolemy/processFileDispatch.py +46 -0
  290. snappy/ptolemy/processMagmaFile.py +392 -0
  291. snappy/ptolemy/processRurFile.py +150 -0
  292. snappy/ptolemy/ptolemyGeneralizedObstructionClass.py +102 -0
  293. snappy/ptolemy/ptolemyObstructionClass.py +64 -0
  294. snappy/ptolemy/ptolemyVariety.py +1029 -0
  295. snappy/ptolemy/ptolemyVarietyPrimeIdealGroebnerBasis.py +140 -0
  296. snappy/ptolemy/reginaWrapper.py +698 -0
  297. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c0.magma_out.bz2 +0 -0
  298. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c1.magma_out.bz2 +0 -0
  299. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c2.magma_out.bz2 +0 -0
  300. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c3.magma_out.bz2 +0 -0
  301. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c4.magma_out.bz2 +0 -0
  302. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c5.magma_out.bz2 +0 -0
  303. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c6.magma_out.bz2 +0 -0
  304. snappy/ptolemy/regina_testing_files/DT_mcbbiceaibjklmdfgh__sl2_c7.magma_out.bz2 +0 -0
  305. snappy/ptolemy/regina_testing_files_generalized/m003__sl3_c0.magma_out.bz2 +0 -0
  306. snappy/ptolemy/regina_testing_files_generalized/m003__sl3_c1.magma_out.bz2 +0 -0
  307. snappy/ptolemy/regina_testing_files_generalized/m015__sl2_c0.magma_out.bz2 +0 -0
  308. snappy/ptolemy/regina_testing_files_generalized/m015__sl2_c1.magma_out.bz2 +0 -0
  309. snappy/ptolemy/regina_testing_files_generalized/m015__sl3_c0.magma_out.bz2 +0 -0
  310. snappy/ptolemy/regina_testing_files_generalized/m015__sl3_c1.magma_out.bz2 +0 -0
  311. snappy/ptolemy/rur.py +545 -0
  312. snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +277 -0
  313. snappy/ptolemy/test.py +1126 -0
  314. snappy/ptolemy/testing_files/3_1__sl2_c0.magma_out.bz2 +0 -0
  315. snappy/ptolemy/testing_files/3_1__sl2_c1.magma_out.bz2 +0 -0
  316. snappy/ptolemy/testing_files/4_1__sl2_c0.magma_out.bz2 +0 -0
  317. snappy/ptolemy/testing_files/4_1__sl2_c1.magma_out.bz2 +0 -0
  318. snappy/ptolemy/testing_files/4_1__sl3_c0.magma_out.bz2 +0 -0
  319. snappy/ptolemy/testing_files/4_1__sl4_c0.magma_out.bz2 +0 -0
  320. snappy/ptolemy/testing_files/4_1__sl4_c1.magma_out.bz2 +0 -0
  321. snappy/ptolemy/testing_files/5_2__sl2_c0.magma_out.bz2 +0 -0
  322. snappy/ptolemy/testing_files/5_2__sl2_c1.magma_out.bz2 +0 -0
  323. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c0.magma_out.bz2 +0 -0
  324. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c1.magma_out.bz2 +0 -0
  325. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c2.magma_out.bz2 +0 -0
  326. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c3.magma_out.bz2 +0 -0
  327. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c4.magma_out.bz2 +0 -0
  328. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c5.magma_out.bz2 +0 -0
  329. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c6.magma_out.bz2 +0 -0
  330. snappy/ptolemy/testing_files/DT_mcbbiceaibjklmdfgh__sl2_c7.magma_out.bz2 +0 -0
  331. snappy/ptolemy/testing_files/data/pgl2/OrientableCuspedCensus/03_tetrahedra/m019__sl2_c0.magma_out +95 -0
  332. snappy/ptolemy/testing_files/data/pgl2/OrientableCuspedCensus/03_tetrahedra/m019__sl2_c1.magma_out +95 -0
  333. snappy/ptolemy/testing_files/m015__sl3_c0.magma_out.bz2 +0 -0
  334. snappy/ptolemy/testing_files/m135__sl2_c0.magma_out.bz2 +0 -0
  335. snappy/ptolemy/testing_files/m135__sl2_c1.magma_out.bz2 +0 -0
  336. snappy/ptolemy/testing_files/m135__sl2_c2.magma_out.bz2 +0 -0
  337. snappy/ptolemy/testing_files/m135__sl2_c3.magma_out.bz2 +0 -0
  338. snappy/ptolemy/testing_files/m135__sl2_c4.magma_out.bz2 +0 -0
  339. snappy/ptolemy/testing_files/m135__sl2_c5.magma_out.bz2 +0 -0
  340. snappy/ptolemy/testing_files/m135__sl2_c6.magma_out.bz2 +0 -0
  341. snappy/ptolemy/testing_files/m135__sl2_c7.magma_out.bz2 +0 -0
  342. snappy/ptolemy/testing_files/s000__sl2_c0.magma_out.bz2 +0 -0
  343. snappy/ptolemy/testing_files/s000__sl2_c1.magma_out.bz2 +0 -0
  344. snappy/ptolemy/testing_files/t00000__sl2_c0.magma_out.bz2 +0 -0
  345. snappy/ptolemy/testing_files/t00000__sl2_c1.magma_out.bz2 +0 -0
  346. snappy/ptolemy/testing_files/v0000__sl2_c0.magma_out.bz2 +0 -0
  347. snappy/ptolemy/testing_files/v0000__sl2_c1.magma_out.bz2 +0 -0
  348. snappy/ptolemy/testing_files/v0000__sl2_c2.magma_out.bz2 +0 -0
  349. snappy/ptolemy/testing_files/v0000__sl2_c3.magma_out.bz2 +0 -0
  350. snappy/ptolemy/testing_files_generalized/m003__sl2_c0.magma_out.bz2 +0 -0
  351. snappy/ptolemy/testing_files_generalized/m003__sl2_c1.magma_out.bz2 +0 -0
  352. snappy/ptolemy/testing_files_generalized/m003__sl3_c0.magma_out.bz2 +0 -0
  353. snappy/ptolemy/testing_files_generalized/m003__sl3_c1.magma_out.bz2 +0 -0
  354. snappy/ptolemy/testing_files_generalized/m004__sl2_c0.magma_out.bz2 +0 -0
  355. snappy/ptolemy/testing_files_generalized/m004__sl2_c1.magma_out.bz2 +0 -0
  356. snappy/ptolemy/testing_files_generalized/m015__sl2_c1.magma_out.bz2 +0 -0
  357. snappy/ptolemy/testing_files_generalized/m015__sl3_c0.magma_out.bz2 +0 -0
  358. snappy/ptolemy/testing_files_rur/m052__sl3_c0.rur.bz2 +0 -0
  359. snappy/ptolemy/utilities.py +236 -0
  360. snappy/raytracing/__init__.py +64 -0
  361. snappy/raytracing/additional_horospheres.py +64 -0
  362. snappy/raytracing/additional_len_spec_choices.py +63 -0
  363. snappy/raytracing/cohomology_fractal.py +197 -0
  364. snappy/raytracing/eyeball.py +123 -0
  365. snappy/raytracing/finite_raytracing_data.py +237 -0
  366. snappy/raytracing/finite_viewer.py +590 -0
  367. snappy/raytracing/geodesic_tube_info.py +174 -0
  368. snappy/raytracing/geodesics.py +246 -0
  369. snappy/raytracing/geodesics_window.py +258 -0
  370. snappy/raytracing/gui_utilities.py +293 -0
  371. snappy/raytracing/hyperboloid_navigation.py +556 -0
  372. snappy/raytracing/hyperboloid_utilities.py +234 -0
  373. snappy/raytracing/ideal_raytracing_data.py +592 -0
  374. snappy/raytracing/inside_viewer.py +974 -0
  375. snappy/raytracing/pack.py +22 -0
  376. snappy/raytracing/raytracing_data.py +126 -0
  377. snappy/raytracing/raytracing_view.py +454 -0
  378. snappy/raytracing/shaders/Eye.png +0 -0
  379. snappy/raytracing/shaders/NonGeometric.png +0 -0
  380. snappy/raytracing/shaders/__init__.py +101 -0
  381. snappy/raytracing/shaders/fragment.glsl +1744 -0
  382. snappy/raytracing/test.py +29 -0
  383. snappy/raytracing/tooltip.py +146 -0
  384. snappy/raytracing/upper_halfspace_utilities.py +98 -0
  385. snappy/raytracing/view_scale_controller.py +98 -0
  386. snappy/raytracing/zoom_slider/__init__.py +263 -0
  387. snappy/raytracing/zoom_slider/inward.png +0 -0
  388. snappy/raytracing/zoom_slider/inward18.png +0 -0
  389. snappy/raytracing/zoom_slider/outward.png +0 -0
  390. snappy/raytracing/zoom_slider/outward18.png +0 -0
  391. snappy/raytracing/zoom_slider/test.py +20 -0
  392. snappy/sage_helper.py +117 -0
  393. snappy/settings.py +409 -0
  394. snappy/shell.py +53 -0
  395. snappy/snap/__init__.py +114 -0
  396. snappy/snap/character_varieties.py +375 -0
  397. snappy/snap/find_field.py +372 -0
  398. snappy/snap/fundamental_polyhedron.py +569 -0
  399. snappy/snap/generators.py +39 -0
  400. snappy/snap/interval_reps.py +81 -0
  401. snappy/snap/kernel_structures.py +128 -0
  402. snappy/snap/mcomplex_base.py +18 -0
  403. snappy/snap/nsagetools.py +702 -0
  404. snappy/snap/peripheral/__init__.py +1 -0
  405. snappy/snap/peripheral/dual_cellulation.py +219 -0
  406. snappy/snap/peripheral/link.py +127 -0
  407. snappy/snap/peripheral/peripheral.py +159 -0
  408. snappy/snap/peripheral/surface.py +522 -0
  409. snappy/snap/peripheral/test.py +35 -0
  410. snappy/snap/polished_reps.py +335 -0
  411. snappy/snap/shapes.py +152 -0
  412. snappy/snap/slice_obs_HKL.py +668 -0
  413. snappy/snap/t3mlite/__init__.py +2 -0
  414. snappy/snap/t3mlite/arrow.py +243 -0
  415. snappy/snap/t3mlite/corner.py +22 -0
  416. snappy/snap/t3mlite/edge.py +172 -0
  417. snappy/snap/t3mlite/face.py +37 -0
  418. snappy/snap/t3mlite/files.py +211 -0
  419. snappy/snap/t3mlite/homology.py +53 -0
  420. snappy/snap/t3mlite/linalg.py +419 -0
  421. snappy/snap/t3mlite/mcomplex.py +1499 -0
  422. snappy/snap/t3mlite/perm4.py +320 -0
  423. snappy/snap/t3mlite/setup.py +12 -0
  424. snappy/snap/t3mlite/simplex.py +199 -0
  425. snappy/snap/t3mlite/spun.py +297 -0
  426. snappy/snap/t3mlite/surface.py +519 -0
  427. snappy/snap/t3mlite/test.py +20 -0
  428. snappy/snap/t3mlite/test_vs_regina.py +86 -0
  429. snappy/snap/t3mlite/tetrahedron.py +109 -0
  430. snappy/snap/t3mlite/vertex.py +42 -0
  431. snappy/snap/test.py +134 -0
  432. snappy/snap/utilities.py +288 -0
  433. snappy/test.py +209 -0
  434. snappy/test_cases.py +263 -0
  435. snappy/testing.py +131 -0
  436. snappy/tiling/__init__.py +2 -0
  437. snappy/tiling/canonical_key_dict.py +59 -0
  438. snappy/tiling/dict_based_set.py +79 -0
  439. snappy/tiling/floor.py +49 -0
  440. snappy/tiling/hyperboloid_dict.py +54 -0
  441. snappy/tiling/iter_utils.py +78 -0
  442. snappy/tiling/lifted_tetrahedron.py +22 -0
  443. snappy/tiling/lifted_tetrahedron_set.py +54 -0
  444. snappy/tiling/real_hash_dict.py +164 -0
  445. snappy/tiling/test.py +23 -0
  446. snappy/tiling/tile.py +215 -0
  447. snappy/tiling/triangle.py +33 -0
  448. snappy/tkterminal.py +920 -0
  449. snappy/twister/__init__.py +20 -0
  450. snappy/twister/main.py +646 -0
  451. snappy/twister/surfaces/S_0_1 +3 -0
  452. snappy/twister/surfaces/S_0_2 +3 -0
  453. snappy/twister/surfaces/S_0_4 +7 -0
  454. snappy/twister/surfaces/S_0_4_Lantern +8 -0
  455. snappy/twister/surfaces/S_1 +3 -0
  456. snappy/twister/surfaces/S_1_1 +4 -0
  457. snappy/twister/surfaces/S_1_2 +5 -0
  458. snappy/twister/surfaces/S_1_2_5 +6 -0
  459. snappy/twister/surfaces/S_2 +6 -0
  460. snappy/twister/surfaces/S_2_1 +8 -0
  461. snappy/twister/surfaces/S_2_heeg +10 -0
  462. snappy/twister/surfaces/S_3 +8 -0
  463. snappy/twister/surfaces/S_3_1 +10 -0
  464. snappy/twister/surfaces/S_4_1 +12 -0
  465. snappy/twister/surfaces/S_5_1 +14 -0
  466. snappy/twister/surfaces/heeg_fig8 +9 -0
  467. snappy/twister/twister_core.cpython-313-darwin.so +0 -0
  468. snappy/upper_halfspace/__init__.py +146 -0
  469. snappy/upper_halfspace/ideal_point.py +26 -0
  470. snappy/verify/__init__.py +13 -0
  471. snappy/verify/canonical.py +542 -0
  472. snappy/verify/complex_volume/__init__.py +18 -0
  473. snappy/verify/complex_volume/adjust_torsion.py +86 -0
  474. snappy/verify/complex_volume/closed.py +168 -0
  475. snappy/verify/complex_volume/compute_ptolemys.py +90 -0
  476. snappy/verify/complex_volume/cusped.py +56 -0
  477. snappy/verify/complex_volume/extended_bloch.py +201 -0
  478. snappy/verify/cusp_translations.py +85 -0
  479. snappy/verify/edge_equations.py +80 -0
  480. snappy/verify/exceptions.py +254 -0
  481. snappy/verify/hyperbolicity.py +224 -0
  482. snappy/verify/interval_newton_shapes_engine.py +523 -0
  483. snappy/verify/interval_tree.py +400 -0
  484. snappy/verify/krawczyk_shapes_engine.py +518 -0
  485. snappy/verify/maximal_cusp_area_matrix/__init__.py +46 -0
  486. snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +419 -0
  487. snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +153 -0
  488. snappy/verify/real_algebra.py +286 -0
  489. snappy/verify/shapes.py +25 -0
  490. snappy/verify/short_slopes.py +200 -0
  491. snappy/verify/square_extensions.py +1005 -0
  492. snappy/verify/test.py +78 -0
  493. snappy/verify/upper_halfspace/__init__.py +9 -0
  494. snappy/verify/upper_halfspace/extended_matrix.py +100 -0
  495. snappy/verify/upper_halfspace/finite_point.py +283 -0
  496. snappy/verify/upper_halfspace/ideal_point.py +426 -0
  497. snappy/verify/volume.py +128 -0
  498. snappy/version.py +2 -0
  499. snappy-3.2.dist-info/METADATA +58 -0
  500. snappy-3.2.dist-info/RECORD +503 -0
  501. snappy-3.2.dist-info/WHEEL +5 -0
  502. snappy-3.2.dist-info/entry_points.txt +2 -0
  503. snappy-3.2.dist-info/top_level.txt +28 -0
@@ -0,0 +1,1235 @@
1
+
2
+
3
+ <!DOCTYPE html>
4
+ <html class="writer-html5" lang="en" data-content_root="./">
5
+ <head>
6
+ <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
7
+
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
+ <title>Internals of verified computations &mdash; SnapPy 3.2 documentation</title>
10
+ <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
11
+ <link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
12
+ <link rel="stylesheet" type="text/css" href="_static/snappy_sphinx_rtd_theme.css?v=1b8ec2a8" />
13
+
14
+
15
+ <link rel="shortcut icon" href="_static/SnapPy.ico"/>
16
+ <script src="_static/jquery.js?v=5d32c60e"></script>
17
+ <script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
18
+ <script src="_static/documentation_options.js?v=828ea960"></script>
19
+ <script src="_static/doctools.js?v=9a2dae69"></script>
20
+ <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
21
+ <script src="_static/js/theme.js"></script>
22
+ <link rel="index" title="Index" href="genindex.html" />
23
+ <link rel="search" title="Search" href="search.html" />
24
+ <link rel="next" title="Other components" href="other.html" />
25
+ <link rel="prev" title="Verified computations" href="verify.html" />
26
+ </head>
27
+
28
+ <body class="wy-body-for-nav">
29
+ <div class="wy-grid-for-nav">
30
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
31
+ <div class="wy-side-scroll">
32
+ <div class="wy-side-nav-search" >
33
+
34
+
35
+
36
+ <a href="index.html" class="icon icon-home">
37
+ SnapPy
38
+ <img src="_static/SnapPy-horizontal-128.png" class="logo" alt="Logo"/>
39
+ </a>
40
+ <div role="search">
41
+ <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
42
+ <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
43
+ <input type="hidden" name="check_keywords" value="yes" />
44
+ <input type="hidden" name="area" value="default" />
45
+ </form>
46
+ </div>
47
+ </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
48
+ <ul class="current">
49
+ <li class="toctree-l1"><a class="reference internal" href="installing.html">Installing SnapPy</a></li>
50
+ <li class="toctree-l1"><a class="reference internal" href="screenshots.html">Screenshots: SnapPy in action</a></li>
51
+ <li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
52
+ <li class="toctree-l1"><a class="reference internal" href="snappy.html">The snappy module and its classes</a></li>
53
+ <li class="toctree-l1"><a class="reference internal" href="plink.html">Using SnapPy’s link editor</a></li>
54
+ <li class="toctree-l1"><a class="reference internal" href="spherogram.html">Links: planar diagrams and invariants</a></li>
55
+ <li class="toctree-l1"><a class="reference internal" href="snap.html">Number theory of hyperbolic 3-manifolds</a></li>
56
+ <li class="toctree-l1 current"><a class="reference internal" href="verify.html">Verified computations</a><ul class="current">
57
+ <li class="toctree-l2"><a class="reference internal" href="verify.html#introduction">Introduction</a></li>
58
+ <li class="toctree-l2"><a class="reference internal" href="verify.html#overview">Overview</a></li>
59
+ <li class="toctree-l2 current"><a class="reference internal" href="verify.html#verified-computation-topics">Verified computation topics</a><ul class="current">
60
+ <li class="toctree-l3 current"><a class="current reference internal" href="#">Internals of verified computations</a><ul>
61
+ <li class="toctree-l4"><a class="reference internal" href="#naming">Naming</a></li>
62
+ <li class="toctree-l4"><a class="reference internal" href="#generating-certified-shape-intervals">Generating certified shape intervals</a><ul>
63
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.CertifiedShapesEngine"><code class="docutils literal notranslate"><span class="pre">CertifiedShapesEngine</span></code></a></li>
64
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.IntervalNewtonShapesEngine"><code class="docutils literal notranslate"><span class="pre">IntervalNewtonShapesEngine</span></code></a></li>
65
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.KrawczykShapesEngine"><code class="docutils literal notranslate"><span class="pre">KrawczykShapesEngine</span></code></a></li>
66
+ </ul>
67
+ </li>
68
+ <li class="toctree-l4"><a class="reference internal" href="#verification-of-hyperbolicity">Verification of hyperbolicity</a><ul>
69
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.hyperbolicity.check_logarithmic_gluing_equations_and_positively_oriented_tets"><code class="docutils literal notranslate"><span class="pre">check_logarithmic_gluing_equations_and_positively_oriented_tets()</span></code></a></li>
70
+ </ul>
71
+ </li>
72
+ <li class="toctree-l4"><a class="reference internal" href="#verified-canonical-cell-decompositions">Verified canonical cell decompositions</a><ul>
73
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.canonical.interval_checked_canonical_triangulation"><code class="docutils literal notranslate"><span class="pre">interval_checked_canonical_triangulation()</span></code></a></li>
74
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.canonical.exactly_checked_canonical_retriangulation"><code class="docutils literal notranslate"><span class="pre">exactly_checked_canonical_retriangulation()</span></code></a></li>
75
+ </ul>
76
+ </li>
77
+ <li class="toctree-l4"><a class="reference internal" href="#module-snappy.verify.square_extensions">Exact computations for cusp cross sections</a><ul>
78
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.square_extensions.find_shapes_as_complex_sqrt_lin_combinations"><code class="docutils literal notranslate"><span class="pre">find_shapes_as_complex_sqrt_lin_combinations()</span></code></a></li>
79
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.square_extensions.SqrtLinCombination"><code class="docutils literal notranslate"><span class="pre">SqrtLinCombination</span></code></a></li>
80
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.square_extensions.ComplexSqrtLinCombination"><code class="docutils literal notranslate"><span class="pre">ComplexSqrtLinCombination</span></code></a></li>
81
+ </ul>
82
+ </li>
83
+ <li class="toctree-l4"><a class="reference internal" href="#module-snappy.verify.exceptions">Exceptions</a><ul>
84
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.CuspConsistencyType"><code class="docutils literal notranslate"><span class="pre">CuspConsistencyType</span></code></a></li>
85
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.CuspEquationExactVerifyError"><code class="docutils literal notranslate"><span class="pre">CuspEquationExactVerifyError</span></code></a></li>
86
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.CuspEquationLogLiftNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">CuspEquationLogLiftNumericalVerifyError</span></code></a></li>
87
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.CuspEquationType"><code class="docutils literal notranslate"><span class="pre">CuspEquationType</span></code></a></li>
88
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.EdgeEquationExactVerifyError"><code class="docutils literal notranslate"><span class="pre">EdgeEquationExactVerifyError</span></code></a></li>
89
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.EdgeEquationLogLiftNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">EdgeEquationLogLiftNumericalVerifyError</span></code></a></li>
90
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.EdgeEquationType"><code class="docutils literal notranslate"><span class="pre">EdgeEquationType</span></code></a></li>
91
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.EquationType"><code class="docutils literal notranslate"><span class="pre">EquationType</span></code></a></li>
92
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.ExactVerifyError"><code class="docutils literal notranslate"><span class="pre">ExactVerifyError</span></code></a></li>
93
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.InequalityNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">InequalityNumericalVerifyError</span></code></a></li>
94
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.IsZeroExactVerifyError"><code class="docutils literal notranslate"><span class="pre">IsZeroExactVerifyError</span></code></a></li>
95
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.LogLiftNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">LogLiftNumericalVerifyError</span></code></a></li>
96
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.NumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">NumericalVerifyError</span></code></a></li>
97
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.ShapePositiveImaginaryPartNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">ShapePositiveImaginaryPartNumericalVerifyError</span></code></a></li>
98
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.ShapeType"><code class="docutils literal notranslate"><span class="pre">ShapeType</span></code></a></li>
99
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.TiltInequalityNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">TiltInequalityNumericalVerifyError</span></code></a></li>
100
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.TiltIsZeroExactVerifyError"><code class="docutils literal notranslate"><span class="pre">TiltIsZeroExactVerifyError</span></code></a></li>
101
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.TiltProvenPositiveNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">TiltProvenPositiveNumericalVerifyError</span></code></a></li>
102
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.TiltType"><code class="docutils literal notranslate"><span class="pre">TiltType</span></code></a></li>
103
+ <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.VerifyErrorBase"><code class="docutils literal notranslate"><span class="pre">VerifyErrorBase</span></code></a></li>
104
+ </ul>
105
+ </li>
106
+ </ul>
107
+ </li>
108
+ </ul>
109
+ </li>
110
+ </ul>
111
+ </li>
112
+ <li class="toctree-l1"><a class="reference internal" href="other.html">Other components</a></li>
113
+ <li class="toctree-l1"><a class="reference internal" href="news.html">News</a></li>
114
+ <li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
115
+ <li class="toctree-l1"><a class="reference internal" href="bugs.html">Reporting bugs and other problems</a></li>
116
+ <li class="toctree-l1"><a class="reference internal" href="todo.html">To Do List</a></li>
117
+ <li class="toctree-l1"><a class="reference internal" href="development.html">Development Basics</a></li>
118
+ </ul>
119
+
120
+ </div>
121
+ </div>
122
+ </nav>
123
+
124
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
125
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
126
+ <a href="index.html">SnapPy</a>
127
+ </nav>
128
+
129
+ <div class="wy-nav-content">
130
+ <div class="rst-content">
131
+ <div role="navigation" aria-label="Page navigation">
132
+ <ul class="wy-breadcrumbs">
133
+ <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
134
+ <li class="breadcrumb-item"><a href="verify.html">Verified computations</a></li>
135
+ <li class="breadcrumb-item active">Internals of verified computations</li>
136
+ <li class="wy-breadcrumbs-aside">
137
+ </li>
138
+ </ul>
139
+ <hr/>
140
+ </div>
141
+ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
142
+ <div itemprop="articleBody">
143
+
144
+ <section id="internals-of-verified-computations">
145
+ <h1>Internals of verified computations<a class="headerlink" href="#internals-of-verified-computations" title="Link to this heading"></a></h1>
146
+ <section id="naming">
147
+ <h2>Naming<a class="headerlink" href="#naming" title="Link to this heading"></a></h2>
148
+ <p>The names of methods containing <code class="docutils literal notranslate"><span class="pre">check</span></code> will raise an exception if
149
+ the desired property cannot be certified. There are different types of
150
+ Exceptions to indicate how the certification failed. This type can be
151
+ used by other methods to perform some action such as changing the
152
+ triangulation or increasing precision or to give up.</p>
153
+ <p>The user-facing methods have names starting with <code class="docutils literal notranslate"><span class="pre">verify</span></code> or
154
+ <code class="docutils literal notranslate"><span class="pre">verified</span></code> and will fail more gracefully returning <code class="docutils literal notranslate"><span class="pre">False</span></code> or
155
+ <code class="docutils literal notranslate"><span class="pre">None</span></code> in such a case.</p>
156
+ </section>
157
+ <section id="generating-certified-shape-intervals">
158
+ <h2>Generating certified shape intervals<a class="headerlink" href="#generating-certified-shape-intervals" title="Link to this heading"></a></h2>
159
+ <p>The recommended way to obtain certified intervals for the shapes is via
160
+ <code class="docutils literal notranslate"><span class="pre">manifold.tetrahedra_shapes(intervals=True)</span></code> as <a class="reference internal" href="verify.html"><span class="doc">described
161
+ earlier</span></a>. Here we document the <code class="docutils literal notranslate"><span class="pre">KrawczykShapesEngine</span></code> and
162
+ <code class="docutils literal notranslate"><span class="pre">IntervalNewtonShapesEngine</span></code> which is implemented internally to
163
+ generate the intervals. It is of interest for those users who want to
164
+ understand the underlying interval math and experiment with the Newton
165
+ interval method or the Krawczyk test. <code class="docutils literal notranslate"><span class="pre">CertifiedShapesEngine</span></code> is an
166
+ alias of either <code class="docutils literal notranslate"><span class="pre">KrawczykShapesEngine</span></code> or
167
+ <code class="docutils literal notranslate"><span class="pre">IntervalNewtonShapesEngine</span></code> to determine the default method used by
168
+ verify.</p>
169
+ <dl class="py attribute" id="module-snappy.verify">
170
+ <dt class="sig sig-object py" id="snappy.verify.CertifiedShapesEngine">
171
+ <span class="sig-prename descclassname"><span class="pre">snappy.verify.</span></span><span class="sig-name descname"><span class="pre">CertifiedShapesEngine</span></span><a class="headerlink" href="#snappy.verify.CertifiedShapesEngine" title="Link to this definition"></a></dt>
172
+ <dd><p>alias of <a class="reference internal" href="#snappy.verify.KrawczykShapesEngine" title="snappy.verify.krawczyk_shapes_engine.KrawczykShapesEngine"><code class="xref py py-class docutils literal notranslate"><span class="pre">KrawczykShapesEngine</span></code></a></p>
173
+ </dd></dl>
174
+
175
+ <dl class="py class">
176
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine">
177
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.</span></span><span class="sig-name descname"><span class="pre">IntervalNewtonShapesEngine</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">initial_shapes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bits_prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dec_prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine" title="Link to this definition"></a></dt>
178
+ <dd><p>An engine that is initialized with an approximated candidate solution to
179
+ the rectangular gluing equations and produces intervals certified to
180
+ contain a true solution. After the engine is successfully run, the
181
+ resulting intervals are stored in certified_shapes which is a vector of
182
+ elements in a Sage’s ComplexIntervalField.</p>
183
+ <p>A simple example to obtain certified shape intervals that uses
184
+ KrawczykShapesEngine or IntervalNewtonShapesEngine under the hood:</p>
185
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
186
+ sage: M = Manifold(&quot;m015&quot;)
187
+ sage: M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80, intervals = True) # doctest: +NUMERIC15 +NORMALIZE_WHITESPACE
188
+ [0.6623589786223730129805? + 0.5622795120623012438992?*I,
189
+ 0.6623589786223730129805? + 0.5622795120623012438992?*I,
190
+ 0.6623589786223730129805? + 0.5622795120623012438992?*I]
191
+ </pre></div>
192
+ </div>
193
+ <p>Its objective is thus the same as HIKMOT and it is certainly HIKMOT
194
+ inspired. However, it conceptually differs in that:</p>
195
+ <ol class="arabic">
196
+ <li><p>It uses the Newton interval method instead of the Krawczyk
197
+ test (we implement Gaussian elimination in interval arithmetic to
198
+ compute the inverse of an interval matrix having interval arithmetic
199
+ semantics, see mat_solve).</p></li>
200
+ <li><p>It uses complex numbers in it’s Newton interval method.
201
+ We simply use Sage’s complex interval type avoiding the need of
202
+ converting n x n complex matrices into 2n x 2n real matrices as
203
+ described Section 3.4 of the HIKMOT paper.</p></li>
204
+ <li><p>We avoid automatic differentiation. We pick an independent set of
205
+ equations of the following form and try to solve them:</p>
206
+ <blockquote>
207
+ <div><p>log(LHS) = 0</p>
208
+ </div></blockquote>
209
+ <p>where</p>
210
+ <blockquote>
211
+ <div><p>LHS = c * z0^a0 * (1-z0)^b0 * z1^a1 * (1-z1)^b1 * …</p>
212
+ </div></blockquote>
213
+ <p>with a, b and c’s as returned by Manifold.gluing_equations(‘rect’).</p>
214
+ <p>The derivative of log (LHS) with respect to zj is simply given by</p>
215
+ <blockquote>
216
+ <div><p>aj/zj - bj/(1-zj)</p>
217
+ </div></blockquote>
218
+ <p>and thus no need for automatic differentiation.</p>
219
+ </li>
220
+ </ol>
221
+ <p>In contrast to HIKMOT, we use and return Sage’s native implementation of
222
+ (complex) interval arithmetic here, which allows for increased interoperability.
223
+ Another advantage is that Sage supports arbitrary precision. Unfortunately,
224
+ performance suffers and this implementation is 5-10 times slower than HIKMOT.</p>
225
+ <p>Here is an example how to explicitly invoke the IntervalNewtonShapesEngine:</p>
226
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80)
227
+ sage: C = IntervalNewtonShapesEngine(M, shapes, bits_prec = 80)
228
+ sage: C.expand_until_certified()
229
+ True
230
+ sage: C.certified_shapes # doctest: +ELLIPSIS
231
+ (0.662358978622373012981? + 0.562279512062301243...?*I, 0.66235897862237301298...? + 0.562279512062301243...?*I, 0.66235897862237301298...? + 0.562279512062301243...?*I)
232
+ </pre></div>
233
+ </div>
234
+ <dl class="py method">
235
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.certified_newton_iteration">
236
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">certified_newton_iteration</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">equations</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shape_intervals</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">point_in_intervals</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_value_at_point</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.certified_newton_iteration" title="Link to this definition"></a></dt>
237
+ <dd><p>Given shape intervals z, performs a Newton interval iteration N(z)
238
+ as described in newton_iteration. Returns a pair (boolean, N(z)) where
239
+ the boolean is True if N(z) is contained in z.</p>
240
+ <p>If the boolean is True, it is certified that N(z) contains a true
241
+ solution, e.g., a point for which f is truly zero.</p>
242
+ <p>See newton_iteration for the other parameters.</p>
243
+ <p>This follows from Theorem 1 of <a class="reference external" href="http://ww2.ii.uj.edu.pl/~zgliczyn/cap07/krawczyk.pdf">Zgliczynski’s notes</a>.</p>
244
+ <p>Some examples:</p>
245
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
246
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m019&quot;</span><span class="p">)</span>
247
+ <span class="n">sage</span><span class="p">:</span> <span class="n">C</span> <span class="o">=</span> <span class="n">IntervalNewtonShapesEngine</span><span class="p">(</span><span class="n">M</span><span class="p">,</span> <span class="n">M</span><span class="o">.</span><span class="n">tetrahedra_shapes</span><span class="p">(</span><span class="s1">&#39;rect&#39;</span><span class="p">),</span>
248
+ <span class="o">...</span> <span class="n">bits_prec</span> <span class="o">=</span> <span class="mi">80</span><span class="p">)</span>
249
+ </pre></div>
250
+ </div>
251
+ <p>Intervals containing the true solution:</p>
252
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from sage.all import vector
253
+ sage: good_shapes = vector([
254
+ ... C.CIF(C.RIF(0.78055, 0.78056), C.RIF(0.91447, 0.91448)),
255
+ ... C.CIF(C.RIF(0.78055, 0.78056), C.RIF(0.91447, 0.91448)),
256
+ ... C.CIF(C.RIF(0.46002, 0.46003), C.RIF(0.63262, 0.63263))])
257
+ sage: is_certified, shapes = IntervalNewtonShapesEngine.certified_newton_iteration(C.equations, good_shapes)
258
+
259
+ sage: is_certified
260
+ True
261
+ sage: shapes # doctest: +ELLIPSIS
262
+ (0.78055253? + 0.91447366...?*I, 0.7805525...? + 0.9144736...?*I, 0.4600211...? + 0.632624...?*I)
263
+ </pre></div>
264
+ </div>
265
+ <p>This means that a true solution to the rectangular gluing equations is
266
+ contained in both the given intervals (good_shapes) and the returned
267
+ intervals (shapes) which are a refinement of the given intervals.</p>
268
+ <p>Intervals not containing a true solution:</p>
269
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">sage.all</span> <span class="kn">import</span> <span class="n">vector</span>
270
+ <span class="n">sage</span><span class="p">:</span> <span class="n">bad_shapes</span> <span class="o">=</span> <span class="n">vector</span><span class="p">([</span>
271
+ <span class="o">...</span> <span class="n">C</span><span class="o">.</span><span class="n">CIF</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.78054</span><span class="p">,</span> <span class="mf">0.78055</span><span class="p">),</span> <span class="n">C</span><span class="o">.</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.91447</span><span class="p">,</span> <span class="mf">0.91448</span><span class="p">)),</span>
272
+ <span class="o">...</span> <span class="n">C</span><span class="o">.</span><span class="n">CIF</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.78055</span><span class="p">,</span> <span class="mf">0.78056</span><span class="p">),</span> <span class="n">C</span><span class="o">.</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.91447</span><span class="p">,</span> <span class="mf">0.91448</span><span class="p">)),</span>
273
+ <span class="o">...</span> <span class="n">C</span><span class="o">.</span><span class="n">CIF</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.46002</span><span class="p">,</span> <span class="mf">0.46003</span><span class="p">),</span> <span class="n">C</span><span class="o">.</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.63262</span><span class="p">,</span> <span class="mf">0.63263</span><span class="p">))])</span>
274
+ <span class="n">sage</span><span class="p">:</span> <span class="n">is_certified</span><span class="p">,</span> <span class="n">shapes</span> <span class="o">=</span> <span class="n">IntervalNewtonShapesEngine</span><span class="o">.</span><span class="n">certified_newton_iteration</span><span class="p">(</span><span class="n">C</span><span class="o">.</span><span class="n">equations</span><span class="p">,</span> <span class="n">bad_shapes</span><span class="p">)</span>
275
+ <span class="n">sage</span><span class="p">:</span> <span class="n">is_certified</span>
276
+ <span class="kc">False</span>
277
+ </pre></div>
278
+ </div>
279
+ </dd></dl>
280
+
281
+ <dl class="py method">
282
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.expand_until_certified">
283
+ <span class="sig-name descname"><span class="pre">expand_until_certified</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.expand_until_certified" title="Link to this definition"></a></dt>
284
+ <dd><p>Try Newton interval iterations, expanding the shape intervals
285
+ until we can certify they contain a true solution.
286
+ If succeeded, return True and write certified shapes to
287
+ certified_shapes.
288
+ Set verbose = True for printing additional information.</p>
289
+ </dd></dl>
290
+
291
+ <dl class="py method">
292
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.interval_vector_is_contained_in">
293
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">interval_vector_is_contained_in</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vecA</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vecB</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.interval_vector_is_contained_in" title="Link to this definition"></a></dt>
294
+ <dd><p>Given two vectors of intervals, return whether the first one
295
+ is contained in the second one. Examples:</p>
296
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">RIF</span> <span class="o">=</span> <span class="n">RealIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
297
+ <span class="n">sage</span><span class="p">:</span> <span class="n">CIF</span> <span class="o">=</span> <span class="n">ComplexIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
298
+ <span class="n">sage</span><span class="p">:</span> <span class="n">box</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="n">RIF</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">),</span><span class="n">RIF</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">))</span>
299
+ <span class="n">sage</span><span class="p">:</span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span> <span class="n">CIF</span><span class="p">(</span><span class="mf">0.1</span><span class="p">),</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="n">box</span> <span class="p">]</span>
300
+ <span class="n">sage</span><span class="p">:</span> <span class="n">b</span> <span class="o">=</span> <span class="p">[</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="o">+</span> <span class="n">box</span><span class="p">,</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">box</span> <span class="p">]</span>
301
+ <span class="n">sage</span><span class="p">:</span> <span class="n">c</span> <span class="o">=</span> <span class="p">[</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">box</span> <span class="p">]</span>
302
+
303
+ <span class="n">sage</span><span class="p">:</span> <span class="n">IntervalNewtonShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
304
+ <span class="kc">True</span>
305
+ <span class="n">sage</span><span class="p">:</span> <span class="n">IntervalNewtonShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
306
+ <span class="kc">False</span>
307
+ <span class="n">sage</span><span class="p">:</span> <span class="n">IntervalNewtonShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
308
+ <span class="kc">False</span>
309
+ <span class="n">sage</span><span class="p">:</span> <span class="n">IntervalNewtonShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
310
+ <span class="kc">False</span>
311
+ <span class="n">sage</span><span class="p">:</span> <span class="n">IntervalNewtonShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
312
+ <span class="kc">False</span>
313
+ <span class="n">sage</span><span class="p">:</span> <span class="n">IntervalNewtonShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
314
+ <span class="kc">False</span>
315
+ </pre></div>
316
+ </div>
317
+ </dd></dl>
318
+
319
+ <dl class="py method">
320
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.interval_vector_mid_points">
321
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">interval_vector_mid_points</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vec</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.interval_vector_mid_points" title="Link to this definition"></a></dt>
322
+ <dd><p>Given a vector of complex intervals, return the midpoints (as 0-length
323
+ complex intervals) of them.</p>
324
+ </dd></dl>
325
+
326
+ <dl class="py method">
327
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.interval_vector_union">
328
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">interval_vector_union</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vecA</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vecB</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.interval_vector_union" title="Link to this definition"></a></dt>
329
+ <dd><p>Given two vectors of intervals, return the vector of their unions,
330
+ i.e., the smallest interval containing both intervals.</p>
331
+ </dd></dl>
332
+
333
+ <dl class="py method">
334
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.log_gluing_LHS_derivatives">
335
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">log_gluing_LHS_derivatives</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">equations</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shapes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.log_gluing_LHS_derivatives" title="Link to this definition"></a></dt>
336
+ <dd><p>Compute the Jacobian of the vector-valued function f
337
+ described in the above log_gluing_LHSs:</p>
338
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
339
+ sage: M = Manifold(&quot;m019&quot;)
340
+ sage: equations = M.gluing_equations(&#39;rect&#39;)
341
+ sage: RIF = RealIntervalField(80)
342
+ sage: CIF = ComplexIntervalField(80)
343
+ sage: shape1 = CIF(RIF(0.78055,0.78056), RIF(0.9144, 0.9145))
344
+ sage: shape2 = CIF(RIF(0.46002,0.46003), RIF(0.6326, 0.6327))
345
+ sage: shapes = [shape1, shape1, shape2]
346
+ sage: IntervalNewtonShapesEngine.log_gluing_LHS_derivatives(equations, shapes) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
347
+ [ 0.292? - 1.66...?*I 0.292? - 1.66...?*I 0.752? - 1.034...?*I]
348
+ [-0.5400? + 0.63...?*I -0.5400? + 0.63...?*I 1.561? + 1.829...?*I]
349
+ [ 0.2482? + 1.034...?*I 0.2482? + 1.034...?*I -2.313? - 0.795...?*I]
350
+ [ 0.5400? - 0.63...?*I -0.5400? + 0.63...?*I 0]
351
+ [...-0.4963? - 2.068?*I 1.0800? - 1.26...?*I 0.752? - 1.034...?*I]
352
+ </pre></div>
353
+ </div>
354
+ </dd></dl>
355
+
356
+ <dl class="py method">
357
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.log_gluing_LHSs">
358
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">log_gluing_LHSs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">equations</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shapes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.log_gluing_LHSs" title="Link to this definition"></a></dt>
359
+ <dd><p>Given the result of M.gluing_equations(‘rect’) or a
360
+ subset of rows of it and shapes, return a vector of
361
+ log(LHS) where</p>
362
+ <blockquote>
363
+ <div><p>LHS = c * z0 ** a0 * (1-z0) ** b0 * z1 ** a1 * …</p>
364
+ </div></blockquote>
365
+ <p>Let f: C^n -&gt; C^n denote the function which takes
366
+ shapes and returns the vector of log(LHS).</p>
367
+ <p>The reason we take the logarithm of the rectangular
368
+ gluing equations is because the logarithmic derivative
369
+ is of a particular nice form:</p>
370
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
371
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m019&quot;</span><span class="p">)</span>
372
+ <span class="n">sage</span><span class="p">:</span> <span class="n">equations</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">gluing_equations</span><span class="p">(</span><span class="s1">&#39;rect&#39;</span><span class="p">)</span>
373
+ <span class="n">sage</span><span class="p">:</span> <span class="n">RIF</span> <span class="o">=</span> <span class="n">RealIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
374
+ <span class="n">sage</span><span class="p">:</span> <span class="n">CIF</span> <span class="o">=</span> <span class="n">ComplexIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
375
+ <span class="n">sage</span><span class="p">:</span> <span class="n">zero</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span><span class="o">.</span><span class="n">center</span><span class="p">()</span>
376
+ <span class="n">sage</span><span class="p">:</span> <span class="n">shape1</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.78055</span><span class="p">,</span><span class="mf">0.78056</span><span class="p">),</span> <span class="n">RIF</span><span class="p">(</span><span class="mf">0.9144</span><span class="p">,</span> <span class="mf">0.9145</span><span class="p">))</span>
377
+ <span class="n">sage</span><span class="p">:</span> <span class="n">shape2</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.46002</span><span class="p">,</span><span class="mf">0.46003</span><span class="p">),</span> <span class="n">RIF</span><span class="p">(</span><span class="mf">0.6326</span><span class="p">,</span> <span class="mf">0.6327</span><span class="p">))</span>
378
+ </pre></div>
379
+ </div>
380
+ <p>An interval solution containing the true solution. The log of each
381
+ rectangular equation should be 0 for the true solution, hence the interval
382
+ should contain zero:</p>
383
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape2]
384
+ sage: LHSs = IntervalNewtonShapesEngine.log_gluing_LHSs(equations, shapes)
385
+ sage: LHSs # doctest: +ELLIPSIS
386
+ (0.000? + 0.000?*I, 0.000? + 0.000?*I, 0.000? + 0.000?*I, 0.000...? + 0.000...?*I, 0.000? + 0.000?*I)
387
+ sage: zero in LHSs[0]
388
+ True
389
+ </pre></div>
390
+ </div>
391
+ <p>An interval not containing the true solution:</p>
392
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape1]
393
+ sage: LHSs = IntervalNewtonShapesEngine.log_gluing_LHSs(equations, shapes)
394
+ sage: LHSs # doctest: +ELLIPSIS
395
+ (0.430? - 0.078?*I, -0.2...? + 0.942?*I, -0.1...? - 0.8...?*I, 0.000...? + 0.000...?*I, 0.430? - 0.078?*I)
396
+ sage: zero in LHSs[0]
397
+ False
398
+ </pre></div>
399
+ </div>
400
+ </dd></dl>
401
+
402
+ <dl class="py method">
403
+ <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.newton_iteration">
404
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">newton_iteration</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">equations</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shape_intervals</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">point_in_intervals</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">interval_value_at_point</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.IntervalNewtonShapesEngine.newton_iteration" title="Link to this definition"></a></dt>
405
+ <dd><p>Perform a Newton interval method of iteration for
406
+ the function f described in log_gluing_LHSs.</p>
407
+ <p>Let z denote the shape intervals.
408
+ Let z_center be a point close to the center point of the shape
409
+ intervals (in the implementation, z_center is an interval of
410
+ again, of length zero).</p>
411
+ <p>The result returned will be</p>
412
+ <blockquote>
413
+ <div><p>N(z) = z_center - ((Df)(z))^-1 f(z_center)</p>
414
+ </div></blockquote>
415
+ <p>The user can overwrite the z_center to be used by providing
416
+ point_in_intervals (which have to be 0-length complex intervals).
417
+ The user can also give the interval value of f(z_center) by providing
418
+ interval_value_at_point to avoid re-evaluation of f(z_center).</p>
419
+ <p>A very approximate solution:</p>
420
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
421
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m019&quot;</span><span class="p">)</span>
422
+ <span class="n">sage</span><span class="p">:</span> <span class="n">shapes</span> <span class="o">=</span> <span class="p">[</span> <span class="mf">0.7</span><span class="o">+</span><span class="mi">1</span><span class="n">j</span><span class="p">,</span> <span class="mf">0.7</span><span class="o">+</span><span class="mi">1</span><span class="n">j</span><span class="p">,</span> <span class="mf">0.5</span><span class="o">+</span><span class="mf">0.5</span><span class="n">j</span> <span class="p">]</span>
423
+ </pre></div>
424
+ </div>
425
+ <p>Get the equations and initialize zero-length intervals from it:</p>
426
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: C = IntervalNewtonShapesEngine(M, shapes, bits_prec = 80)
427
+ sage: C.initial_shapes
428
+ (0.69999999999999995559107902? + 1*I, 0.69999999999999995559107902? + 1*I, 0.50000000000000000000000000? + 0.50000000000000000000000000?*I)
429
+ </pre></div>
430
+ </div>
431
+ <p>Do several Newton interval operations to get a better solution:</p>
432
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shape_intervals = C.initial_shapes
433
+ sage: for i in range(4): # doctest: +ELLIPSIS
434
+ ... shape_intervals = IntervalNewtonShapesEngine.newton_iteration(C.equations, shape_intervals)
435
+ ... print(shape_intervals)
436
+ (0.78674683118381457770...? + 0.9208680745160821379529?*I, 0.786746831183814577703...? + 0.9208680745160821379529?*I, 0.459868058287098030934...? + 0.61940871855835167317...?*I)
437
+ (0.78056102517632648594...? + 0.9144962118446750482...?*I, 0.78056102517632648594...? + 0.9144962118446750482...?*I, 0.4599773577869384936554? + 0.63251940718694538695...?*I)
438
+ (0.78055253104531610049...? + 0.9144736621585220345231?*I, 0.780552531045316100497...? + 0.9144736621585220345231?*I, 0.460021167103732494700...? + 0.6326241909236695020810...?*I)
439
+ (0.78055252785072483256...? + 0.91447366296772644033...?*I, 0.7805525278507248325678? + 0.914473662967726440333...?*I, 0.4600211755737178641204...? + 0.6326241936052562241142...?*I)
440
+ </pre></div>
441
+ </div>
442
+ <p>For comparison:</p>
443
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">M</span><span class="o">.</span><span class="n">tetrahedra_shapes</span><span class="p">(</span><span class="s1">&#39;rect&#39;</span><span class="p">)</span>
444
+ <span class="p">[</span><span class="mf">0.780552527850725</span> <span class="o">+</span> <span class="mf">0.914473662967726</span><span class="o">*</span><span class="n">I</span><span class="p">,</span> <span class="mf">0.780552527850725</span> <span class="o">+</span> <span class="mf">0.914473662967726</span><span class="o">*</span><span class="n">I</span><span class="p">,</span> <span class="mf">0.460021175573718</span> <span class="o">+</span> <span class="mf">0.632624193605256</span><span class="o">*</span><span class="n">I</span><span class="p">]</span>
445
+ </pre></div>
446
+ </div>
447
+ <p>Start with a rather big interval, note that the Newton interval method is
448
+ stable in the sense that the interval size decreases:</p>
449
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: box = C.CIF(C.RIF(-0.0001,0.0001),C.RIF(-0.0001,0.0001))
450
+ sage: shape_intervals = C.initial_shapes.apply_map(lambda shape: shape + box)
451
+ sage: shape_intervals
452
+ (0.700? + 1.000?*I, 0.700? + 1.000?*I, 0.500? + 0.500?*I)
453
+ sage: for i in range(7):
454
+ ... shape_intervals = IntervalNewtonShapesEngine.newton_iteration(C.equations, shape_intervals)
455
+ sage: print(shape_intervals) # doctest: +ELLIPSIS
456
+ (0.78055252785072483798...? + 0.91447366296772645593...?*I, 0.7805525278507248379869? + 0.914473662967726455938...?*I, 0.460021175573717872891...? + 0.632624193605256171637...?*I)
457
+ </pre></div>
458
+ </div>
459
+ </dd></dl>
460
+
461
+ </dd></dl>
462
+
463
+ <dl class="py class">
464
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine">
465
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.</span></span><span class="sig-name descname"><span class="pre">KrawczykShapesEngine</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">initial_shapes</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bits_prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">dec_prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine" title="Link to this definition"></a></dt>
466
+ <dd><p>An engine that is initialized with an approximated candidate solution to
467
+ the rectangular gluing equations and produces intervals certified to
468
+ contain a true solution. After the engine is successfully run, the
469
+ resulting intervals are stored in certified_shapes which is a vector of
470
+ elements in a Sage’s ComplexIntervalField.</p>
471
+ <p>A simple example to obtain certified shape intervals that uses the
472
+ KrawczykShapesEngine or IntervalNewtonShapesEngine under the hood:</p>
473
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
474
+ sage: M = Manifold(&quot;m015&quot;)
475
+ sage: M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80, intervals = True) # doctest: +NUMERIC15 +NORMALIZE_WHITESPACE
476
+ [0.6623589786223730129805? + 0.5622795120623012438992?*I,
477
+ 0.6623589786223730129805? + 0.5622795120623012438992?*I,
478
+ 0.6623589786223730129805? + 0.5622795120623012438992?*I]
479
+ </pre></div>
480
+ </div>
481
+ <p>Its objective is thus the same as HIKMOT and it is certainly HIKMOT
482
+ inspired. However, it conceptually differs in that:</p>
483
+ <ol class="arabic">
484
+ <li><p>It uses complex numbers in it’s computations.
485
+ We simply use Sage’s complex interval type avoiding the need of
486
+ converting n x n complex matrices into 2n x 2n real matrices as
487
+ described Section 3.4 of the HIKMOT paper.</p></li>
488
+ <li><p>We avoid automatic differentiation. We pick an independent set of
489
+ equations of the following form and try to solve them:</p>
490
+ <blockquote>
491
+ <div><p>log(LHS) = 0</p>
492
+ </div></blockquote>
493
+ <p>where</p>
494
+ <blockquote>
495
+ <div><p>LHS = c * z0^a0 * (1-z0)^b0 * z1^a1 * (1-z1)^b1 * …</p>
496
+ </div></blockquote>
497
+ <p>with a, b and c’s as returned by Manifold.gluing_equations(‘rect’).</p>
498
+ <p>The derivative of log (LHS) with respect to zj is simply given by</p>
499
+ <blockquote>
500
+ <div><p>aj/zj - bj/(1-zj)</p>
501
+ </div></blockquote>
502
+ <p>and thus no need for automatic differentiation.</p>
503
+ </li>
504
+ <li><p>For speed-up, the approximate inverse is always computed with
505
+ double’s. Some intermediate matrix computations are performed sparsely.</p></li>
506
+ </ol>
507
+ <p>In contrast to HIKMOT, we use and return Sage’s native implementation of
508
+ (complex) interval arithmetic here, which allows for increased interoperability.
509
+ Another advantage is that Sage supports arbitrary precision.</p>
510
+ <p>Here is an example how to explicitly invoke the KrawczykShapesEngine:</p>
511
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80)
512
+ sage: C = KrawczykShapesEngine(M, shapes, bits_prec = 80)
513
+ sage: C.expand_until_certified()
514
+ True
515
+ sage: C.certified_shapes # doctest: +NUMERIC12
516
+ (0.6623589786223730129805? + 0.5622795120623012438992?*I, 0.6623589786223730129805? + 0.5622795120623012438992?*I, 0.6623589786223730129805? + 0.5622795120623012438992?*I)
517
+ </pre></div>
518
+ </div>
519
+ <p>And here an example where the initial solution is somewhat off:</p>
520
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;m019&quot;)
521
+ sage: shapes = [0.780559+0.91449j, 0.780559+0.9144j, 0.46009+0.639j]
522
+ sage: C = KrawczykShapesEngine(M, shapes, bits_prec = 100)
523
+ sage: C.expand_until_certified()
524
+ True
525
+ sage: C.certified_shapes # doctest: +ELLIPSIS
526
+ (0.7806? + 0.9145?*I, 0.7806? + 0.9145?*I, 0.460...? + 0.6326?*I)
527
+ </pre></div>
528
+ </div>
529
+ <dl class="py method">
530
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.expand_until_certified">
531
+ <span class="sig-name descname"><span class="pre">expand_until_certified</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.expand_until_certified" title="Link to this definition"></a></dt>
532
+ <dd><p>Try Krawczyk iterations (i.e., expanding the shape intervals [z]
533
+ by the Krawczyk interval K(z0, [z], f)) until we can certify they
534
+ contain a true solution.</p>
535
+ <p>If succeeded, return True and write certified shapes to
536
+ certified_shapes.
537
+ Set verbose = True for printing additional information.</p>
538
+ </dd></dl>
539
+
540
+ <dl class="py method">
541
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.interval_vector_is_contained_in">
542
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">interval_vector_is_contained_in</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vecA</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vecB</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.interval_vector_is_contained_in" title="Link to this definition"></a></dt>
543
+ <dd><p>Given two vectors of intervals, return whether the first one
544
+ is contained in the second one. Examples:</p>
545
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">RIF</span> <span class="o">=</span> <span class="n">RealIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
546
+ <span class="n">sage</span><span class="p">:</span> <span class="n">CIF</span> <span class="o">=</span> <span class="n">ComplexIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
547
+ <span class="n">sage</span><span class="p">:</span> <span class="n">box</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="n">RIF</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">),</span><span class="n">RIF</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">))</span>
548
+ <span class="n">sage</span><span class="p">:</span> <span class="n">a</span> <span class="o">=</span> <span class="p">[</span> <span class="n">CIF</span><span class="p">(</span><span class="mf">0.1</span><span class="p">),</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="n">box</span> <span class="p">]</span>
549
+ <span class="n">sage</span><span class="p">:</span> <span class="n">b</span> <span class="o">=</span> <span class="p">[</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="o">+</span> <span class="n">box</span><span class="p">,</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="mi">2</span> <span class="o">*</span> <span class="n">box</span> <span class="p">]</span>
550
+ <span class="n">sage</span><span class="p">:</span> <span class="n">c</span> <span class="o">=</span> <span class="p">[</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">0</span><span class="p">),</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">+</span> <span class="mi">3</span> <span class="o">*</span> <span class="n">box</span> <span class="p">]</span>
551
+
552
+ <span class="n">sage</span><span class="p">:</span> <span class="n">KrawczykShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
553
+ <span class="kc">True</span>
554
+ <span class="n">sage</span><span class="p">:</span> <span class="n">KrawczykShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
555
+ <span class="kc">False</span>
556
+ <span class="n">sage</span><span class="p">:</span> <span class="n">KrawczykShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
557
+ <span class="kc">False</span>
558
+ <span class="n">sage</span><span class="p">:</span> <span class="n">KrawczykShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">)</span>
559
+ <span class="kc">False</span>
560
+ <span class="n">sage</span><span class="p">:</span> <span class="n">KrawczykShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
561
+ <span class="kc">False</span>
562
+ <span class="n">sage</span><span class="p">:</span> <span class="n">KrawczykShapesEngine</span><span class="o">.</span><span class="n">interval_vector_is_contained_in</span><span class="p">(</span><span class="n">c</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
563
+ <span class="kc">False</span>
564
+ </pre></div>
565
+ </div>
566
+ </dd></dl>
567
+
568
+ <dl class="py method">
569
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.interval_vector_mid_points">
570
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">interval_vector_mid_points</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vec</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.interval_vector_mid_points" title="Link to this definition"></a></dt>
571
+ <dd><p>Given a vector of complex intervals, return the midpoints (as 0-length
572
+ complex intervals) of them.</p>
573
+ </dd></dl>
574
+
575
+ <dl class="py method">
576
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.interval_vector_union">
577
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">interval_vector_union</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">vecA</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">vecB</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.interval_vector_union" title="Link to this definition"></a></dt>
578
+ <dd><p>Given two vectors of intervals, return the vector of their unions,
579
+ i.e., the smallest interval containing both intervals.</p>
580
+ </dd></dl>
581
+
582
+ <dl class="py method">
583
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.krawczyk_interval">
584
+ <span class="sig-name descname"><span class="pre">krawczyk_interval</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shape_intervals</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.krawczyk_interval" title="Link to this definition"></a></dt>
585
+ <dd><p>Compute the interval in the Krawczyk test.</p>
586
+ <p>It is given as</p>
587
+ <blockquote>
588
+ <div><p>K(z0, [z], f) := z0 - c * f(z0) + (Id - c * df([z])) * ([z] - z0)</p>
589
+ </div></blockquote>
590
+ <dl class="simple">
591
+ <dt>where</dt><dd><ul class="simple">
592
+ <li><p>z0 is the approximate candidate solution,</p></li>
593
+ <li><p>[z] are the shape_intervals we try to verify,</p></li>
594
+ <li><p>f is the function taking the shapes to the errors of the logarithmic gluing equations</p></li>
595
+ <li><p>c is an approximate inverse of df</p></li>
596
+ <li><p>df([z]) is the derivative of f (interval-)evaluated for [z]</p></li>
597
+ </ul>
598
+ </dd>
599
+ </dl>
600
+ <p>Note that z0 in self.initial_shapes which are complex intervals
601
+ containing only one value (the candidate solution given initially).</p>
602
+ <p>If K is contained in [z], then we have proven that [z] contains a solution
603
+ to the gluing equations.</p>
604
+ <p>Do several Krawczyk operations to get a better solution:</p>
605
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from sage.all import vector
606
+ sage: M = Manifold(&quot;m019&quot;)
607
+ sage: shapes = vector(ComplexIntervalField(53), [ 0.5+0.8j, 0.5+0.8j, 0.5+0.8j])
608
+ sage: for i in range(15):
609
+ ... penultimateShapes = shapes
610
+ ... centers = [ shape.center() for shape in shapes ]
611
+ ... C = KrawczykShapesEngine(M, centers, bits_prec = 53)
612
+ ... shapes = C.krawczyk_interval(shapes)
613
+ sage: shapes # doctest: +NUMERIC12
614
+ (0.78055252785073? + 0.91447366296773?*I, 0.780552527850725? + 0.91447366296773?*I, 0.460021175573718? + 0.632624193605256?*I)
615
+ </pre></div>
616
+ </div>
617
+ </dd></dl>
618
+
619
+ <dl class="py method">
620
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.log_gluing_LHS_derivatives">
621
+ <span class="sig-name descname"><span class="pre">log_gluing_LHS_derivatives</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shapes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.log_gluing_LHS_derivatives" title="Link to this definition"></a></dt>
622
+ <dd><p>Compute the Jacobian of the vector-valued function f
623
+ described in the above log_gluing_LHSs:</p>
624
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
625
+ sage: M = Manifold(&quot;m019&quot;)
626
+ sage: shapes = M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80)
627
+ sage: C = KrawczykShapesEngine(M, shapes, bits_prec = 80)
628
+ sage: RIF = RealIntervalField(80)
629
+ sage: CIF = ComplexIntervalField(80)
630
+ sage: shape1 = CIF(RIF(0.78055,0.78056), RIF(0.9144, 0.9145))
631
+ sage: shape2 = CIF(RIF(0.46002,0.46003), RIF(0.6326, 0.6327))
632
+ sage: shapes = [shape1, shape1, shape2]
633
+ sage: C.log_gluing_LHS_derivatives(shapes) # doctest: +NUMERIC3
634
+ [ 0.292? - 1.6666?*I 0.292? - 1.6666?*I 0.752? - 1.0340?*I]
635
+ [ 0.5400? - 0.6327?*I 0.5400? - 0.6327?*I -1.561? - 1.8290?*I]
636
+ [ 0.5400? - 0.6327?*I -0.5400? + 0.6327?*I 0]
637
+ </pre></div>
638
+ </div>
639
+ </dd></dl>
640
+
641
+ <dl class="py method">
642
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.log_gluing_LHS_derivatives_sparse">
643
+ <span class="sig-name descname"><span class="pre">log_gluing_LHS_derivatives_sparse</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shapes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.log_gluing_LHS_derivatives_sparse" title="Link to this definition"></a></dt>
644
+ <dd><p>A column-sparse matrix version of log_gluing_LHS_derivatives_sparse.
645
+ The result is a list of list of pairs. Each list of pairs corresponds
646
+ to a column, a pair being (index of row, value) where the index is
647
+ increasing.</p>
648
+ </dd></dl>
649
+
650
+ <dl class="py method">
651
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.log_gluing_LHSs">
652
+ <span class="sig-name descname"><span class="pre">log_gluing_LHSs</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">shapes</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.log_gluing_LHSs" title="Link to this definition"></a></dt>
653
+ <dd><p>Given the result of M.gluing_equations(‘rect’) or a
654
+ subset of rows of it and shapes, return a vector of
655
+ log(LHS) where</p>
656
+ <blockquote>
657
+ <div><p>LHS = c * z0 ** a0 * (1-z0) ** b0 * z1 ** a1 * …</p>
658
+ </div></blockquote>
659
+ <p>Let f: C^n -&gt; C^n denote the function which takes
660
+ shapes and returns the vector of log(LHS).</p>
661
+ <p>The reason we take the logarithm of the rectangular
662
+ gluing equations is because the logarithmic derivative
663
+ is of a particular nice form:</p>
664
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
665
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m019&quot;</span><span class="p">)</span>
666
+ <span class="n">sage</span><span class="p">:</span> <span class="n">equations</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">gluing_equations</span><span class="p">(</span><span class="s1">&#39;rect&#39;</span><span class="p">)</span>
667
+ <span class="n">sage</span><span class="p">:</span> <span class="n">RIF</span> <span class="o">=</span> <span class="n">RealIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
668
+ <span class="n">sage</span><span class="p">:</span> <span class="n">CIF</span> <span class="o">=</span> <span class="n">ComplexIntervalField</span><span class="p">(</span><span class="mi">80</span><span class="p">)</span>
669
+ <span class="n">sage</span><span class="p">:</span> <span class="n">zero</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span><span class="o">.</span><span class="n">center</span><span class="p">()</span>
670
+ <span class="n">sage</span><span class="p">:</span> <span class="n">shape1</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.78055</span><span class="p">,</span><span class="mf">0.78056</span><span class="p">),</span> <span class="n">RIF</span><span class="p">(</span><span class="mf">0.9144</span><span class="p">,</span> <span class="mf">0.9145</span><span class="p">))</span>
671
+ <span class="n">sage</span><span class="p">:</span> <span class="n">shape2</span> <span class="o">=</span> <span class="n">CIF</span><span class="p">(</span><span class="n">RIF</span><span class="p">(</span><span class="mf">0.46002</span><span class="p">,</span><span class="mf">0.46003</span><span class="p">),</span> <span class="n">RIF</span><span class="p">(</span><span class="mf">0.6326</span><span class="p">,</span> <span class="mf">0.6327</span><span class="p">))</span>
672
+ </pre></div>
673
+ </div>
674
+ <p>An interval solution containing the true solution. The log of each
675
+ rectangular equation should be 0 for the true solution, hence the interval
676
+ should contain zero:</p>
677
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape2]
678
+ sage: C = KrawczykShapesEngine(M, [shape.center() for shape in shapes], bits_prec = 53)
679
+ sage: LHSs = C.log_gluing_LHSs(shapes)
680
+ sage: LHSs # doctest: +NUMERIC6
681
+ (0.000? + 0.000?*I, 0.000? + 0.000?*I, 0.0000? + 0.0000?*I)
682
+ sage: zero in LHSs[0]
683
+ True
684
+ </pre></div>
685
+ </div>
686
+ <p>An interval not containing the true solution:</p>
687
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape1]
688
+ sage: LHSs = C.log_gluing_LHSs(shapes)
689
+ sage: LHSs # doctest: +NUMERIC3
690
+ (0.430? - 0.078?*I, 0.246? - 0.942?*I, 0.0000? + 0.0000?*I)
691
+ sage: zero in LHSs[0]
692
+ False
693
+ </pre></div>
694
+ </div>
695
+ </dd></dl>
696
+
697
+ <dl class="py method">
698
+ <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.matrix_times_sparse">
699
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">matrix_times_sparse</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">m</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sparse_m</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.KrawczykShapesEngine.matrix_times_sparse" title="Link to this definition"></a></dt>
700
+ <dd><p>Multiply a (dense) Sage matrix with a column-sparse matrix
701
+ (in the format described in log_gluing_LHS_derivatives_sparse).</p>
702
+ </dd></dl>
703
+
704
+ </dd></dl>
705
+
706
+ </section>
707
+ <section id="verification-of-hyperbolicity">
708
+ <h2>Verification of hyperbolicity<a class="headerlink" href="#verification-of-hyperbolicity" title="Link to this heading"></a></h2>
709
+ <p>Methods containing <code class="docutils literal notranslate"><span class="pre">check</span></code> will raise an exception if the desired property
710
+ cannot be certified. Methods containing <code class="docutils literal notranslate"><span class="pre">verify</span></code> or <code class="docutils literal notranslate"><span class="pre">verified</span></code> will fail
711
+ more gracefully returning <code class="docutils literal notranslate"><span class="pre">False</span></code> or <code class="docutils literal notranslate"><span class="pre">None</span></code> in such a case.</p>
712
+ <dl class="py function">
713
+ <dt class="sig sig-object py" id="snappy.verify.hyperbolicity.check_logarithmic_gluing_equations_and_positively_oriented_tets">
714
+ <span class="sig-prename descclassname"><span class="pre">snappy.verify.hyperbolicity.</span></span><span class="sig-name descname"><span class="pre">check_logarithmic_gluing_equations_and_positively_oriented_tets</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">manifold</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">shape_intervals</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.hyperbolicity.check_logarithmic_gluing_equations_and_positively_oriented_tets" title="Link to this definition"></a></dt>
715
+ <dd><p>Given a SnapPy manifold manifold and complex intervals for the shapes
716
+ shape_intervals that are certified to contain a solution to the
717
+ rectangular gluing equations, verify that the logarithmic gluing equations
718
+ are also fulfilled and that all shapes have positive imaginary part.
719
+ It will raise an exception if the verification fails.
720
+ This is sufficient to prove that the manifold is indeed hyperbolic.</p>
721
+ <p>Since the given interval are supposed to contain a true solution of
722
+ the rectangular gluing equations, the logarithmic gluing equations
723
+ are known to be fulfilled up to a multiple of 2 pi i. Thus it is enough
724
+ to certify that the absolute error of the logarithmic gluing
725
+ equations is &lt; 0.1. Using interval arithmetic, this function certifies
726
+ this and positivity of the imaginary parts of the shapes:</p>
727
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
728
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m019&quot;</span><span class="p">)</span>
729
+ <span class="n">sage</span><span class="p">:</span> <span class="n">check_logarithmic_gluing_equations_and_positively_oriented_tets</span><span class="p">(</span>
730
+ <span class="o">...</span> <span class="n">M</span><span class="p">,</span> <span class="n">M</span><span class="o">.</span><span class="n">tetrahedra_shapes</span><span class="p">(</span><span class="s1">&#39;rect&#39;</span><span class="p">,</span> <span class="n">intervals</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
731
+ </pre></div>
732
+ </div>
733
+ <p>The SnapPy triangulation of the following hyperbolic manifold contains
734
+ actually negatively oriented tetrahedra:</p>
735
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;t02774&quot;)
736
+ sage: check_logarithmic_gluing_equations_and_positively_oriented_tets(
737
+ ... M, M.tetrahedra_shapes(&#39;rect&#39;, intervals=True)) # doctest: +IGNORE_EXCEPTION_DETAIL
738
+ Traceback (most recent call last):
739
+ ...
740
+ ShapePositiveImaginaryPartNumericalVerifyError: Numerical verification that shape has positive imaginary part has failed: Im(0.4800996900657? - 0.0019533695046?*I) &gt; 0
741
+ </pre></div>
742
+ </div>
743
+ </dd></dl>
744
+
745
+ </section>
746
+ <section id="verified-canonical-cell-decompositions">
747
+ <h2>Verified canonical cell decompositions<a class="headerlink" href="#verified-canonical-cell-decompositions" title="Link to this heading"></a></h2>
748
+ <dl class="py function">
749
+ <dt class="sig sig-object py" id="snappy.verify.canonical.interval_checked_canonical_triangulation">
750
+ <span class="sig-prename descclassname"><span class="pre">snappy.verify.canonical.</span></span><span class="sig-name descname"><span class="pre">interval_checked_canonical_triangulation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bits_prec</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.canonical.interval_checked_canonical_triangulation" title="Link to this definition"></a></dt>
751
+ <dd><p>Given a canonical triangulation of a cusped (possibly non-orientable)
752
+ manifold M, return this triangulation if it has tetrahedral cells and can
753
+ be verified using interval arithmetics with the optional, given precision.
754
+ Otherwise, raises an Exception.</p>
755
+ <p>It fails when we call it on something which is not the canonical
756
+ triangulation:</p>
757
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
758
+ sage: M = Manifold(&quot;m015&quot;)
759
+ sage: interval_checked_canonical_triangulation(M) # doctest: +ELLIPSIS +IGNORE_EXCEPTION_DETAIL
760
+ Traceback (most recent call last):
761
+ ...
762
+ TiltProvenPositiveNumericalVerifyError: Numerical verification that tilt is negative has failed, tilt is actually positive. This is provably not the proto-canonical triangulation: 0.164542163...? &lt;= 0
763
+ </pre></div>
764
+ </div>
765
+ <p>It verifies the canonical triangulation:</p>
766
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">M</span><span class="o">.</span><span class="n">canonize</span><span class="p">()</span>
767
+ <span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">interval_checked_canonical_triangulation</span><span class="p">(</span><span class="n">M</span><span class="p">)</span>
768
+ <span class="n">sage</span><span class="p">:</span> <span class="n">K</span>
769
+ <span class="n">m015</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">0</span><span class="p">)</span>
770
+ </pre></div>
771
+ </div>
772
+ <p>Has a non-tetrahedral canonical cell:</p>
773
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;m137&quot;)
774
+ sage: M.canonize()
775
+ sage: interval_checked_canonical_triangulation(M) # doctest: +ELLIPSIS +IGNORE_EXCEPTION_DETAIL
776
+ Traceback (most recent call last):
777
+ ...
778
+ TiltInequalityNumericalVerifyError: Numerical verification that tilt is negative has failed: 0.?e-1... &lt; 0
779
+ </pre></div>
780
+ </div>
781
+ <p>Has a cubical canonical cell:</p>
782
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;m412&quot;)
783
+ sage: M.canonize()
784
+ sage: interval_checked_canonical_triangulation(M) # doctest: +ELLIPSIS +IGNORE_EXCEPTION_DETAIL
785
+ Traceback (most recent call last):
786
+ ...
787
+ TiltInequalityNumericalVerifyError: Numerical verification that tilt is negative has failed: 0.?e-1... &lt; 0
788
+ </pre></div>
789
+ </div>
790
+ </dd></dl>
791
+
792
+ <dl class="py function">
793
+ <dt class="sig sig-object py" id="snappy.verify.canonical.exactly_checked_canonical_retriangulation">
794
+ <span class="sig-prename descclassname"><span class="pre">snappy.verify.canonical.</span></span><span class="sig-name descname"><span class="pre">exactly_checked_canonical_retriangulation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">bits_prec</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">degree</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.canonical.exactly_checked_canonical_retriangulation" title="Link to this definition"></a></dt>
795
+ <dd><p>Given a proto-canonical triangulation of a cusped (possibly non-orientable)
796
+ manifold M, return its canonical retriangulation which is computed from
797
+ exact shapes. The exact shapes are computed using snap (which uses the
798
+ LLL-algorithm). The precision (in bits) and the maximal degree need to be
799
+ specified (here 300 bits precision and polynomials of degree less than 4):</p>
800
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
801
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m412&quot;</span><span class="p">)</span>
802
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span><span class="o">.</span><span class="n">canonize</span><span class="p">()</span>
803
+ <span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">exactly_checked_canonical_retriangulation</span><span class="p">(</span><span class="n">M</span><span class="p">,</span> <span class="mi">300</span><span class="p">,</span> <span class="mi">4</span><span class="p">)</span>
804
+ </pre></div>
805
+ </div>
806
+ <p>M’s canonical cell decomposition has a cube, so non-tetrahedral:</p>
807
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">has_finite_vertices</span><span class="p">()</span>
808
+ <span class="kc">True</span>
809
+ </pre></div>
810
+ </div>
811
+ <p>Has 12 tetrahedra after the retrianglation:</p>
812
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">num_tetrahedra</span><span class="p">()</span>
813
+ <span class="mi">12</span>
814
+ </pre></div>
815
+ </div>
816
+ <p>Check that it fails on something which is not a proto-canonical
817
+ triangulation:</p>
818
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
819
+ sage: M = Manifold(&quot;m015&quot;)
820
+ sage: exactly_checked_canonical_retriangulation(M, 500, 6) # doctest: +IGNORE_EXCEPTION_DETAIL
821
+ Traceback (most recent call last):
822
+ ...
823
+ TiltProvenPositiveNumericalVerifyError: Numerical verification that tilt is negative has failed, tilt is actually positive. This is provably not the proto-canonical triangulation: 0.1645421638874662848910671879? &lt;= 0
824
+ </pre></div>
825
+ </div>
826
+ </dd></dl>
827
+
828
+ </section>
829
+ <section id="module-snappy.verify.square_extensions">
830
+ <span id="exact-computations-for-cusp-cross-sections"></span><h2>Exact computations for cusp cross sections<a class="headerlink" href="#module-snappy.verify.square_extensions" title="Link to this heading"></a></h2>
831
+ <p>The square_extensions module provides
832
+ two special classes to give exact representations of the values
833
+ involved when computing a cusp cross section.</p>
834
+ <p>The method find_shapes_as_complex_sqrt_lin_combinations returns a list of
835
+ shapes as ComplexSqrtLinCombination’s. This can be used as input to
836
+ CuspCrossSection. The outputs of CuspCrossSection, including the tilts, will
837
+ then be of type SqrtLinCombination.</p>
838
+ <p>Consider the real number field N generated by the real and imaginary part of
839
+ the shapes. The edge lengths and the factors used to normalize the cusp areas
840
+ will be square roots in N and thus the tilts will be N-linear combinations of
841
+ square roots in N. To avoid computing in a massive tower of square extensions
842
+ of N, we implement SqrtLinCombination here that provides a special
843
+ implementation of the == operator.</p>
844
+ <dl class="py function">
845
+ <dt class="sig sig-object py" id="snappy.verify.square_extensions.find_shapes_as_complex_sqrt_lin_combinations">
846
+ <span class="sig-prename descclassname"><span class="pre">snappy.verify.square_extensions.</span></span><span class="sig-name descname"><span class="pre">find_shapes_as_complex_sqrt_lin_combinations</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prec</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">degree</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.square_extensions.find_shapes_as_complex_sqrt_lin_combinations" title="Link to this definition"></a></dt>
847
+ <dd><p>Given a manifold M, use snap (which uses LLL-algorithm) with the given
848
+ decimal precision and maximal degree to find exact values for the shapes’
849
+ real and imaginary part. Return the shapes as list of
850
+ ComplexSqrtLinCombination’s. Return None on failure.</p>
851
+ <p>Example:</p>
852
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
853
+ <span class="n">sage</span><span class="p">:</span> <span class="n">M</span><span class="o">=</span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m412&quot;</span><span class="p">)</span>
854
+ <span class="n">sage</span><span class="p">:</span> <span class="n">find_shapes_as_complex_sqrt_lin_combinations</span><span class="p">(</span><span class="n">M</span><span class="p">,</span> <span class="mi">200</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
855
+ <span class="p">[</span><span class="n">ComplexSqrtLinCombination</span><span class="p">((</span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">)),</span> <span class="n">ComplexSqrtLinCombination</span><span class="p">((</span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">)),</span> <span class="n">ComplexSqrtLinCombination</span><span class="p">((</span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">)),</span> <span class="n">ComplexSqrtLinCombination</span><span class="p">((</span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">)),</span> <span class="n">ComplexSqrtLinCombination</span><span class="p">((</span><span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="n">x</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="mi">1</span><span class="p">))]</span>
856
+ </pre></div>
857
+ </div>
858
+ </dd></dl>
859
+
860
+ <dl class="py class">
861
+ <dt class="sig sig-object py" id="snappy.verify.square_extensions.SqrtLinCombination">
862
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.square_extensions.</span></span><span class="sig-name descname"><span class="pre">SqrtLinCombination</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">d</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">{}</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">embed_cache</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.square_extensions.SqrtLinCombination" title="Link to this definition"></a></dt>
863
+ <dd><p>A class representing a linear combination</p>
864
+ <blockquote>
865
+ <div><p>c_1 * sqrt(r_1) + c_2 * sqrt(r_2) + … + c_n * sqrt(r_n)</p>
866
+ </div></blockquote>
867
+ <p>where c_i and r_i have to be of type Integer, Rational or elements
868
+ of the same Sage NumberField with a real embedding (Caution: this is
869
+ assumed but not checked!) such that all r_i are positive (Caution: this is
870
+ not checked during construction!).</p>
871
+ <p>It implements +, -, * where one of the operators is allowed to be an
872
+ integer or rational.</p>
873
+ <p>/ is only implemented when the denominator has only one term c_1 * sqrt(1).
874
+ sqrt is only implemented for c_1 * sqrt(1) and it is not checked that
875
+ c_1 is positive.</p>
876
+ <p>== is implemented, but the other comparison operators are not: casting to
877
+ a RealIntervalField is implemented instead and the user can compare the
878
+ intervals.</p>
879
+ <p>The == operator is implemented by first reducing A == B to D == 0 and then
880
+ converting to a different data type (_FactorizedSqrtLinCombination) that can
881
+ represent linear combinations:</p>
882
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">D</span> <span class="o">=</span> <span class="n">c_1</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">})</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">})</span> <span class="o">*</span> <span class="o">...</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="mi">1</span><span class="p">,</span><span class="n">k_1</span><span class="p">})</span>
883
+ <span class="o">+</span> <span class="n">c_2</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">})</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">})</span> <span class="o">*</span> <span class="o">...</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="mi">2</span><span class="p">,</span><span class="n">k_2</span><span class="p">})</span>
884
+ <span class="o">+</span> <span class="o">...</span>
885
+ <span class="o">+</span> <span class="n">c_n</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="n">n</span><span class="p">,</span><span class="mi">1</span><span class="p">})</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="n">n</span><span class="p">,</span><span class="mi">2</span><span class="p">})</span> <span class="o">*</span> <span class="o">...</span> <span class="o">*</span> <span class="n">sqrt</span><span class="p">(</span><span class="n">r_</span><span class="p">{</span><span class="n">n</span><span class="p">,</span><span class="n">k_n</span><span class="p">})</span>
886
+ </pre></div>
887
+ </div>
888
+ <dl class="simple">
889
+ <dt>by just trivially setting</dt><dd><p>k_i = 0 when r_i = 1 and
890
+ r_{i,1} = r_i and k_1 = 1 otherwise.</p>
891
+ </dd>
892
+ </dl>
893
+ <p>For this data type, multiplying two sqrt(r_{i,j}) with equal r_{i,j} will
894
+ cancel the two sqrt’s and apply the common r_{i,j} to the c_i of the result
895
+ instead. Thus, the following procedure for determining whether D == 0 will
896
+ eventually terminate:</p>
897
+ <ul class="simple">
898
+ <li><p>if the number of terms n is 0, return True</p></li>
899
+ <li><p>if the number of terms n is 1, return c_1 == 0</p></li>
900
+ <li><p>if there is a r_{i,j} common to each summand, factor it out</p></li>
901
+ <li><p>pick one of the r_{i,j}, split the sum into two parts “left”,
902
+ respectively, “right” of all the terms containing sqrt(r_{i,j}),
903
+ respectively, not containing sqrt(r_{i,j}).</p></li>
904
+ <li><p>If left^2 - right^2 == 0 is False, return False.
905
+ (sqrt(r_{i,j})^2 simplifies to r_{i,j} and disappears, so the resulting
906
+ expression is easier and this recursion terminates eventually.)</p></li>
907
+ <li><p>If left == 0 (some comment applies), return True</p></li>
908
+ <li><p>Use interval arithmetic of increasing precision until it is high enough
909
+ to determine the signs of left and right.
910
+ Return True if and only if the signs differ, otherwise False.</p></li>
911
+ </ul>
912
+ <p>Examples:</p>
913
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from sage.rings.number_field.number_field import NumberField
914
+ sage: from sage.rings.integer import Integer
915
+ sage: from sage.rings.rational import Rational
916
+ sage: from sage.rings.real_mpfr import RealLiteral, RealField
917
+ sage: from sage.rings.real_mpfi import RealIntervalField
918
+ sage: from sage.calculus.var import var
919
+ sage: from sage.functions.other import sqrt
920
+ sage: x = var(&#39;x&#39;)
921
+ sage: poly = x ** 6 + Rational((3,2))*x**4 + Rational((9,16))*x**2 - Rational((23,64))
922
+ sage: nf = NumberField(poly, &#39;z&#39;, embedding = RealField()(0.56227951206))
923
+ sage: z = nf.gen()
924
+
925
+ sage: A = SqrtLinCombination(z)
926
+ sage: B = SqrtLinCombination(Rational((8,9))*z**4 + Rational((10,9))*z**2 + Rational((2,9)))
927
+ sage: C = SqrtLinCombination(3)
928
+ sage: D = SqrtLinCombination(Integer(5))
929
+ sage: E = SqrtLinCombination(Rational((6,7)))
930
+
931
+ sage: A + B
932
+ (8/9*z^4 + 10/9*z^2 + z + 2/9) * sqrt(1)
933
+ sage: B - E
934
+ (8/9*z^4 + 10/9*z^2 - 40/63) * sqrt(1)
935
+ sage: A + sqrt(B) * sqrt(B)
936
+ (8/9*z^4 + 10/9*z^2 + z + 2/9) * sqrt(1)
937
+ sage: A + sqrt(B) * sqrt(B) + C == A + B + C
938
+ True
939
+ sage: A / E
940
+ (7/6*z) * sqrt(1)
941
+ sage: B / A.sqrt()
942
+ (128/207*z^5 + 376/207*z^3 + 302/207*z) * sqrt(z)
943
+ sage: B / (D * A.sqrt())
944
+ (128/1035*z^5 + 376/1035*z^3 + 302/1035*z) * sqrt(z)
945
+ sage: RIF = RealIntervalField(100)
946
+ sage: RIF(B.sqrt() + E.sqrt())
947
+ 1.73967449622339881238507307209?
948
+ sage: A - B == 0
949
+ False
950
+ sage: (A + B).sqrt()
951
+ (1) * sqrt(8/9*z^4 + 10/9*z^2 + z + 2/9)
952
+ sage: 3 * A.sqrt() + (4 * B).sqrt() + C + 8 == (9 * A).sqrt() + 2 * B.sqrt() + (C * C).sqrt() + 11 - 3
953
+ True
954
+ </pre></div>
955
+ </div>
956
+ <dl class="py method">
957
+ <dt class="sig sig-object py" id="snappy.verify.square_extensions.SqrtLinCombination.sign">
958
+ <span class="sig-name descname"><span class="pre">sign</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.square_extensions.SqrtLinCombination.sign" title="Link to this definition"></a></dt>
959
+ <dd><p>Returns the +1, 0, -1 depending on whether the value is positive,
960
+ zero or negative. For the zero case, exact arithmetic is used to
961
+ certify. Otherwise, interval arithmetic is used.</p>
962
+ </dd></dl>
963
+
964
+ <dl class="py method">
965
+ <dt class="sig sig-object py" id="snappy.verify.square_extensions.SqrtLinCombination.sign_with_interval">
966
+ <span class="sig-name descname"><span class="pre">sign_with_interval</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.square_extensions.SqrtLinCombination.sign_with_interval" title="Link to this definition"></a></dt>
967
+ <dd><p>Similar to sign, but for the non-zero case, also return the interval
968
+ certifying the sign - useful for debugging.</p>
969
+ </dd></dl>
970
+
971
+ </dd></dl>
972
+
973
+ <dl class="py class">
974
+ <dt class="sig sig-object py" id="snappy.verify.square_extensions.ComplexSqrtLinCombination">
975
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.square_extensions.</span></span><span class="sig-name descname"><span class="pre">ComplexSqrtLinCombination</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">real</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">imag</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">embed_cache</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.square_extensions.ComplexSqrtLinCombination" title="Link to this definition"></a></dt>
976
+ <dd><p>A pair (real, imag) of SqrtLinCombinations representing the complex number
977
+ real + imag * I. Supports <code class="docutils literal notranslate"><span class="pre">real()</span></code>, <code class="docutils literal notranslate"><span class="pre">imag()</span></code>, <code class="docutils literal notranslate"><span class="pre">+</span></code>, <code class="docutils literal notranslate"><span class="pre">-</span></code>, <code class="docutils literal notranslate"><span class="pre">*</span></code>, <code class="docutils literal notranslate"><span class="pre">/</span></code>,
978
+ <code class="docutils literal notranslate"><span class="pre">abs</span></code>, <code class="docutils literal notranslate"><span class="pre">conjugate()</span></code> and <code class="docutils literal notranslate"><span class="pre">==</span></code>.</p>
979
+ <dl class="py method">
980
+ <dt class="sig sig-object py" id="snappy.verify.square_extensions.ComplexSqrtLinCombination.imag">
981
+ <span class="sig-name descname"><span class="pre">imag</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.square_extensions.ComplexSqrtLinCombination.imag" title="Link to this definition"></a></dt>
982
+ <dd><p>Imaginary part.</p>
983
+ </dd></dl>
984
+
985
+ <dl class="py method">
986
+ <dt class="sig sig-object py" id="snappy.verify.square_extensions.ComplexSqrtLinCombination.real">
987
+ <span class="sig-name descname"><span class="pre">real</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.square_extensions.ComplexSqrtLinCombination.real" title="Link to this definition"></a></dt>
988
+ <dd><p>Real part.</p>
989
+ </dd></dl>
990
+
991
+ </dd></dl>
992
+
993
+ </section>
994
+ <section id="module-snappy.verify.exceptions">
995
+ <span id="exceptions"></span><h2>Exceptions<a class="headerlink" href="#module-snappy.verify.exceptions" title="Link to this heading"></a></h2>
996
+ <p>All final exceptions are deriving from two base classes:</p>
997
+ <ul class="simple">
998
+ <li><p>a subclass of VerifyErrorBase to indicate whether a numerical or exact
999
+ verification failed</p></li>
1000
+ <li><p>a subclass of EquationType to indicate the type of equation of
1001
+ inequality for which the verification failed.</p></li>
1002
+ </ul>
1003
+ <p>Intermediate subclasses (those without __init__) are not supposed to be
1004
+ raised.</p>
1005
+ <p>The hierarchy is as follows:</p>
1006
+ <ul class="simple">
1007
+ <li><p>VerifyErrorBase(RuntimeError)</p>
1008
+ <ul>
1009
+ <li><p>NumericalVerifyError</p>
1010
+ <ul>
1011
+ <li><p>InequalityNumericalVerifyError</p></li>
1012
+ <li><p>LogLiftNumericalVerifyError</p></li>
1013
+ </ul>
1014
+ </li>
1015
+ <li><p>ExactVerifyError</p>
1016
+ <ul>
1017
+ <li><p>IsZeroExactVerifyError</p></li>
1018
+ </ul>
1019
+ </li>
1020
+ </ul>
1021
+ </li>
1022
+ <li><p>EquationType</p>
1023
+ <ul>
1024
+ <li><p>EdgeEquationType</p>
1025
+ <ul>
1026
+ <li><p>EdgeEquationExactVerifyError</p></li>
1027
+ <li><p>EdgeEquationLogLiftNumericalVerifyError</p></li>
1028
+ </ul>
1029
+ </li>
1030
+ <li><p>CuspConsistencyType</p>
1031
+ <ul>
1032
+ <li><p>CuspEquationType</p>
1033
+ <ul>
1034
+ <li><p>CuspEquationExactVerifyError</p></li>
1035
+ <li><p>CuspEquationLogLiftNumericalVerifyError</p></li>
1036
+ </ul>
1037
+ </li>
1038
+ </ul>
1039
+ </li>
1040
+ <li><p>TiltType</p>
1041
+ <ul>
1042
+ <li><p>TiltInequalityNumericalVerifyError</p>
1043
+ <ul>
1044
+ <li><p>TiltProvenPositiveNumericalVerifyError</p></li>
1045
+ </ul>
1046
+ </li>
1047
+ <li><p>TiltIsZeroExactVerifyError</p></li>
1048
+ </ul>
1049
+ </li>
1050
+ <li><p>ShapeType</p>
1051
+ <ul>
1052
+ <li><p>ShapePositiveImaginaryPartNumericalVerifyError</p></li>
1053
+ </ul>
1054
+ </li>
1055
+ </ul>
1056
+ </li>
1057
+ </ul>
1058
+ <dl class="py class">
1059
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspConsistencyType">
1060
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">CuspConsistencyType</span></span><a class="headerlink" href="#snappy.verify.exceptions.CuspConsistencyType" title="Link to this definition"></a></dt>
1061
+ <dd><p>A base class indicating that verificatin of an equation involving a cusp
1062
+ failed.</p>
1063
+ </dd></dl>
1064
+
1065
+ <dl class="py exception">
1066
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspEquationExactVerifyError">
1067
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">CuspEquationExactVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.CuspEquationExactVerifyError" title="Link to this definition"></a></dt>
1068
+ <dd><p>Exception for failed verification of a polynomial cusp gluing equation
1069
+ using exact arithmetics.</p>
1070
+ </dd></dl>
1071
+
1072
+ <dl class="py exception">
1073
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspEquationLogLiftNumericalVerifyError">
1074
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">CuspEquationLogLiftNumericalVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expected_value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.CuspEquationLogLiftNumericalVerifyError" title="Link to this definition"></a></dt>
1075
+ <dd><p>Exception for failed numerical verification that a logarithmic cusp
1076
+ equation has error bound by epsilon.</p>
1077
+ </dd></dl>
1078
+
1079
+ <dl class="py class">
1080
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspEquationType">
1081
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">CuspEquationType</span></span><a class="headerlink" href="#snappy.verify.exceptions.CuspEquationType" title="Link to this definition"></a></dt>
1082
+ <dd><p>A base class indicating that a cusp gluing equation (involving the
1083
+ shapes) failed.</p>
1084
+ </dd></dl>
1085
+
1086
+ <dl class="py exception">
1087
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.EdgeEquationExactVerifyError">
1088
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">EdgeEquationExactVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.EdgeEquationExactVerifyError" title="Link to this definition"></a></dt>
1089
+ <dd><p>Exception for failed verification of a polynomial edge equation
1090
+ using exact arithmetics.</p>
1091
+ </dd></dl>
1092
+
1093
+ <dl class="py exception">
1094
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.EdgeEquationLogLiftNumericalVerifyError">
1095
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">EdgeEquationLogLiftNumericalVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.EdgeEquationLogLiftNumericalVerifyError" title="Link to this definition"></a></dt>
1096
+ <dd><p>Exception for failed numerical verification that a logarithmic edge
1097
+ equation has error bound by epsilon.</p>
1098
+ </dd></dl>
1099
+
1100
+ <dl class="py class">
1101
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.EdgeEquationType">
1102
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">EdgeEquationType</span></span><a class="headerlink" href="#snappy.verify.exceptions.EdgeEquationType" title="Link to this definition"></a></dt>
1103
+ <dd><p>A base class indicating that an edge equation could not be verified.</p>
1104
+ </dd></dl>
1105
+
1106
+ <dl class="py class">
1107
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.EquationType">
1108
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">EquationType</span></span><a class="headerlink" href="#snappy.verify.exceptions.EquationType" title="Link to this definition"></a></dt>
1109
+ <dd><p>A base class to derive subclasses which indicate what kind of
1110
+ equation failed to be verified.</p>
1111
+ </dd></dl>
1112
+
1113
+ <dl class="py exception">
1114
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.ExactVerifyError">
1115
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">ExactVerifyError</span></span><a class="headerlink" href="#snappy.verify.exceptions.ExactVerifyError" title="Link to this definition"></a></dt>
1116
+ <dd><p>The base for all exceptions resulting from a failed verification of an
1117
+ equation using exact arithmetics.</p>
1118
+ </dd></dl>
1119
+
1120
+ <dl class="py exception">
1121
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.InequalityNumericalVerifyError">
1122
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">InequalityNumericalVerifyError</span></span><a class="headerlink" href="#snappy.verify.exceptions.InequalityNumericalVerifyError" title="Link to this definition"></a></dt>
1123
+ <dd><p>The base for all exceptions resulting from a failed numerical
1124
+ verification of an inequality (typically by interval arithmetics).</p>
1125
+ </dd></dl>
1126
+
1127
+ <dl class="py exception">
1128
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.IsZeroExactVerifyError">
1129
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">IsZeroExactVerifyError</span></span><a class="headerlink" href="#snappy.verify.exceptions.IsZeroExactVerifyError" title="Link to this definition"></a></dt>
1130
+ <dd><p>The base for all exceptions resulting from verifying that a desired
1131
+ quantity is zero using exact arithmetics.</p>
1132
+ </dd></dl>
1133
+
1134
+ <dl class="py exception">
1135
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.LogLiftNumericalVerifyError">
1136
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">LogLiftNumericalVerifyError</span></span><a class="headerlink" href="#snappy.verify.exceptions.LogLiftNumericalVerifyError" title="Link to this definition"></a></dt>
1137
+ <dd><p>To verify a logarithmic gluing equation, the verify module will usually
1138
+ first verify the corresponding polynomial gluing equation.
1139
+ This means that the logarithmic gluing equation will be fulfilled up
1140
+ to a multiple of 2 Pi I.
1141
+ It then computes the logarithms and numerically checks that the result
1142
+ is close (by some epsilon) to the right value. Because we already know
1143
+ that the difference is a multiple of 2 Pi I, checking closeness is enough.</p>
1144
+ <p>This exception is supposed to be raised if the polynomial gluing equations
1145
+ have passed but checking the logarithmic equation is epsilon-close has
1146
+ failed.</p>
1147
+ </dd></dl>
1148
+
1149
+ <dl class="py exception">
1150
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.NumericalVerifyError">
1151
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">NumericalVerifyError</span></span><a class="headerlink" href="#snappy.verify.exceptions.NumericalVerifyError" title="Link to this definition"></a></dt>
1152
+ <dd><p>The base for all exceptions resulting from a failed numerical
1153
+ verification of an equality (using some epsilon) or inequality
1154
+ (typically by interval arithmetics).</p>
1155
+ </dd></dl>
1156
+
1157
+ <dl class="py exception">
1158
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.ShapePositiveImaginaryPartNumericalVerifyError">
1159
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">ShapePositiveImaginaryPartNumericalVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.ShapePositiveImaginaryPartNumericalVerifyError" title="Link to this definition"></a></dt>
1160
+ <dd><p>Failed numerical verification of a shape having positive imaginary part.</p>
1161
+ </dd></dl>
1162
+
1163
+ <dl class="py class">
1164
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.ShapeType">
1165
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">ShapeType</span></span><a class="headerlink" href="#snappy.verify.exceptions.ShapeType" title="Link to this definition"></a></dt>
1166
+ <dd><p>Base class for failed verification of legal shapes.</p>
1167
+ </dd></dl>
1168
+
1169
+ <dl class="py exception">
1170
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltInequalityNumericalVerifyError">
1171
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">TiltInequalityNumericalVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.TiltInequalityNumericalVerifyError" title="Link to this definition"></a></dt>
1172
+ <dd><p>Numerically verifying that a tilt is negative has failed.</p>
1173
+ </dd></dl>
1174
+
1175
+ <dl class="py exception">
1176
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltIsZeroExactVerifyError">
1177
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">TiltIsZeroExactVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.TiltIsZeroExactVerifyError" title="Link to this definition"></a></dt>
1178
+ <dd><p>Verifying that a tilt is zero has failed using exact arithmetic.</p>
1179
+ </dd></dl>
1180
+
1181
+ <dl class="py exception">
1182
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltProvenPositiveNumericalVerifyError">
1183
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">TiltProvenPositiveNumericalVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.TiltProvenPositiveNumericalVerifyError" title="Link to this definition"></a></dt>
1184
+ <dd><p>Numerically verifying that a tilt is negative has not only failed, we
1185
+ proved that the tilt is positive and thus that this cannot be a
1186
+ proto-canonical triangulation.</p>
1187
+ </dd></dl>
1188
+
1189
+ <dl class="py class">
1190
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltType">
1191
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">TiltType</span></span><a class="headerlink" href="#snappy.verify.exceptions.TiltType" title="Link to this definition"></a></dt>
1192
+ <dd><p>A base class relating to tilts.</p>
1193
+ </dd></dl>
1194
+
1195
+ <dl class="py exception">
1196
+ <dt class="sig sig-object py" id="snappy.verify.exceptions.VerifyErrorBase">
1197
+ <em class="property"><span class="pre">exception</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.exceptions.</span></span><span class="sig-name descname"><span class="pre">VerifyErrorBase</span></span><a class="headerlink" href="#snappy.verify.exceptions.VerifyErrorBase" title="Link to this definition"></a></dt>
1198
+ <dd><p>The base for all exceptions related to verification.</p>
1199
+ </dd></dl>
1200
+
1201
+ </section>
1202
+ </section>
1203
+
1204
+
1205
+ </div>
1206
+ </div>
1207
+ <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
1208
+ <a href="verify.html" class="btn btn-neutral float-left" title="Verified computations" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
1209
+ <a href="other.html" class="btn btn-neutral float-right" title="Other components" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
1210
+ </div>
1211
+
1212
+ <hr/>
1213
+
1214
+ <div role="contentinfo">
1215
+ <p>&#169; Copyright 2009-2025, by Marc Culler, Nathan Dunfield, Matthias Goerner, Jeffrey Weeks and others.</p>
1216
+ </div>
1217
+
1218
+ Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
1219
+ <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
1220
+ provided by <a href="https://readthedocs.org">Read the Docs</a>.
1221
+
1222
+
1223
+ </footer>
1224
+ </div>
1225
+ </div>
1226
+ </section>
1227
+ </div>
1228
+ <script>
1229
+ jQuery(function () {
1230
+ SphinxRtdTheme.Navigation.enable(true);
1231
+ });
1232
+ </script>
1233
+
1234
+ </body>
1235
+ </html>