snappy 3.1__cp38-cp38-win_amd64.whl → 3.2__cp38-cp38-win_amd64.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (476) hide show
  1. snappy/CyOpenGL.cp38-win_amd64.pyd +0 -0
  2. snappy/SnapPy.cp38-win_amd64.pyd +0 -0
  3. snappy/SnapPyHP.cp38-win_amd64.pyd +0 -0
  4. snappy/__init__.py +299 -402
  5. snappy/app.py +70 -20
  6. snappy/browser.py +18 -17
  7. snappy/canonical.py +249 -0
  8. snappy/{verify/cusp_shapes.py → cusps/__init__.py} +8 -18
  9. snappy/cusps/cusp_area_matrix.py +101 -0
  10. snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +23 -39
  11. snappy/cusps/maximal_cusp_area_matrix.py +136 -0
  12. snappy/cusps/test.py +21 -0
  13. snappy/cusps/trig_cusp_area_matrix.py +63 -0
  14. snappy/database.py +10 -9
  15. snappy/decorated_isosig.py +337 -114
  16. snappy/dev/extended_ptolemy/complexVolumesClosed.py +40 -7
  17. snappy/dev/extended_ptolemy/extended.py +3 -3
  18. snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
  19. snappy/dev/vericlosed/oneVertexTruncatedComplex.py +1 -1
  20. snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
  21. snappy/doc/_images/m125_paper_plane.jpg +0 -0
  22. snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
  23. snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
  24. snappy/doc/_sources/additional_classes.rst.txt +40 -40
  25. snappy/doc/_sources/bugs.rst.txt +14 -14
  26. snappy/doc/_sources/censuses.rst.txt +51 -51
  27. snappy/doc/_sources/credits.rst.txt +75 -70
  28. snappy/doc/_sources/development.rst.txt +259 -239
  29. snappy/doc/_sources/index.rst.txt +182 -115
  30. snappy/doc/_sources/installing.rst.txt +247 -264
  31. snappy/doc/_sources/manifold.rst.txt +6 -6
  32. snappy/doc/_sources/manifoldhp.rst.txt +46 -46
  33. snappy/doc/_sources/news.rst.txt +355 -283
  34. snappy/doc/_sources/other.rst.txt +25 -25
  35. snappy/doc/_sources/platonic_census.rst.txt +20 -20
  36. snappy/doc/_sources/plink.rst.txt +102 -102
  37. snappy/doc/_sources/ptolemy.rst.txt +66 -66
  38. snappy/doc/_sources/ptolemy_classes.rst.txt +42 -42
  39. snappy/doc/_sources/ptolemy_examples1.rst.txt +298 -297
  40. snappy/doc/_sources/ptolemy_examples2.rst.txt +363 -363
  41. snappy/doc/_sources/ptolemy_examples3.rst.txt +301 -301
  42. snappy/doc/_sources/ptolemy_examples4.rst.txt +61 -61
  43. snappy/doc/_sources/ptolemy_prelim.rst.txt +105 -105
  44. snappy/doc/_sources/screenshots.rst.txt +21 -21
  45. snappy/doc/_sources/snap.rst.txt +87 -87
  46. snappy/doc/_sources/snappy.rst.txt +28 -28
  47. snappy/doc/_sources/spherogram.rst.txt +103 -103
  48. snappy/doc/_sources/todo.rst.txt +47 -47
  49. snappy/doc/_sources/triangulation.rst.txt +11 -11
  50. snappy/doc/_sources/tutorial.rst.txt +49 -49
  51. snappy/doc/_sources/verify.rst.txt +210 -150
  52. snappy/doc/_sources/verify_internals.rst.txt +79 -90
  53. snappy/doc/_static/basic.css +924 -902
  54. snappy/doc/_static/css/badge_only.css +1 -1
  55. snappy/doc/_static/css/theme.css +1 -1
  56. snappy/doc/_static/doctools.js +1 -1
  57. snappy/doc/_static/documentation_options.js +12 -13
  58. snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
  59. snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
  60. snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
  61. snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
  62. snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  63. snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  64. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  65. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  66. snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
  67. snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
  68. snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
  69. snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
  70. snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
  71. snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
  72. snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
  73. snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
  74. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  75. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  76. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  77. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  78. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  79. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  80. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  81. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  82. snappy/doc/_static/js/versions.js +228 -0
  83. snappy/doc/_static/language_data.js +199 -199
  84. snappy/doc/_static/pygments.css +74 -73
  85. snappy/doc/_static/searchtools.js +125 -71
  86. snappy/doc/_static/snappy_furo.css +33 -33
  87. snappy/doc/_static/snappy_sphinx_rtd_theme.css +42 -42
  88. snappy/doc/_static/sphinx_highlight.js +13 -3
  89. snappy/doc/additional_classes.html +1499 -1330
  90. snappy/doc/bugs.html +131 -134
  91. snappy/doc/censuses.html +426 -445
  92. snappy/doc/credits.html +180 -180
  93. snappy/doc/development.html +383 -363
  94. snappy/doc/genindex.html +1330 -1409
  95. snappy/doc/index.html +261 -206
  96. snappy/doc/installing.html +345 -363
  97. snappy/doc/manifold.html +3451 -2839
  98. snappy/doc/manifoldhp.html +179 -182
  99. snappy/doc/news.html +387 -329
  100. snappy/doc/objects.inv +0 -0
  101. snappy/doc/other.html +160 -162
  102. snappy/doc/platonic_census.html +374 -377
  103. snappy/doc/plink.html +209 -212
  104. snappy/doc/ptolemy.html +253 -255
  105. snappy/doc/ptolemy_classes.html +1143 -1146
  106. snappy/doc/ptolemy_examples1.html +408 -410
  107. snappy/doc/ptolemy_examples2.html +470 -473
  108. snappy/doc/ptolemy_examples3.html +413 -416
  109. snappy/doc/ptolemy_examples4.html +194 -197
  110. snappy/doc/ptolemy_prelim.html +247 -250
  111. snappy/doc/py-modindex.html +164 -167
  112. snappy/doc/screenshots.html +140 -142
  113. snappy/doc/search.html +134 -137
  114. snappy/doc/searchindex.js +1 -1
  115. snappy/doc/snap.html +201 -204
  116. snappy/doc/snappy.html +180 -182
  117. snappy/doc/spherogram.html +1210 -1213
  118. snappy/doc/todo.html +165 -168
  119. snappy/doc/triangulation.html +1583 -1474
  120. snappy/doc/tutorial.html +158 -161
  121. snappy/doc/verify.html +329 -275
  122. snappy/doc/verify_internals.html +1234 -1691
  123. snappy/drilling/__init__.py +153 -235
  124. snappy/drilling/barycentric.py +103 -0
  125. snappy/drilling/constants.py +0 -2
  126. snappy/drilling/crush.py +56 -130
  127. snappy/drilling/cusps.py +12 -6
  128. snappy/drilling/debug.py +2 -1
  129. snappy/drilling/exceptions.py +7 -40
  130. snappy/drilling/moves.py +302 -243
  131. snappy/drilling/perturb.py +63 -37
  132. snappy/drilling/shorten.py +36 -0
  133. snappy/drilling/subdivide.py +0 -5
  134. snappy/drilling/test.py +23 -0
  135. snappy/drilling/test_cases.py +126 -0
  136. snappy/drilling/tracing.py +9 -37
  137. snappy/exceptions.py +18 -5
  138. snappy/exterior_to_link/barycentric_geometry.py +2 -4
  139. snappy/exterior_to_link/main.py +8 -7
  140. snappy/exterior_to_link/mcomplex_with_link.py +2 -2
  141. snappy/exterior_to_link/rational_linear_algebra.py +1 -1
  142. snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
  143. snappy/exterior_to_link/test.py +21 -33
  144. snappy/geometric_structure/__init__.py +212 -0
  145. snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
  146. snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
  147. snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
  148. snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
  149. snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
  150. snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
  151. snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
  152. snappy/geometric_structure/geodesic/__init__.py +0 -0
  153. snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
  154. snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
  155. snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
  156. snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
  157. snappy/geometric_structure/geodesic/constants.py +6 -0
  158. snappy/geometric_structure/geodesic/exceptions.py +22 -0
  159. snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
  160. snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
  161. snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
  162. snappy/geometric_structure/geodesic/line.py +30 -0
  163. snappy/geometric_structure/geodesic/multiplicity.py +127 -0
  164. snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
  165. snappy/geometric_structure/test.py +22 -0
  166. snappy/gui.py +23 -13
  167. snappy/horoviewer.py +7 -7
  168. snappy/hyperboloid/__init__.py +96 -31
  169. snappy/hyperboloid/distances.py +245 -0
  170. snappy/hyperboloid/horoball.py +19 -0
  171. snappy/hyperboloid/line.py +35 -0
  172. snappy/hyperboloid/point.py +9 -0
  173. snappy/hyperboloid/triangle.py +29 -0
  174. snappy/isometry_signature.py +382 -0
  175. snappy/len_spec/__init__.py +596 -0
  176. snappy/len_spec/geodesic_info.py +110 -0
  177. snappy/len_spec/geodesic_key_info_dict.py +117 -0
  178. snappy/len_spec/geodesic_piece.py +143 -0
  179. snappy/len_spec/geometric_structure.py +182 -0
  180. snappy/len_spec/geometry.py +80 -0
  181. snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
  182. snappy/len_spec/spine.py +206 -0
  183. snappy/len_spec/test.py +24 -0
  184. snappy/len_spec/test_cases.py +69 -0
  185. snappy/len_spec/tile.py +275 -0
  186. snappy/len_spec/word.py +86 -0
  187. snappy/math_basics.py +39 -13
  188. snappy/matrix.py +52 -9
  189. snappy/number.py +12 -6
  190. snappy/numeric_output_checker.py +2 -3
  191. snappy/pari.py +8 -4
  192. snappy/phone_home.py +2 -1
  193. snappy/polyviewer.py +8 -8
  194. snappy/ptolemy/__init__.py +1 -1
  195. snappy/ptolemy/component.py +2 -2
  196. snappy/ptolemy/coordinates.py +25 -25
  197. snappy/ptolemy/findLoops.py +9 -9
  198. snappy/ptolemy/manifoldMethods.py +27 -29
  199. snappy/ptolemy/polynomial.py +50 -57
  200. snappy/ptolemy/processFileBase.py +60 -0
  201. snappy/ptolemy/ptolemyVariety.py +109 -41
  202. snappy/ptolemy/reginaWrapper.py +4 -4
  203. snappy/ptolemy/rur.py +1 -1
  204. snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
  205. snappy/ptolemy/test.py +99 -54
  206. snappy/ptolemy/utilities.py +1 -1
  207. snappy/raytracing/__init__.py +64 -0
  208. snappy/raytracing/additional_horospheres.py +64 -0
  209. snappy/raytracing/additional_len_spec_choices.py +63 -0
  210. snappy/raytracing/cohomology_fractal.py +0 -3
  211. snappy/raytracing/eyeball.py +123 -0
  212. snappy/raytracing/finite_raytracing_data.py +17 -17
  213. snappy/raytracing/finite_viewer.py +15 -15
  214. snappy/raytracing/geodesic_tube_info.py +93 -63
  215. snappy/raytracing/geodesics.py +94 -64
  216. snappy/raytracing/geodesics_window.py +56 -34
  217. snappy/raytracing/gui_utilities.py +21 -6
  218. snappy/raytracing/hyperboloid_navigation.py +29 -4
  219. snappy/raytracing/hyperboloid_utilities.py +73 -73
  220. snappy/raytracing/ideal_raytracing_data.py +121 -91
  221. snappy/raytracing/inside_viewer.py +199 -66
  222. snappy/raytracing/pack.py +22 -0
  223. snappy/raytracing/raytracing_data.py +37 -25
  224. snappy/raytracing/raytracing_view.py +70 -65
  225. snappy/raytracing/shaders/Eye.png +0 -0
  226. snappy/raytracing/shaders/NonGeometric.png +0 -0
  227. snappy/raytracing/shaders/__init__.py +39 -3
  228. snappy/raytracing/shaders/fragment.glsl +451 -133
  229. snappy/raytracing/test.py +29 -0
  230. snappy/raytracing/tooltip.py +146 -0
  231. snappy/raytracing/upper_halfspace_utilities.py +42 -9
  232. snappy/sage_helper.py +67 -134
  233. snappy/settings.py +90 -77
  234. snappy/shell.py +2 -0
  235. snappy/snap/character_varieties.py +2 -2
  236. snappy/snap/find_field.py +4 -3
  237. snappy/snap/fundamental_polyhedron.py +2 -2
  238. snappy/snap/kernel_structures.py +5 -1
  239. snappy/snap/nsagetools.py +9 -8
  240. snappy/snap/peripheral/dual_cellulation.py +4 -3
  241. snappy/snap/peripheral/peripheral.py +2 -2
  242. snappy/snap/peripheral/surface.py +5 -5
  243. snappy/snap/peripheral/test.py +1 -1
  244. snappy/snap/polished_reps.py +8 -8
  245. snappy/snap/slice_obs_HKL.py +16 -14
  246. snappy/snap/t3mlite/arrow.py +3 -3
  247. snappy/snap/t3mlite/edge.py +3 -3
  248. snappy/snap/t3mlite/homology.py +2 -2
  249. snappy/snap/t3mlite/mcomplex.py +3 -3
  250. snappy/snap/t3mlite/simplex.py +12 -0
  251. snappy/snap/t3mlite/spun.py +18 -17
  252. snappy/snap/t3mlite/test_vs_regina.py +4 -4
  253. snappy/snap/test.py +37 -53
  254. snappy/snap/utilities.py +4 -5
  255. snappy/test.py +121 -138
  256. snappy/test_cases.py +263 -0
  257. snappy/testing.py +131 -0
  258. snappy/tiling/__init__.py +2 -0
  259. snappy/tiling/canonical_key_dict.py +59 -0
  260. snappy/tiling/dict_based_set.py +79 -0
  261. snappy/tiling/floor.py +49 -0
  262. snappy/tiling/hyperboloid_dict.py +54 -0
  263. snappy/tiling/iter_utils.py +78 -0
  264. snappy/tiling/lifted_tetrahedron.py +22 -0
  265. snappy/tiling/lifted_tetrahedron_set.py +54 -0
  266. snappy/tiling/real_hash_dict.py +164 -0
  267. snappy/tiling/test.py +23 -0
  268. snappy/tiling/tile.py +215 -0
  269. snappy/tiling/triangle.py +33 -0
  270. snappy/tkterminal.py +116 -86
  271. snappy/twister/main.py +1 -7
  272. snappy/twister/twister_core.cp38-win_amd64.pyd +0 -0
  273. snappy/upper_halfspace/__init__.py +78 -17
  274. snappy/verify/__init__.py +3 -7
  275. snappy/verify/{verifyCanonical.py → canonical.py} +78 -70
  276. snappy/verify/complex_volume/adjust_torsion.py +1 -2
  277. snappy/verify/complex_volume/closed.py +13 -13
  278. snappy/verify/complex_volume/cusped.py +6 -6
  279. snappy/verify/complex_volume/extended_bloch.py +5 -8
  280. snappy/verify/{cuspTranslations.py → cusp_translations.py} +1 -1
  281. snappy/verify/edge_equations.py +80 -0
  282. snappy/verify/exceptions.py +0 -55
  283. snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +3 -3
  284. snappy/verify/interval_newton_shapes_engine.py +7 -5
  285. snappy/verify/interval_tree.py +5 -5
  286. snappy/verify/krawczyk_shapes_engine.py +17 -18
  287. snappy/verify/maximal_cusp_area_matrix/__init__.py +7 -74
  288. snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +3 -4
  289. snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +1 -1
  290. snappy/verify/{realAlgebra.py → real_algebra.py} +1 -1
  291. snappy/verify/shapes.py +5 -3
  292. snappy/verify/short_slopes.py +39 -41
  293. snappy/verify/{squareExtensions.py → square_extensions.py} +14 -11
  294. snappy/verify/test.py +57 -60
  295. snappy/verify/upper_halfspace/extended_matrix.py +1 -1
  296. snappy/verify/upper_halfspace/finite_point.py +3 -4
  297. snappy/verify/upper_halfspace/ideal_point.py +9 -9
  298. snappy/verify/volume.py +2 -2
  299. snappy/version.py +2 -2
  300. {snappy-3.1.dist-info → snappy-3.2.dist-info}/METADATA +14 -10
  301. snappy-3.2.dist-info/RECORD +503 -0
  302. {snappy-3.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
  303. {snappy-3.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
  304. snappy/__pycache__/__init__.cpython-38.pyc +0 -0
  305. snappy/__pycache__/browser.cpython-38.pyc +0 -0
  306. snappy/__pycache__/cache.cpython-38.pyc +0 -0
  307. snappy/__pycache__/database.cpython-38.pyc +0 -0
  308. snappy/__pycache__/db_utilities.cpython-38.pyc +0 -0
  309. snappy/__pycache__/decorated_isosig.cpython-38.pyc +0 -0
  310. snappy/__pycache__/exceptions.cpython-38.pyc +0 -0
  311. snappy/__pycache__/export_stl.cpython-38.pyc +0 -0
  312. snappy/__pycache__/filedialog.cpython-38.pyc +0 -0
  313. snappy/__pycache__/gui.cpython-38.pyc +0 -0
  314. snappy/__pycache__/horoviewer.cpython-38.pyc +0 -0
  315. snappy/__pycache__/math_basics.cpython-38.pyc +0 -0
  316. snappy/__pycache__/matrix.cpython-38.pyc +0 -0
  317. snappy/__pycache__/number.cpython-38.pyc +0 -0
  318. snappy/__pycache__/numeric_output_checker.cpython-38.pyc +0 -0
  319. snappy/__pycache__/pari.cpython-38.pyc +0 -0
  320. snappy/__pycache__/polyviewer.cpython-38.pyc +0 -0
  321. snappy/__pycache__/sage_helper.cpython-38.pyc +0 -0
  322. snappy/__pycache__/version.cpython-38.pyc +0 -0
  323. snappy/doc/_sources/verify_canon.rst.txt +0 -90
  324. snappy/doc/_static/jquery-3.6.0.js +0 -10881
  325. snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
  326. snappy/doc/_static/js/html5shiv.min.js +0 -4
  327. snappy/doc/_static/underscore-1.13.1.js +0 -2042
  328. snappy/doc/_static/underscore.js +0 -6
  329. snappy/doc/verify_canon.html +0 -304
  330. snappy/drilling/__pycache__/__init__.cpython-38.pyc +0 -0
  331. snappy/drilling/__pycache__/constants.cpython-38.pyc +0 -0
  332. snappy/drilling/__pycache__/crush.cpython-38.pyc +0 -0
  333. snappy/drilling/__pycache__/cusps.cpython-38.pyc +0 -0
  334. snappy/drilling/__pycache__/debug.cpython-38.pyc +0 -0
  335. snappy/drilling/__pycache__/epsilons.cpython-38.pyc +0 -0
  336. snappy/drilling/__pycache__/exceptions.cpython-38.pyc +0 -0
  337. snappy/drilling/__pycache__/fixed_points.cpython-38.pyc +0 -0
  338. snappy/drilling/__pycache__/geodesic_info.cpython-38.pyc +0 -0
  339. snappy/drilling/__pycache__/geodesic_tube.cpython-38.pyc +0 -0
  340. snappy/drilling/__pycache__/geometric_structure.cpython-38.pyc +0 -0
  341. snappy/drilling/__pycache__/line.cpython-38.pyc +0 -0
  342. snappy/drilling/__pycache__/moves.cpython-38.pyc +0 -0
  343. snappy/drilling/__pycache__/peripheral_curves.cpython-38.pyc +0 -0
  344. snappy/drilling/__pycache__/perturb.cpython-38.pyc +0 -0
  345. snappy/drilling/__pycache__/quotient_space.cpython-38.pyc +0 -0
  346. snappy/drilling/__pycache__/spatial_dict.cpython-38.pyc +0 -0
  347. snappy/drilling/__pycache__/subdivide.cpython-38.pyc +0 -0
  348. snappy/drilling/__pycache__/tracing.cpython-38.pyc +0 -0
  349. snappy/drilling/geodesic_tube.py +0 -441
  350. snappy/drilling/geometric_structure.py +0 -366
  351. snappy/drilling/line.py +0 -122
  352. snappy/drilling/quotient_space.py +0 -94
  353. snappy/drilling/spatial_dict.py +0 -128
  354. snappy/exterior_to_link/__pycache__/__init__.cpython-38.pyc +0 -0
  355. snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-38.pyc +0 -0
  356. snappy/exterior_to_link/__pycache__/exceptions.cpython-38.pyc +0 -0
  357. snappy/exterior_to_link/__pycache__/hyp_utils.cpython-38.pyc +0 -0
  358. snappy/exterior_to_link/__pycache__/link_projection.cpython-38.pyc +0 -0
  359. snappy/exterior_to_link/__pycache__/main.cpython-38.pyc +0 -0
  360. snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-38.pyc +0 -0
  361. snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-38.pyc +0 -0
  362. snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-38.pyc +0 -0
  363. snappy/exterior_to_link/__pycache__/pl_utils.cpython-38.pyc +0 -0
  364. snappy/exterior_to_link/__pycache__/put_in_S3.cpython-38.pyc +0 -0
  365. snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-38.pyc +0 -0
  366. snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-38.pyc +0 -0
  367. snappy/exterior_to_link/__pycache__/stored_moves.cpython-38.pyc +0 -0
  368. snappy/hyperboloid/__pycache__/__init__.cpython-38.pyc +0 -0
  369. snappy/manifolds/__pycache__/__init__.cpython-38.pyc +0 -0
  370. snappy/ptolemy/__pycache__/__init__.cpython-38.pyc +0 -0
  371. snappy/ptolemy/__pycache__/component.cpython-38.pyc +0 -0
  372. snappy/ptolemy/__pycache__/coordinates.cpython-38.pyc +0 -0
  373. snappy/ptolemy/__pycache__/fieldExtensions.cpython-38.pyc +0 -0
  374. snappy/ptolemy/__pycache__/findLoops.cpython-38.pyc +0 -0
  375. snappy/ptolemy/__pycache__/homology.cpython-38.pyc +0 -0
  376. snappy/ptolemy/__pycache__/manifoldMethods.cpython-38.pyc +0 -0
  377. snappy/ptolemy/__pycache__/matrix.cpython-38.pyc +0 -0
  378. snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-38.pyc +0 -0
  379. snappy/ptolemy/__pycache__/polynomial.cpython-38.pyc +0 -0
  380. snappy/ptolemy/__pycache__/processComponents.cpython-38.pyc +0 -0
  381. snappy/ptolemy/__pycache__/processFileBase.cpython-38.pyc +0 -0
  382. snappy/ptolemy/__pycache__/processFileDispatch.cpython-38.pyc +0 -0
  383. snappy/ptolemy/__pycache__/processMagmaFile.cpython-38.pyc +0 -0
  384. snappy/ptolemy/__pycache__/processRurFile.cpython-38.pyc +0 -0
  385. snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-38.pyc +0 -0
  386. snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-38.pyc +0 -0
  387. snappy/ptolemy/__pycache__/ptolemyVariety.cpython-38.pyc +0 -0
  388. snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-38.pyc +0 -0
  389. snappy/ptolemy/__pycache__/rur.cpython-38.pyc +0 -0
  390. snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-38.pyc +0 -0
  391. snappy/ptolemy/__pycache__/utilities.cpython-38.pyc +0 -0
  392. snappy/snap/__pycache__/__init__.cpython-38.pyc +0 -0
  393. snappy/snap/__pycache__/character_varieties.cpython-38.pyc +0 -0
  394. snappy/snap/__pycache__/fundamental_polyhedron.cpython-38.pyc +0 -0
  395. snappy/snap/__pycache__/interval_reps.cpython-38.pyc +0 -0
  396. snappy/snap/__pycache__/kernel_structures.cpython-38.pyc +0 -0
  397. snappy/snap/__pycache__/mcomplex_base.cpython-38.pyc +0 -0
  398. snappy/snap/__pycache__/nsagetools.cpython-38.pyc +0 -0
  399. snappy/snap/__pycache__/polished_reps.cpython-38.pyc +0 -0
  400. snappy/snap/__pycache__/shapes.cpython-38.pyc +0 -0
  401. snappy/snap/__pycache__/slice_obs_HKL.cpython-38.pyc +0 -0
  402. snappy/snap/__pycache__/utilities.cpython-38.pyc +0 -0
  403. snappy/snap/peripheral/__pycache__/__init__.cpython-38.pyc +0 -0
  404. snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-38.pyc +0 -0
  405. snappy/snap/peripheral/__pycache__/link.cpython-38.pyc +0 -0
  406. snappy/snap/peripheral/__pycache__/peripheral.cpython-38.pyc +0 -0
  407. snappy/snap/peripheral/__pycache__/surface.cpython-38.pyc +0 -0
  408. snappy/snap/t3mlite/__pycache__/__init__.cpython-38.pyc +0 -0
  409. snappy/snap/t3mlite/__pycache__/arrow.cpython-38.pyc +0 -0
  410. snappy/snap/t3mlite/__pycache__/corner.cpython-38.pyc +0 -0
  411. snappy/snap/t3mlite/__pycache__/edge.cpython-38.pyc +0 -0
  412. snappy/snap/t3mlite/__pycache__/face.cpython-38.pyc +0 -0
  413. snappy/snap/t3mlite/__pycache__/files.cpython-38.pyc +0 -0
  414. snappy/snap/t3mlite/__pycache__/homology.cpython-38.pyc +0 -0
  415. snappy/snap/t3mlite/__pycache__/linalg.cpython-38.pyc +0 -0
  416. snappy/snap/t3mlite/__pycache__/mcomplex.cpython-38.pyc +0 -0
  417. snappy/snap/t3mlite/__pycache__/perm4.cpython-38.pyc +0 -0
  418. snappy/snap/t3mlite/__pycache__/simplex.cpython-38.pyc +0 -0
  419. snappy/snap/t3mlite/__pycache__/spun.cpython-38.pyc +0 -0
  420. snappy/snap/t3mlite/__pycache__/surface.cpython-38.pyc +0 -0
  421. snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-38.pyc +0 -0
  422. snappy/snap/t3mlite/__pycache__/vertex.cpython-38.pyc +0 -0
  423. snappy/togl/__init__.py +0 -3
  424. snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
  425. snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
  426. snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  427. snappy/togl/darwin-tk8.7/Togl2.1/LICENSE +0 -28
  428. snappy/togl/darwin-tk8.7/Togl2.1/libTogl2.1.dylib +0 -0
  429. snappy/togl/darwin-tk8.7/Togl2.1/pkgIndex.tcl +0 -5
  430. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  431. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
  432. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  433. snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
  434. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
  435. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
  436. snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  437. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  438. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
  439. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
  440. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  441. snappy/twister/__pycache__/__init__.cpython-38.pyc +0 -0
  442. snappy/twister/__pycache__/main.cpython-38.pyc +0 -0
  443. snappy/upper_halfspace/__pycache__/__init__.cpython-38.pyc +0 -0
  444. snappy/upper_halfspace/__pycache__/ideal_point.cpython-38.pyc +0 -0
  445. snappy/verify/__pycache__/__init__.cpython-38.pyc +0 -0
  446. snappy/verify/__pycache__/cuspCrossSection.cpython-38.pyc +0 -0
  447. snappy/verify/__pycache__/cuspTranslations.cpython-38.pyc +0 -0
  448. snappy/verify/__pycache__/cusp_areas.cpython-38.pyc +0 -0
  449. snappy/verify/__pycache__/cusp_shapes.cpython-38.pyc +0 -0
  450. snappy/verify/__pycache__/exceptions.cpython-38.pyc +0 -0
  451. snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-38.pyc +0 -0
  452. snappy/verify/__pycache__/interval_tree.cpython-38.pyc +0 -0
  453. snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-38.pyc +0 -0
  454. snappy/verify/__pycache__/realAlgebra.cpython-38.pyc +0 -0
  455. snappy/verify/__pycache__/shapes.cpython-38.pyc +0 -0
  456. snappy/verify/__pycache__/short_slopes.cpython-38.pyc +0 -0
  457. snappy/verify/__pycache__/squareExtensions.cpython-38.pyc +0 -0
  458. snappy/verify/__pycache__/verifyCanonical.cpython-38.pyc +0 -0
  459. snappy/verify/__pycache__/verifyHyperbolicity.cpython-38.pyc +0 -0
  460. snappy/verify/__pycache__/volume.cpython-38.pyc +0 -0
  461. snappy/verify/complex_volume/__pycache__/__init__.cpython-38.pyc +0 -0
  462. snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-38.pyc +0 -0
  463. snappy/verify/complex_volume/__pycache__/closed.cpython-38.pyc +0 -0
  464. snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-38.pyc +0 -0
  465. snappy/verify/complex_volume/__pycache__/cusped.cpython-38.pyc +0 -0
  466. snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-38.pyc +0 -0
  467. snappy/verify/cuspCrossSection.py +0 -1422
  468. snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-38.pyc +0 -0
  469. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-38.pyc +0 -0
  470. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-38.pyc +0 -0
  471. snappy/verify/upper_halfspace/__pycache__/__init__.cpython-38.pyc +0 -0
  472. snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-38.pyc +0 -0
  473. snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-38.pyc +0 -0
  474. snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-38.pyc +0 -0
  475. snappy-3.1.dist-info/RECORD +0 -575
  476. {snappy-3.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
@@ -1,1692 +1,1235 @@
1
- <!DOCTYPE html>
2
- <html class="writer-html5" lang="en" >
3
- <head>
4
- <meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
5
-
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Internals of verified computations &mdash; SnapPy 3.1 documentation</title>
8
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
9
- <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
10
- <link rel="stylesheet" href="_static/snappy_sphinx_rtd_theme.css" type="text/css" />
11
- <link rel="shortcut icon" href="_static/SnapPy.ico"/>
12
- <!--[if lt IE 9]>
13
- <script src="_static/js/html5shiv.min.js"></script>
14
- <![endif]-->
15
-
16
- <script src="_static/jquery.js"></script>
17
- <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
18
- <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
19
- <script src="_static/doctools.js"></script>
20
- <script src="_static/sphinx_highlight.js"></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="Canonical retriangulation and isometry signature" href="verify_canon.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 class="version">
41
- 3.1
42
- </div>
43
- <div role="search">
44
- <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
45
- <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
46
- <input type="hidden" name="check_keywords" value="yes" />
47
- <input type="hidden" name="area" value="default" />
48
- </form>
49
- </div>
50
- </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
51
- <ul class="current">
52
- <li class="toctree-l1"><a class="reference internal" href="installing.html">Installing SnapPy</a></li>
53
- <li class="toctree-l1"><a class="reference internal" href="screenshots.html">Screenshots: SnapPy in action</a></li>
54
- <li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
55
- <li class="toctree-l1"><a class="reference internal" href="snappy.html">The snappy module and its classes</a></li>
56
- <li class="toctree-l1"><a class="reference internal" href="plink.html">Using SnapPy’s link editor</a></li>
57
- <li class="toctree-l1"><a class="reference internal" href="spherogram.html">Links: planar diagrams and invariants</a></li>
58
- <li class="toctree-l1"><a class="reference internal" href="snap.html">Number theory of hyperbolic 3-manifolds</a></li>
59
- <li class="toctree-l1 current"><a class="reference internal" href="verify.html">Verified computations</a><ul class="current">
60
- <li class="toctree-l2"><a class="reference internal" href="verify.html#overview">Overview</a></li>
61
- <li class="toctree-l2 current"><a class="reference internal" href="verify.html#verified-computation-topics">Verified computation topics</a><ul class="current">
62
- <li class="toctree-l3"><a class="reference internal" href="verify_canon.html">Canonical retriangulation and isometry signature</a></li>
63
- <li class="toctree-l3 current"><a class="current reference internal" href="#">Internals of verified computations</a><ul>
64
- <li class="toctree-l4"><a class="reference internal" href="#naming">Naming</a></li>
65
- <li class="toctree-l4"><a class="reference internal" href="#generating-certified-shape-intervals">Generating certified shape intervals</a><ul>
66
- <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>
67
- <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>
68
- <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>
69
- </ul>
70
- </li>
71
- <li class="toctree-l4"><a class="reference internal" href="#verification-of-hyperbolicity">Verification of hyperbolicity</a><ul>
72
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.verifyHyperbolicity.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>
73
- </ul>
74
- </li>
75
- <li class="toctree-l4"><a class="reference internal" href="#cusp-cross-sections">Cusp cross sections</a><ul>
76
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.RealCuspCrossSection"><code class="docutils literal notranslate"><span class="pre">RealCuspCrossSection</span></code></a></li>
77
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.ComplexCuspCrossSection"><code class="docutils literal notranslate"><span class="pre">ComplexCuspCrossSection</span></code></a></li>
78
- </ul>
79
- </li>
80
- <li class="toctree-l4"><a class="reference internal" href="#verified-canonical-cell-decompositions">Verified canonical cell decompositions</a><ul>
81
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.verifyCanonical.interval_checked_canonical_triangulation"><code class="docutils literal notranslate"><span class="pre">interval_checked_canonical_triangulation()</span></code></a></li>
82
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.verifyCanonical.exactly_checked_canonical_retriangulation"><code class="docutils literal notranslate"><span class="pre">exactly_checked_canonical_retriangulation()</span></code></a></li>
83
- </ul>
84
- </li>
85
- <li class="toctree-l4"><a class="reference internal" href="#module-snappy.verify.squareExtensions">Exact computations for cusp cross sections</a><ul>
86
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.squareExtensions.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>
87
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.squareExtensions.SqrtLinCombination"><code class="docutils literal notranslate"><span class="pre">SqrtLinCombination</span></code></a></li>
88
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.squareExtensions.ComplexSqrtLinCombination"><code class="docutils literal notranslate"><span class="pre">ComplexSqrtLinCombination</span></code></a></li>
89
- </ul>
90
- </li>
91
- <li class="toctree-l4"><a class="reference internal" href="#module-snappy.verify.exceptions">Exceptions</a><ul>
92
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.ConsistencyWithSnapPeaNumericalVerifyError"><code class="docutils literal notranslate"><span class="pre">ConsistencyWithSnapPeaNumericalVerifyError</span></code></a></li>
93
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.ConsistencyWithSnapPeaType"><code class="docutils literal notranslate"><span class="pre">ConsistencyWithSnapPeaType</span></code></a></li>
94
- <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>
95
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.CuspDevelopmentExactVerifyError"><code class="docutils literal notranslate"><span class="pre">CuspDevelopmentExactVerifyError</span></code></a></li>
96
- <li class="toctree-l5"><a class="reference internal" href="#snappy.verify.exceptions.CuspDevelopmentType"><code class="docutils literal notranslate"><span class="pre">CuspDevelopmentType</span></code></a></li>
97
- <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>
98
- <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>
99
- <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>
100
- <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>
101
- <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>
102
- <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>
103
- <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>
104
- <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>
105
- <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>
106
- <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>
107
- <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>
108
- <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>
109
- <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>
110
- <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>
111
- <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>
112
- <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>
113
- <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>
114
- <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>
115
- <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>
116
- </ul>
117
- </li>
118
- </ul>
119
- </li>
120
- </ul>
121
- </li>
122
- </ul>
123
- </li>
124
- <li class="toctree-l1"><a class="reference internal" href="other.html">Other components</a></li>
125
- <li class="toctree-l1"><a class="reference internal" href="news.html">News</a></li>
126
- <li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
127
- <li class="toctree-l1"><a class="reference internal" href="bugs.html">Reporting bugs and other problems</a></li>
128
- <li class="toctree-l1"><a class="reference internal" href="todo.html">To Do List</a></li>
129
- <li class="toctree-l1"><a class="reference internal" href="development.html">Development Basics</a></li>
130
- </ul>
131
-
132
- </div>
133
- </div>
134
- </nav>
135
-
136
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
137
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
138
- <a href="index.html">SnapPy</a>
139
- </nav>
140
-
141
- <div class="wy-nav-content">
142
- <div class="rst-content">
143
- <div role="navigation" aria-label="Page navigation">
144
- <ul class="wy-breadcrumbs">
145
- <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
146
- <li class="breadcrumb-item"><a href="verify.html">Verified computations</a></li>
147
- <li class="breadcrumb-item active">Internals of verified computations</li>
148
- <li class="wy-breadcrumbs-aside">
149
- </li>
150
- </ul>
151
- <hr/>
152
- </div>
153
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
154
- <div itemprop="articleBody">
155
-
156
- <section id="internals-of-verified-computations">
157
- <h1>Internals of verified computations<a class="headerlink" href="#internals-of-verified-computations" title="Permalink to this heading"></a></h1>
158
- <section id="naming">
159
- <h2>Naming<a class="headerlink" href="#naming" title="Permalink to this heading"></a></h2>
160
- <p>The names of methods containing <code class="docutils literal notranslate"><span class="pre">check</span></code> will raise an exception if
161
- the desired property cannot be certified. There are different types of
162
- Exceptions to indicate how the certification failed. This type can be
163
- used by other methods to perform some action such as changing the
164
- triangulation or increasing precision or to give up.</p>
165
- <p>The user-facing methods have names starting with <code class="docutils literal notranslate"><span class="pre">verify</span></code> or
166
- <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
167
- <code class="docutils literal notranslate"><span class="pre">None</span></code> in such a case.</p>
168
- </section>
169
- <section id="generating-certified-shape-intervals">
170
- <h2>Generating certified shape intervals<a class="headerlink" href="#generating-certified-shape-intervals" title="Permalink to this heading"></a></h2>
171
- <p>The recommended way to obtain certified intervals for the shapes is via
172
- <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
173
- earlier</span></a>. Here we document the <code class="docutils literal notranslate"><span class="pre">KrawczykShapesEngine</span></code> and
174
- <code class="docutils literal notranslate"><span class="pre">IntervalNewtonShapesEngine</span></code> which is implemented internally to
175
- generate the intervals. It is of interest for those users who want to
176
- understand the underlying interval math and experiment with the Newton
177
- interval method or the Krawczyk test. <code class="docutils literal notranslate"><span class="pre">CertifiedShapesEngine</span></code> is an
178
- alias of either <code class="docutils literal notranslate"><span class="pre">KrawczykShapesEngine</span></code> or
179
- <code class="docutils literal notranslate"><span class="pre">IntervalNewtonShapesEngine</span></code> to determine the default method used by
180
- verify.</p>
181
- <span class="target" id="module-snappy.verify"></span><dl class="py attribute">
182
- <dt class="sig sig-object py" id="snappy.verify.CertifiedShapesEngine">
183
- <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="Permalink to this definition"></a></dt>
184
- <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>
185
- </dd></dl>
186
-
187
- <dl class="py class">
188
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine">
189
- <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="Permalink to this definition"></a></dt>
190
- <dd><p>An engine that is initialized with an approximated candidate solution to
191
- the rectangular gluing equations and produces intervals certified to
192
- contain a true solution. After the engine is successfully run, the
193
- resulting intervals are stored in certified_shapes which is a vector of
194
- elements in a Sage’s ComplexIntervalField.</p>
195
- <p>A simple example to obtain certified shape intervals that uses
196
- KrawczykShapesEngine or IntervalNewtonShapesEngine under the hood:</p>
197
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
198
- sage: M = Manifold(&quot;m015&quot;)
199
- sage: M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80, intervals = True) # doctest: +NUMERIC15 +NORMALIZE_WHITESPACE
200
- [0.6623589786223730129805? + 0.5622795120623012438992?*I,
201
- 0.6623589786223730129805? + 0.5622795120623012438992?*I,
202
- 0.6623589786223730129805? + 0.5622795120623012438992?*I]
203
- </pre></div>
204
- </div>
205
- <p>Its objective is thus the same as HIKMOT and it is certainly HIKMOT
206
- inspired. However, it conceptually differs in that:</p>
207
- <ol class="arabic">
208
- <li><p>It uses the Newton interval method instead of the Krawczyk
209
- test (we implement Gaussian elimination in interval arithmetic to
210
- compute the inverse of an interval matrix having interval arithmetic
211
- semantics, see mat_solve).</p></li>
212
- <li><p>It uses complex numbers in it’s Newton interval method.
213
- We simply use Sage’s complex interval type avoiding the need of
214
- converting n x n complex matrices into 2n x 2n real matrices as
215
- described Section 3.4 of the HIKMOT paper.</p></li>
216
- <li><p>We avoid automatic differentiation. We pick an independent set of
217
- equations of the following form and try to solve them:</p>
218
- <blockquote>
219
- <div><p>log(LHS) = 0</p>
220
- </div></blockquote>
221
- <p>where</p>
222
- <blockquote>
223
- <div><p>LHS = c * z0^a0 * (1-z0)^b0 * z1^a1 * (1-z1)^b1 * …</p>
224
- </div></blockquote>
225
- <p>with a, b and c’s as returned by Manifold.gluing_equations(‘rect’).</p>
226
- <p>The derivative of log (LHS) with respect to zj is simply given by</p>
227
- <blockquote>
228
- <div><p>aj/zj - bj/(1-zj)</p>
229
- </div></blockquote>
230
- <p>and thus no need for automatic differentiation.</p>
231
- </li>
232
- </ol>
233
- <p>In contrast to HIKMOT, we use and return Sage’s native implementation of
234
- (complex) interval arithmetic here, which allows for increased interoperability.
235
- Another advantage is that Sage supports arbitrary precision. Unfortunately,
236
- performance suffers and this implementation is 5-10 times slower than HIKMOT.</p>
237
- <p>Here is an example how to explicitly invoke the IntervalNewtonShapesEngine:</p>
238
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80)
239
- sage: C = IntervalNewtonShapesEngine(M, shapes, bits_prec = 80)
240
- sage: C.expand_until_certified()
241
- True
242
- sage: C.certified_shapes # doctest: +ELLIPSIS
243
- (0.662358978622373012981? + 0.562279512062301243...?*I, 0.66235897862237301298...? + 0.562279512062301243...?*I, 0.66235897862237301298...? + 0.562279512062301243...?*I)
244
- </pre></div>
245
- </div>
246
- <dl class="py method">
247
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.certified_newton_iteration">
248
- <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="Permalink to this definition"></a></dt>
249
- <dd><p>Given shape intervals z, performs a Newton interval iteration N(z)
250
- as described in newton_iteration. Returns a pair (boolean, N(z)) where
251
- the boolean is True if N(z) is contained in z.</p>
252
- <p>If the boolean is True, it is certified that N(z) contains a true
253
- solution, e.g., a point for which f is truly zero.</p>
254
- <p>See newton_iteration for the other parameters.</p>
255
- <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>
256
- <p>Some examples:</p>
257
- <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>
258
- <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>
259
- <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>
260
- <span class="o">...</span> <span class="n">bits_prec</span> <span class="o">=</span> <span class="mi">80</span><span class="p">)</span>
261
- </pre></div>
262
- </div>
263
- <p>Intervals containing the true solution:</p>
264
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: good_shapes = vector([
265
- ... C.CIF(C.RIF(0.78055, 0.78056), C.RIF(0.91447, 0.91448)),
266
- ... C.CIF(C.RIF(0.78055, 0.78056), C.RIF(0.91447, 0.91448)),
267
- ... C.CIF(C.RIF(0.46002, 0.46003), C.RIF(0.63262, 0.63263))])
268
- sage: is_certified, shapes = IntervalNewtonShapesEngine.certified_newton_iteration(C.equations, good_shapes)
269
-
270
- sage: is_certified
271
- True
272
- sage: shapes # doctest: +ELLIPSIS
273
- (0.78055253? + 0.91447366...?*I, 0.7805525...? + 0.9144736...?*I, 0.4600211...? + 0.632624...?*I)
274
- </pre></div>
275
- </div>
276
- <p>This means that a true solution to the rectangular gluing equations is
277
- contained in both the given intervals (good_shapes) and the returned
278
- intervals (shapes) which are a refinement of the given intervals.</p>
279
- <p>Intervals not containing a true solution:</p>
280
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><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>
281
- <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>
282
- <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>
283
- <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>
284
- <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>
285
- <span class="n">sage</span><span class="p">:</span> <span class="n">is_certified</span>
286
- <span class="kc">False</span>
287
- </pre></div>
288
- </div>
289
- </dd></dl>
290
-
291
- <dl class="py method">
292
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.expand_until_certified">
293
- <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="Permalink to this definition"></a></dt>
294
- <dd><p>Try Newton interval iterations, expanding the shape intervals
295
- until we can certify they contain a true solution.
296
- If succeeded, return True and write certified shapes to
297
- certified_shapes.
298
- Set verbose = True for printing additional information.</p>
299
- </dd></dl>
300
-
301
- <dl class="py method">
302
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.interval_vector_is_contained_in">
303
- <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="Permalink to this definition"></a></dt>
304
- <dd><p>Given two vectors of intervals, return whether the first one
305
- is contained in the second one. Examples:</p>
306
- <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>
307
- <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>
308
- <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>
309
- <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>
310
- <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>
311
- <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>
312
-
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">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
314
- <span class="kc">True</span>
315
- <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>
316
- <span class="kc">False</span>
317
- <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>
318
- <span class="kc">False</span>
319
- <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>
320
- <span class="kc">False</span>
321
- <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>
322
- <span class="kc">False</span>
323
- <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>
324
- <span class="kc">False</span>
325
- </pre></div>
326
- </div>
327
- </dd></dl>
328
-
329
- <dl class="py method">
330
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.interval_vector_mid_points">
331
- <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="Permalink to this definition"></a></dt>
332
- <dd><p>Given a vector of complex intervals, return the midpoints (as 0-length
333
- complex intervals) of them.</p>
334
- </dd></dl>
335
-
336
- <dl class="py method">
337
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.interval_vector_union">
338
- <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="Permalink to this definition"></a></dt>
339
- <dd><p>Given two vectors of intervals, return the vector of their unions,
340
- i.e., the smallest interval containing both intervals.</p>
341
- </dd></dl>
342
-
343
- <dl class="py method">
344
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.log_gluing_LHS_derivatives">
345
- <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="Permalink to this definition"></a></dt>
346
- <dd><p>Compute the Jacobian of the vector-valued function f
347
- described in the above log_gluing_LHSs:</p>
348
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
349
- sage: M = Manifold(&quot;m019&quot;)
350
- sage: equations = M.gluing_equations(&#39;rect&#39;)
351
- sage: RIF = RealIntervalField(80)
352
- sage: CIF = ComplexIntervalField(80)
353
- sage: shape1 = CIF(RIF(0.78055,0.78056), RIF(0.9144, 0.9145))
354
- sage: shape2 = CIF(RIF(0.46002,0.46003), RIF(0.6326, 0.6327))
355
- sage: shapes = [shape1, shape1, shape2]
356
- sage: IntervalNewtonShapesEngine.log_gluing_LHS_derivatives(equations, shapes) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
357
- [ 0.292? - 1.66...?*I 0.292? - 1.66...?*I 0.752? - 1.034...?*I]
358
- [-0.5400? + 0.63...?*I -0.5400? + 0.63...?*I 1.561? + 1.829...?*I]
359
- [ 0.2482? + 1.034...?*I 0.2482? + 1.034...?*I -2.313? - 0.795...?*I]
360
- [ 0.5400? - 0.63...?*I -0.5400? + 0.63...?*I 0]
361
- [...-0.4963? - 2.068?*I 1.0800? - 1.26...?*I 0.752? - 1.034...?*I]
362
- </pre></div>
363
- </div>
364
- </dd></dl>
365
-
366
- <dl class="py method">
367
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.log_gluing_LHSs">
368
- <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="Permalink to this definition"></a></dt>
369
- <dd><p>Given the result of M.gluing_equations(‘rect’) or a
370
- subset of rows of it and shapes, return a vector of
371
- log(LHS) where</p>
372
- <blockquote>
373
- <div><p>LHS = c * z0 ** a0 * (1-z0) ** b0 * z1 ** a1 * …</p>
374
- </div></blockquote>
375
- <p>Let f: C^n -&gt; C^n denote the function which takes
376
- shapes and returns the vector of log(LHS).</p>
377
- <p>The reason we take the logarithm of the rectangular
378
- gluing equations is because the logarithmic derivative
379
- is of a particular nice form:</p>
380
- <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>
381
- <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>
382
- <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>
383
- <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>
384
- <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>
385
- <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>
386
- <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>
387
- <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>
388
- </pre></div>
389
- </div>
390
- <p>An interval solution containing the true solution. The log of each
391
- rectangular equation should be 0 for the true solution, hence the interval
392
- should contain zero:</p>
393
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape2]
394
- sage: LHSs = IntervalNewtonShapesEngine.log_gluing_LHSs(equations, shapes)
395
- sage: LHSs # doctest: +ELLIPSIS
396
- (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)
397
- sage: zero in LHSs[0]
398
- True
399
- </pre></div>
400
- </div>
401
- <p>An interval not containing the true solution:</p>
402
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape1]
403
- sage: LHSs = IntervalNewtonShapesEngine.log_gluing_LHSs(equations, shapes)
404
- sage: LHSs # doctest: +ELLIPSIS
405
- (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)
406
- sage: zero in LHSs[0]
407
- False
408
- </pre></div>
409
- </div>
410
- </dd></dl>
411
-
412
- <dl class="py method">
413
- <dt class="sig sig-object py" id="snappy.verify.IntervalNewtonShapesEngine.newton_iteration">
414
- <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="Permalink to this definition"></a></dt>
415
- <dd><p>Perform a Newton interval method of iteration for
416
- the function f described in log_gluing_LHSs.</p>
417
- <p>Let z denote the shape intervals.
418
- Let z_center be a point close to the center point of the shape
419
- intervals (in the implementation, z_center is an interval of
420
- again, of length zero).</p>
421
- <p>The result returned will be</p>
422
- <blockquote>
423
- <div><p>N(z) = z_center - ((Df)(z))^-1 f(z_center)</p>
424
- </div></blockquote>
425
- <p>The user can overwrite the z_center to be used by providing
426
- point_in_intervals (which have to be 0-length complex intervals).
427
- The user can also give the interval value of f(z_center) by providing
428
- interval_value_at_point to avoid re-evaluation of f(z_center).</p>
429
- <p>A very approximate solution:</p>
430
- <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>
431
- <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>
432
- <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>
433
- </pre></div>
434
- </div>
435
- <p>Get the equations and initialize zero-length intervals from it:</p>
436
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: C = IntervalNewtonShapesEngine(M, shapes, bits_prec = 80)
437
- sage: C.initial_shapes
438
- (0.69999999999999995559107902? + 1*I, 0.69999999999999995559107902? + 1*I, 0.50000000000000000000000000? + 0.50000000000000000000000000?*I)
439
- </pre></div>
440
- </div>
441
- <p>Do several Newton interval operations to get a better solution:</p>
442
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shape_intervals = C.initial_shapes
443
- sage: for i in range(4): # doctest: +ELLIPSIS
444
- ... shape_intervals = IntervalNewtonShapesEngine.newton_iteration(C.equations, shape_intervals)
445
- ... print(shape_intervals)
446
- (0.78674683118381457770...? + 0.9208680745160821379529?*I, 0.786746831183814577703...? + 0.9208680745160821379529?*I, 0.459868058287098030934...? + 0.61940871855835167317...?*I)
447
- (0.78056102517632648594...? + 0.9144962118446750482...?*I, 0.78056102517632648594...? + 0.9144962118446750482...?*I, 0.4599773577869384936554? + 0.63251940718694538695...?*I)
448
- (0.78055253104531610049...? + 0.9144736621585220345231?*I, 0.780552531045316100497...? + 0.9144736621585220345231?*I, 0.460021167103732494700...? + 0.6326241909236695020810...?*I)
449
- (0.78055252785072483256...? + 0.91447366296772644033...?*I, 0.7805525278507248325678? + 0.914473662967726440333...?*I, 0.4600211755737178641204...? + 0.6326241936052562241142...?*I)
450
- </pre></div>
451
- </div>
452
- <p>For comparison:</p>
453
- <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>
454
- <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>
455
- </pre></div>
456
- </div>
457
- <p>Start with a rather big interval, note that the Newton interval method is
458
- stable in the sense that the interval size decreases:</p>
459
- <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))
460
- sage: shape_intervals = C.initial_shapes.apply_map(lambda shape: shape + box)
461
- sage: shape_intervals
462
- (0.700? + 1.000?*I, 0.700? + 1.000?*I, 0.500? + 0.500?*I)
463
- sage: for i in range(7):
464
- ... shape_intervals = IntervalNewtonShapesEngine.newton_iteration(C.equations, shape_intervals)
465
- sage: print(shape_intervals) # doctest: +ELLIPSIS
466
- (0.78055252785072483798...? + 0.91447366296772645593...?*I, 0.7805525278507248379869? + 0.914473662967726455938...?*I, 0.460021175573717872891...? + 0.632624193605256171637...?*I)
467
- </pre></div>
468
- </div>
469
- </dd></dl>
470
-
471
- </dd></dl>
472
-
473
- <dl class="py class">
474
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine">
475
- <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="Permalink to this definition"></a></dt>
476
- <dd><p>An engine that is initialized with an approximated candidate solution to
477
- the rectangular gluing equations and produces intervals certified to
478
- contain a true solution. After the engine is successfully run, the
479
- resulting intervals are stored in certified_shapes which is a vector of
480
- elements in a Sage’s ComplexIntervalField.</p>
481
- <p>A simple example to obtain certified shape intervals that uses the
482
- KrawczykShapesEngine or IntervalNewtonShapesEngine under the hood:</p>
483
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
484
- sage: M = Manifold(&quot;m015&quot;)
485
- sage: M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80, intervals = True) # doctest: +NUMERIC15 +NORMALIZE_WHITESPACE
486
- [0.6623589786223730129805? + 0.5622795120623012438992?*I,
487
- 0.6623589786223730129805? + 0.5622795120623012438992?*I,
488
- 0.6623589786223730129805? + 0.5622795120623012438992?*I]
489
- </pre></div>
490
- </div>
491
- <p>Its objective is thus the same as HIKMOT and it is certainly HIKMOT
492
- inspired. However, it conceptually differs in that:</p>
493
- <ol class="arabic">
494
- <li><p>It uses complex numbers in it’s computations.
495
- We simply use Sage’s complex interval type avoiding the need of
496
- converting n x n complex matrices into 2n x 2n real matrices as
497
- described Section 3.4 of the HIKMOT paper.</p></li>
498
- <li><p>We avoid automatic differentiation. We pick an independent set of
499
- equations of the following form and try to solve them:</p>
500
- <blockquote>
501
- <div><p>log(LHS) = 0</p>
502
- </div></blockquote>
503
- <p>where</p>
504
- <blockquote>
505
- <div><p>LHS = c * z0^a0 * (1-z0)^b0 * z1^a1 * (1-z1)^b1 * …</p>
506
- </div></blockquote>
507
- <p>with a, b and c’s as returned by Manifold.gluing_equations(‘rect’).</p>
508
- <p>The derivative of log (LHS) with respect to zj is simply given by</p>
509
- <blockquote>
510
- <div><p>aj/zj - bj/(1-zj)</p>
511
- </div></blockquote>
512
- <p>and thus no need for automatic differentiation.</p>
513
- </li>
514
- <li><p>For speed-up, the approximate inverse is always computed with
515
- double’s. Some intermediate matrix computations are performed sparsely.</p></li>
516
- </ol>
517
- <p>In contrast to HIKMOT, we use and return Sage’s native implementation of
518
- (complex) interval arithmetic here, which allows for increased interoperability.
519
- Another advantage is that Sage supports arbitrary precision.</p>
520
- <p>Here is an example how to explicitly invoke the KrawczykShapesEngine:</p>
521
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80)
522
- sage: C = KrawczykShapesEngine(M, shapes, bits_prec = 80)
523
- sage: C.expand_until_certified()
524
- True
525
- sage: C.certified_shapes # doctest: +NUMERIC12
526
- (0.6623589786223730129805? + 0.5622795120623012438992?*I, 0.6623589786223730129805? + 0.5622795120623012438992?*I, 0.6623589786223730129805? + 0.5622795120623012438992?*I)
527
- </pre></div>
528
- </div>
529
- <p>And here an example where the initial solution is somewhat off:</p>
530
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;m019&quot;)
531
- sage: shapes = [ 0.78+0.91j, 0.79+0.92j, 0.5 + 0.63j ]
532
- sage: C = KrawczykShapesEngine(M, shapes, bits_prec = 80)
533
- sage: C.expand_until_certified()
534
- True
535
- sage: C.certified_shapes
536
- (0.78? + 0.92?*I, 0.78? + 0.92?*I, 0.46? + 0.64?*I)
537
- </pre></div>
538
- </div>
539
- <dl class="py method">
540
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.expand_until_certified">
541
- <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="Permalink to this definition"></a></dt>
542
- <dd><p>Try Krawczyk iterations (i.e., expanding the shape intervals [z]
543
- by the Krawczyk interval K(z0, [z], f)) until we can certify they
544
- contain a true solution.</p>
545
- <p>If succeeded, return True and write certified shapes to
546
- certified_shapes.
547
- Set verbose = True for printing additional information.</p>
548
- </dd></dl>
549
-
550
- <dl class="py method">
551
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.interval_vector_is_contained_in">
552
- <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="Permalink to this definition"></a></dt>
553
- <dd><p>Given two vectors of intervals, return whether the first one
554
- is contained in the second one. Examples:</p>
555
- <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>
556
- <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>
557
- <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>
558
- <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>
559
- <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>
560
- <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>
561
-
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">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>
563
- <span class="kc">True</span>
564
- <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>
565
- <span class="kc">False</span>
566
- <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>
567
- <span class="kc">False</span>
568
- <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>
569
- <span class="kc">False</span>
570
- <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>
571
- <span class="kc">False</span>
572
- <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>
573
- <span class="kc">False</span>
574
- </pre></div>
575
- </div>
576
- </dd></dl>
577
-
578
- <dl class="py method">
579
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.interval_vector_mid_points">
580
- <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="Permalink to this definition"></a></dt>
581
- <dd><p>Given a vector of complex intervals, return the midpoints (as 0-length
582
- complex intervals) of them.</p>
583
- </dd></dl>
584
-
585
- <dl class="py method">
586
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.interval_vector_union">
587
- <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="Permalink to this definition"></a></dt>
588
- <dd><p>Given two vectors of intervals, return the vector of their unions,
589
- i.e., the smallest interval containing both intervals.</p>
590
- </dd></dl>
591
-
592
- <dl class="py method">
593
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.krawczyk_interval">
594
- <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="Permalink to this definition"></a></dt>
595
- <dd><p>Compute the interval in the Krawczyk test.</p>
596
- <p>It is given as</p>
597
- <blockquote>
598
- <div><p>K(z0, [z], f) := z0 - c * f(z0) + (Id - c * df([z])) * ([z] - z0)</p>
599
- </div></blockquote>
600
- <dl class="simple">
601
- <dt>where</dt><dd><ul class="simple">
602
- <li><p>z0 is the approximate candidate solution,</p></li>
603
- <li><p>[z] are the shape_intervals we try to verify,</p></li>
604
- <li><p>f is the function taking the shapes to the errors of the logarithmic gluing equations</p></li>
605
- <li><p>c is an approximate inverse of df</p></li>
606
- <li><p>df([z]) is the derivative of f (interval-)evaluated for [z]</p></li>
607
- </ul>
608
- </dd>
609
- </dl>
610
- <p>Note that z0 in self.initial_shapes which are complex intervals
611
- containing only one value (the candidate solution given initially).</p>
612
- <p>If K is contained in [z], then we have proven that [z] contains a solution
613
- to the gluing equations.</p>
614
- <p>Do several Krawczyk operations to get a better solution:</p>
615
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;m019&quot;)
616
- sage: shapes = vector(ComplexIntervalField(53), [ 0.5+0.8j, 0.5+0.8j, 0.5+0.8j])
617
- sage: for i in range(15):
618
- ... penultimateShapes = shapes
619
- ... centers = [ shape.center() for shape in shapes ]
620
- ... C = KrawczykShapesEngine(M, centers, bits_prec = 53)
621
- ... shapes = C.krawczyk_interval(shapes)
622
- sage: shapes # doctest: +NUMERIC12
623
- (0.78055252785073? + 0.91447366296773?*I, 0.780552527850725? + 0.91447366296773?*I, 0.460021175573718? + 0.632624193605256?*I)
624
- </pre></div>
625
- </div>
626
- </dd></dl>
627
-
628
- <dl class="py method">
629
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.log_gluing_LHS_derivatives">
630
- <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="Permalink to this definition"></a></dt>
631
- <dd><p>Compute the Jacobian of the vector-valued function f
632
- described in the above log_gluing_LHSs:</p>
633
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
634
- sage: M = Manifold(&quot;m019&quot;)
635
- sage: shapes = M.tetrahedra_shapes(&#39;rect&#39;, bits_prec = 80)
636
- sage: C = KrawczykShapesEngine(M, shapes, bits_prec = 80)
637
- sage: RIF = RealIntervalField(80)
638
- sage: CIF = ComplexIntervalField(80)
639
- sage: shape1 = CIF(RIF(0.78055,0.78056), RIF(0.9144, 0.9145))
640
- sage: shape2 = CIF(RIF(0.46002,0.46003), RIF(0.6326, 0.6327))
641
- sage: shapes = [shape1, shape1, shape2]
642
- sage: C.log_gluing_LHS_derivatives(shapes) # doctest: +NUMERIC3
643
- [ 0.292? - 1.6666?*I 0.292? - 1.6666?*I 0.752? - 1.0340?*I]
644
- [ 0.5400? - 0.6327?*I 0.5400? - 0.6327?*I -1.561? - 1.8290?*I]
645
- [ 0.5400? - 0.6327?*I -0.5400? + 0.6327?*I 0]
646
- </pre></div>
647
- </div>
648
- </dd></dl>
649
-
650
- <dl class="py method">
651
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.log_gluing_LHS_derivatives_sparse">
652
- <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="Permalink to this definition"></a></dt>
653
- <dd><p>A column-sparse matrix version of log_gluing_LHS_derivatives_sparse.
654
- The result is a list of list of pairs. Each list of pairs corresponds
655
- to a column, a pair being (index of row, value) where the index is
656
- increasing.</p>
657
- </dd></dl>
658
-
659
- <dl class="py method">
660
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.log_gluing_LHSs">
661
- <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="Permalink to this definition"></a></dt>
662
- <dd><p>Given the result of M.gluing_equations(‘rect’) or a
663
- subset of rows of it and shapes, return a vector of
664
- log(LHS) where</p>
665
- <blockquote>
666
- <div><p>LHS = c * z0 ** a0 * (1-z0) ** b0 * z1 ** a1 * …</p>
667
- </div></blockquote>
668
- <p>Let f: C^n -&gt; C^n denote the function which takes
669
- shapes and returns the vector of log(LHS).</p>
670
- <p>The reason we take the logarithm of the rectangular
671
- gluing equations is because the logarithmic derivative
672
- is of a particular nice form:</p>
673
- <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>
674
- <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>
675
- <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>
676
- <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>
677
- <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>
678
- <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>
679
- <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>
680
- <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>
681
- </pre></div>
682
- </div>
683
- <p>An interval solution containing the true solution. The log of each
684
- rectangular equation should be 0 for the true solution, hence the interval
685
- should contain zero:</p>
686
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape2]
687
- sage: C = KrawczykShapesEngine(M, [shape.center() for shape in shapes], bits_prec = 53)
688
- sage: LHSs = C.log_gluing_LHSs(shapes)
689
- sage: LHSs # doctest: +NUMERIC6
690
- (0.000? + 0.000?*I, 0.000? + 0.000?*I, 0.0000? + 0.0000?*I)
691
- sage: zero in LHSs[0]
692
- True
693
- </pre></div>
694
- </div>
695
- <p>An interval not containing the true solution:</p>
696
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: shapes = [shape1, shape1, shape1]
697
- sage: LHSs = C.log_gluing_LHSs(shapes)
698
- sage: LHSs # doctest: +NUMERIC3
699
- (0.430? - 0.078?*I, 0.246? - 0.942?*I, 0.0000? + 0.0000?*I)
700
- sage: zero in LHSs[0]
701
- False
702
- </pre></div>
703
- </div>
704
- </dd></dl>
705
-
706
- <dl class="py method">
707
- <dt class="sig sig-object py" id="snappy.verify.KrawczykShapesEngine.matrix_times_sparse">
708
- <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="Permalink to this definition"></a></dt>
709
- <dd><p>Multiply a (dense) Sage matrix with a column-sparse matrix
710
- (in the format described in log_gluing_LHS_derivatives_sparse).</p>
711
- </dd></dl>
712
-
713
- </dd></dl>
714
-
715
- </section>
716
- <section id="verification-of-hyperbolicity">
717
- <h2>Verification of hyperbolicity<a class="headerlink" href="#verification-of-hyperbolicity" title="Permalink to this heading"></a></h2>
718
- <p>Methods containing <code class="docutils literal notranslate"><span class="pre">check</span></code> will raise an exception if the desired property
719
- 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
720
- 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>
721
- <dl class="py function">
722
- <dt class="sig sig-object py" id="snappy.verify.verifyHyperbolicity.check_logarithmic_gluing_equations_and_positively_oriented_tets">
723
- <span class="sig-prename descclassname"><span class="pre">snappy.verify.verifyHyperbolicity.</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.verifyHyperbolicity.check_logarithmic_gluing_equations_and_positively_oriented_tets" title="Permalink to this definition"></a></dt>
724
- <dd><p>Given a SnapPy manifold manifold and complex intervals for the shapes
725
- shape_intervals that are certified to contain a solution to the
726
- rectangular gluing equations, verify that the logarithmic gluing equations
727
- are also fulfilled and that all shapes have positive imaginary part.
728
- It will raise an exception if the verification fails.
729
- This is sufficient to prove that the manifold is indeed hyperbolic.</p>
730
- <p>Since the given interval are supposed to contain a true solution of
731
- the rectangular gluing equations, the logarithmic gluing equations
732
- are known to be fulfilled up to a multiple of 2 pi i. Thus it is enough
733
- to certify that the absolute error of the logarithmic gluing
734
- equations is &lt; 0.1. Using interval arithmetic, this function certifies
735
- this and positivity of the imaginary parts of the shapes:</p>
736
- <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>
737
- <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>
738
- <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>
739
- <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>
740
- </pre></div>
741
- </div>
742
- <p>The SnapPy triangulation of the following hyperbolic manifold contains
743
- actually negatively oriented tetrahedra:</p>
744
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;t02774&quot;)
745
- sage: check_logarithmic_gluing_equations_and_positively_oriented_tets(
746
- ... M, M.tetrahedra_shapes(&#39;rect&#39;, intervals=True)) # doctest: +IGNORE_EXCEPTION_DETAIL
747
- Traceback (most recent call last):
748
- ...
749
- ShapePositiveImaginaryPartNumericalVerifyError: Numerical verification that shape has positive imaginary part has failed: Im(0.4800996900657? - 0.0019533695046?*I) &gt; 0
750
- </pre></div>
751
- </div>
752
- </dd></dl>
753
-
754
- </section>
755
- <section id="cusp-cross-sections">
756
- <h2>Cusp cross sections<a class="headerlink" href="#cusp-cross-sections" title="Permalink to this heading"></a></h2>
757
- <dl class="py class">
758
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection">
759
- <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">RealCuspCrossSection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mcomplex</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection" title="Permalink to this definition"></a></dt>
760
- <dd><p>A t3m triangulation with real edge lengths of cusp cross sections built
761
- from a cusped (possibly non-orientable) SnapPy manifold M with a hyperbolic
762
- structure specified by shapes. It can scale the cusps to areas that can be
763
- specified or scale them such that they are disjoint.
764
- It can also compute the “tilts” used in the Tilt Theorem, see
765
- <code class="docutils literal notranslate"><span class="pre">canonize_part_1.c</span></code>.</p>
766
- <p>The computations are agnostic about the type of numbers provided as shapes
767
- as long as they provide <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>, <code class="docutils literal notranslate"><span class="pre">conjugate()</span></code>,
768
- <code class="docutils literal notranslate"><span class="pre">im()</span></code>, <code class="docutils literal notranslate"><span class="pre">abs()</span></code>, <code class="docutils literal notranslate"><span class="pre">sqrt()</span></code>.
769
- Shapes can be a numerical type such as ComplexIntervalField or an exact
770
- type (supporting sqrt) such as QQbar.</p>
771
- <p>The resulting edge lengths and tilts will be of the type returned by
772
- applying the above operations to the shapes. For example, if the shapes
773
- are in ComplexIntervalField, the edge lengths and tilts are elements in
774
- RealIntervalField.</p>
775
- <p><strong>Remark:</strong> The real edge lengths could also be obtained from the complex
776
- edge lengths computed by <code class="docutils literal notranslate"><span class="pre">ComplexCuspCrossSection</span></code>, but this has two
777
- drawbacks. The times at which we apply <code class="docutils literal notranslate"><span class="pre">abs</span></code> or <code class="docutils literal notranslate"><span class="pre">sqrt</span></code> during the
778
- development and rescaling of the cusps would be different. Though this
779
- gives the same values, the resulting representation of these values by an
780
- exact number type (such as the ones in <code class="docutils literal notranslate"><span class="pre">squareExtension.py</span></code>) might be
781
- prohibitively more complicated. Furthermore, <code class="docutils literal notranslate"><span class="pre">ComplexCuspCrossSection</span></code>
782
- does not work for non-orientable manifolds (it does not implement working
783
- in a cusp’s double-cover like the SnapPea kernel does).</p>
784
- <dl class="py attribute">
785
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.HoroTriangle">
786
- <span class="sig-name descname"><span class="pre">HoroTriangle</span></span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.HoroTriangle" title="Permalink to this definition"></a></dt>
787
- <dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">RealHoroTriangle</span></code></p>
788
- </dd></dl>
789
-
790
- <dl class="py method">
791
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.check_cusp_development_exactly">
792
- <span class="sig-name descname"><span class="pre">check_cusp_development_exactly</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.check_cusp_development_exactly" title="Permalink to this definition"></a></dt>
793
- <dd><p>Check that all side lengths of horo triangles are consistent.
794
- If the logarithmic edge equations are fulfilled, this implices
795
- that the all cusps are complete and thus the manifold is complete.</p>
796
- </dd></dl>
797
-
798
- <dl class="py method">
799
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.check_logarithmic_edge_equations_and_positivity">
800
- <span class="sig-name descname"><span class="pre">check_logarithmic_edge_equations_and_positivity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">NumericalField</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.check_logarithmic_edge_equations_and_positivity" title="Permalink to this definition"></a></dt>
801
- <dd><p>Check that the shapes have positive imaginary part and that the
802
- logarithmic gluing equations have small error.</p>
803
- <p>The shapes are coerced into the field given as argument before the
804
- logarithm is computed. It can be, e.g., a ComplexIntervalField.</p>
805
- </dd></dl>
806
-
807
- <dl class="py method">
808
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.check_polynomial_edge_equations_exactly">
809
- <span class="sig-name descname"><span class="pre">check_polynomial_edge_equations_exactly</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.check_polynomial_edge_equations_exactly" title="Permalink to this definition"></a></dt>
810
- <dd><p>Check that the polynomial edge equations are fulfilled exactly.</p>
811
- <p>We use the conjugate inverse to support non-orientable manifolds.</p>
812
- </dd></dl>
813
-
814
- <dl class="py method">
815
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.compute_tilts">
816
- <span class="sig-name descname"><span class="pre">compute_tilts</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.compute_tilts" title="Permalink to this definition"></a></dt>
817
- <dd><p>Computes all tilts. They are written to the instances of
818
- t3m.simplex.Face and can be accessed as
819
- [ face.Tilt for face in crossSection.Faces].</p>
820
- </dd></dl>
821
-
822
- <dl class="py method">
823
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.cusp_areas">
824
- <span class="sig-name descname"><span class="pre">cusp_areas</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.cusp_areas" title="Permalink to this definition"></a></dt>
825
- <dd><p>List of all cusp areas.</p>
826
- </dd></dl>
827
-
828
- <dl class="py method">
829
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.ensure_disjoint_on_edges">
830
- <span class="sig-name descname"><span class="pre">ensure_disjoint_on_edges</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.ensure_disjoint_on_edges" title="Permalink to this definition"></a></dt>
831
- <dd><p>Scales the cusp neighborhoods down until they are disjoint when
832
- intersected with the edges of the triangulations.</p>
833
- <p>Given an edge of a triangulation, we can easily compute the signed
834
- distance between the two cusp neighborhoods at the ends of the edge
835
- measured along that edge. Thus, we can easily check that all the
836
- distances measured along all the edges are positive and scale the
837
- cusps down if necessary.</p>
838
- <p>Unfortunately, this is not sufficient to ensure that two cusp
839
- neighborhoods are disjoint since there might be a geodesic between
840
- the two cusps such that the distance between the two cusps measured
841
- along the geodesic is shorter than measured along any edge of the
842
- triangulation.</p>
843
- <p>Thus, it is necessary to call ensure_std_form as well:
844
- it will make sure that the cusp neighborhoods are small enough so
845
- that they intersect the tetrahedra in “standard” form.
846
- Here, “standard” form means that the corresponding horoball about a
847
- vertex of a tetrahedron intersects the three faces of the tetrahedron
848
- adjacent to the vertex but not the one opposite to the vertex.</p>
849
- <p>For any geometric triangulation, standard form and positive distance
850
- measured along all edges of the triangulation is sufficient for
851
- disjoint neighborhoods.</p>
852
- <p>The SnapPea kernel uses the proto-canonical triangulation associated
853
- to the cusp neighborhood to get around this when computing the
854
- “reach” and the “stoppers” for the cusps.</p>
855
- <p><strong>Remark:</strong> This means that the cusp neighborhoods might be scaled down
856
- more than necessary. Related open questions are: given maximal disjoint
857
- cusp neighborhoods (maximal in the sense that no neighborhood can be
858
- expanded without bumping into another or itself), is there always a
859
- geometric triangulation intersecting the cusp neighborhoods in standard
860
- form? Is there an easy algorithm to find this triangulation, e.g., by
861
- applying a 2-3 move whenever we see a non-standard intersection?</p>
862
- </dd></dl>
863
-
864
- <dl class="py method">
865
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.ensure_std_form">
866
- <span class="sig-name descname"><span class="pre">ensure_std_form</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">allow_scaling_up</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.RealCuspCrossSection.ensure_std_form" title="Permalink to this definition"></a></dt>
867
- <dd><p>Makes sure that the cusp neighborhoods intersect each tetrahedron
868
- in standard form by scaling the cusp neighborhoods down if necessary.</p>
869
- </dd></dl>
870
-
871
- <dl class="py method">
872
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.fromManifoldAndShapes">
873
- <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">fromManifoldAndShapes</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.RealCuspCrossSection.fromManifoldAndShapes" title="Permalink to this definition"></a></dt>
874
- <dd><p><strong>Examples:</strong></p>
875
- <p>Initialize from shapes provided from the floats returned by
876
- tetrahedra_shapes. The tilts appear to be negative but are not
877
- verified by interval arithmetics:</p>
878
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">snappy</span> <span class="kn">import</span> <span class="n">Manifold</span>
879
- <span class="gp">&gt;&gt;&gt; </span><span class="n">M</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m004&quot;</span><span class="p">)</span>
880
- <span class="gp">&gt;&gt;&gt; </span><span class="n">M</span><span class="o">.</span><span class="n">canonize</span><span class="p">()</span>
881
- <span class="gp">&gt;&gt;&gt; </span><span class="n">shapes</span> <span class="o">=</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>
882
- <span class="gp">&gt;&gt;&gt; </span><span class="n">e</span> <span class="o">=</span> <span class="n">RealCuspCrossSection</span><span class="o">.</span><span class="n">fromManifoldAndShapes</span><span class="p">(</span><span class="n">M</span><span class="p">,</span> <span class="n">shapes</span><span class="p">)</span>
883
- <span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">normalize_cusps</span><span class="p">()</span>
884
- <span class="gp">&gt;&gt;&gt; </span><span class="n">e</span><span class="o">.</span><span class="n">compute_tilts</span><span class="p">()</span>
885
- <span class="gp">&gt;&gt;&gt; </span><span class="n">tilts</span> <span class="o">=</span> <span class="n">e</span><span class="o">.</span><span class="n">read_tilts</span><span class="p">()</span>
886
- <span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">tilt</span> <span class="ow">in</span> <span class="n">tilts</span><span class="p">:</span>
887
- <span class="gp">... </span> <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="si">%.8f</span><span class="s1">&#39;</span> <span class="o">%</span> <span class="n">tilt</span><span class="p">)</span>
888
- <span class="go">-0.31020162</span>
889
- <span class="go">-0.31020162</span>
890
- <span class="go">-0.31020162</span>
891
- <span class="go">-0.31020162</span>
892
- <span class="go">-0.31020162</span>
893
- <span class="go">-0.31020162</span>
894
- <span class="go">-0.31020162</span>
895
- <span class="go">-0.31020162</span>
896
- </pre></div>
897
- </div>
898
- <p>Use verified intervals:</p>
899
- <p>sage: from snappy.verify import *
900
- sage: M = Manifold(“m004”)
901
- sage: M.canonize()
902
- sage: shapes = M.tetrahedra_shapes(‘rect’, intervals=True)</p>
903
- <p>Verify that the tetrahedra shapes form a complete manifold:</p>
904
- <p>sage: check_logarithmic_gluing_equations_and_positively_oriented_tets(M,shapes)
905
- sage: e = RealCuspCrossSection.fromManifoldAndShapes(M, shapes)
906
- sage: e.normalize_cusps()
907
- sage: e.compute_tilts()</p>
908
- <p>Tilts are verified to be negative:</p>
909
- <p>sage: [tilt &lt; 0 for tilt in e.read_tilts()]
910
- [True, True, True, True, True, True, True, True]</p>
911
- <p>Setup necessary things in Sage:</p>
912
- <p>sage: from sage.rings.qqbar import QQbar
913
- sage: from sage.rings.rational_field import RationalField
914
- sage: from sage.rings.polynomial.polynomial_ring import polygen
915
- sage: from sage.rings.real_mpfi import RealIntervalField
916
- sage: from sage.rings.complex_interval_field import ComplexIntervalField
917
- sage: x = polygen(RationalField())
918
- sage: RIF = RealIntervalField()
919
- sage: CIF = ComplexIntervalField()</p>
920
- <p>sage: M = Manifold(“m412”)
921
- sage: M.canonize()</p>
922
- <p>Make our own exact shapes using Sage. They are the root of the given
923
- polynomial isolated by the given interval.</p>
924
- <p>sage: r=QQbar.polynomial_root(x**2-x+1,CIF(RIF(0.49,0.51),RIF(0.86,0.87)))
925
- sage: shapes = 5 * [r]
926
- sage: e=RealCuspCrossSection.fromManifoldAndShapes(M, shapes)
927
- sage: e.normalize_cusps()</p>
928
- <p>The following three lines verify that we have shapes giving a complete
929
- hyperbolic structure. The last one uses complex interval arithmetics.</p>
930
- <p>sage: e.check_polynomial_edge_equations_exactly()
931
- sage: e.check_cusp_development_exactly()
932
- sage: e.check_logarithmic_edge_equations_and_positivity(CIF)</p>
933
- <p>Because we use exact types, we can verify that each tilt is either
934
- negative or exactly zero.</p>
935
- <p>sage: e.compute_tilts()
936
- sage: [(tilt &lt; 0, tilt == 0) for tilt in e.read_tilts()]
937
- [(True, False), (True, False), (False, True), (True, False), (True, False), (True, False), (True, False), (False, True), (True, False), (True, False), (True, False), (False, True), (False, True), (False, True), (False, True), (False, True), (True, False), (True, False), (False, True), (True, False)]</p>
938
- <p>Some are exactly zero, so the canonical cell decomposition has
939
- non-tetrahedral cells. In fact, the one cell is a cube. We can obtain
940
- the retriangulation of the canonical cell decomposition as follows:</p>
941
- <p>sage: e.compute_tilts()
942
- sage: opacities = [tilt &lt; 0 for tilt in e.read_tilts()]
943
- sage: N = M._canonical_retriangulation()
944
- sage: N.num_tetrahedra()
945
- 12</p>
946
- <p>The manifold m412 has 8 isometries, the above code certified that using
947
- exact arithmetic:
948
- sage: len(N.isomorphisms_to(N))
949
- 8</p>
950
- </dd></dl>
951
-
952
- <dl class="py method">
953
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.normalize_cusps">
954
- <span class="sig-name descname"><span class="pre">normalize_cusps</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">areas</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.RealCuspCrossSection.normalize_cusps" title="Permalink to this definition"></a></dt>
955
- <dd><p>Scale cusp so that they have the given target area.
956
- Without argument, each cusp is scaled to have area 1.
957
- If the argument is a number, scale each cusp to have that area.
958
- If the argument is an array, scale each cusp by the respective
959
- entry in the array.</p>
960
- </dd></dl>
961
-
962
- <dl class="py method">
963
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.read_tilts">
964
- <span class="sig-name descname"><span class="pre">read_tilts</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.read_tilts" title="Permalink to this definition"></a></dt>
965
- <dd><p>After compute_tilts() has been called, put the tilt values into an
966
- array containing the tilt of face 0, 1, 2, 3 of the first tetrahedron,
967
- of the second tetrahedron, ….</p>
968
- </dd></dl>
969
-
970
- <dl class="py method">
971
- <dt class="sig sig-object py" id="snappy.verify.RealCuspCrossSection.scale_cusps">
972
- <span class="sig-name descname"><span class="pre">scale_cusps</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scales</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.RealCuspCrossSection.scale_cusps" title="Permalink to this definition"></a></dt>
973
- <dd><p>Scale each cusp by Euclidean dilation by values in given array.</p>
974
- </dd></dl>
975
-
976
- </dd></dl>
977
-
978
- <dl class="py class">
979
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection">
980
- <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">ComplexCuspCrossSection</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mcomplex</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection" title="Permalink to this definition"></a></dt>
981
- <dd><p>Similarly to RealCuspCrossSection with the following differences: it
982
- computes the complex edge lengths and the cusp translations (instead
983
- of the tilts) and it only works for orientable manifolds.</p>
984
- <p>The same comment applies about the type of the shapes. The resulting
985
- edge lengths and translations will be of the same type as the shapes.</p>
986
- <p>For shapes corresponding to a non-boundary unipotent representation
987
- (in other words, a manifold having an incomplete cusp), a cusp can
988
- be developed if an appropriate 1-cocycle is given. The 1-cocycle
989
- is a cellular cocycle in the dual of the cusp triangulations and
990
- represents an element in H^1(boundary M; C^*) that must match the
991
- PSL(2,C) boundary holonomy of the representation.
992
- It is encoded as dictionary with key (tet index, t3m face, t3m vertex).</p>
993
- <dl class="py attribute">
994
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.HoroTriangle">
995
- <span class="sig-name descname"><span class="pre">HoroTriangle</span></span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.HoroTriangle" title="Permalink to this definition"></a></dt>
996
- <dd><p>alias of <code class="xref py py-class docutils literal notranslate"><span class="pre">ComplexHoroTriangle</span></code></p>
997
- </dd></dl>
998
-
999
- <dl class="py method">
1000
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.add_vertex_positions_to_horotriangles">
1001
- <span class="sig-name descname"><span class="pre">add_vertex_positions_to_horotriangles</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.add_vertex_positions_to_horotriangles" title="Permalink to this definition"></a></dt>
1002
- <dd><p>Develops cusp to assign to each horotriangle the positions of its three
1003
- vertices in the Euclidean plane.</p>
1004
- <p>Note: For a complete cusp, this is defined only up to translating the
1005
- entire triangle by translations generated by meridian and longitude.</p>
1006
- <p>For an incomplete cusp, this is defined only up to
1007
- similarities generated by the meridian and longitude. The
1008
- positions can be moved such that the fixed point of these
1009
- similarities is at the origin by calling
1010
- move_fixed_point_to_zero after
1011
- add_vertex_positions_to_horotriangles.</p>
1012
- <p>Note: This is not working when one_cocycle is passed during the
1013
- construction of the cusp cross section.</p>
1014
- </dd></dl>
1015
-
1016
- <dl class="py method">
1017
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.all_normalized_translations">
1018
- <span class="sig-name descname"><span class="pre">all_normalized_translations</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.all_normalized_translations" title="Permalink to this definition"></a></dt>
1019
- <dd><p>Compute the translations corresponding to the meridian and longitude
1020
- for each cusp.</p>
1021
- </dd></dl>
1022
-
1023
- <dl class="py method">
1024
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.check_cusp_development_exactly">
1025
- <span class="sig-name descname"><span class="pre">check_cusp_development_exactly</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.check_cusp_development_exactly" title="Permalink to this definition"></a></dt>
1026
- <dd><p>Check that all side lengths of horo triangles are consistent.
1027
- If the logarithmic edge equations are fulfilled, this implices
1028
- that the all cusps are complete and thus the manifold is complete.</p>
1029
- </dd></dl>
1030
-
1031
- <dl class="py method">
1032
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.check_logarithmic_edge_equations_and_positivity">
1033
- <span class="sig-name descname"><span class="pre">check_logarithmic_edge_equations_and_positivity</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">NumericalField</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.check_logarithmic_edge_equations_and_positivity" title="Permalink to this definition"></a></dt>
1034
- <dd><p>Check that the shapes have positive imaginary part and that the
1035
- logarithmic gluing equations have small error.</p>
1036
- <p>The shapes are coerced into the field given as argument before the
1037
- logarithm is computed. It can be, e.g., a ComplexIntervalField.</p>
1038
- </dd></dl>
1039
-
1040
- <dl class="py method">
1041
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.check_polynomial_edge_equations_exactly">
1042
- <span class="sig-name descname"><span class="pre">check_polynomial_edge_equations_exactly</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.check_polynomial_edge_equations_exactly" title="Permalink to this definition"></a></dt>
1043
- <dd><p>Check that the polynomial edge equations are fulfilled exactly.</p>
1044
- <p>We use the conjugate inverse to support non-orientable manifolds.</p>
1045
- </dd></dl>
1046
-
1047
- <dl class="py method">
1048
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.cusp_areas">
1049
- <span class="sig-name descname"><span class="pre">cusp_areas</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.cusp_areas" title="Permalink to this definition"></a></dt>
1050
- <dd><p>List of all cusp areas.</p>
1051
- </dd></dl>
1052
-
1053
- <dl class="py method">
1054
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.cusp_shapes">
1055
- <span class="sig-name descname"><span class="pre">cusp_shapes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.cusp_shapes" title="Permalink to this definition"></a></dt>
1056
- <dd><p>Compute the cusp shapes as conjugate of the quotient of the translations
1057
- corresponding to the longitude and meridian for each cusp (SnapPea
1058
- kernel convention).</p>
1059
- </dd></dl>
1060
-
1061
- <dl class="py method">
1062
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.ensure_disjoint_on_edges">
1063
- <span class="sig-name descname"><span class="pre">ensure_disjoint_on_edges</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.ensure_disjoint_on_edges" title="Permalink to this definition"></a></dt>
1064
- <dd><p>Scales the cusp neighborhoods down until they are disjoint when
1065
- intersected with the edges of the triangulations.</p>
1066
- <p>Given an edge of a triangulation, we can easily compute the signed
1067
- distance between the two cusp neighborhoods at the ends of the edge
1068
- measured along that edge. Thus, we can easily check that all the
1069
- distances measured along all the edges are positive and scale the
1070
- cusps down if necessary.</p>
1071
- <p>Unfortunately, this is not sufficient to ensure that two cusp
1072
- neighborhoods are disjoint since there might be a geodesic between
1073
- the two cusps such that the distance between the two cusps measured
1074
- along the geodesic is shorter than measured along any edge of the
1075
- triangulation.</p>
1076
- <p>Thus, it is necessary to call ensure_std_form as well:
1077
- it will make sure that the cusp neighborhoods are small enough so
1078
- that they intersect the tetrahedra in “standard” form.
1079
- Here, “standard” form means that the corresponding horoball about a
1080
- vertex of a tetrahedron intersects the three faces of the tetrahedron
1081
- adjacent to the vertex but not the one opposite to the vertex.</p>
1082
- <p>For any geometric triangulation, standard form and positive distance
1083
- measured along all edges of the triangulation is sufficient for
1084
- disjoint neighborhoods.</p>
1085
- <p>The SnapPea kernel uses the proto-canonical triangulation associated
1086
- to the cusp neighborhood to get around this when computing the
1087
- “reach” and the “stoppers” for the cusps.</p>
1088
- <p><strong>Remark:</strong> This means that the cusp neighborhoods might be scaled down
1089
- more than necessary. Related open questions are: given maximal disjoint
1090
- cusp neighborhoods (maximal in the sense that no neighborhood can be
1091
- expanded without bumping into another or itself), is there always a
1092
- geometric triangulation intersecting the cusp neighborhoods in standard
1093
- form? Is there an easy algorithm to find this triangulation, e.g., by
1094
- applying a 2-3 move whenever we see a non-standard intersection?</p>
1095
- </dd></dl>
1096
-
1097
- <dl class="py method">
1098
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.ensure_std_form">
1099
- <span class="sig-name descname"><span class="pre">ensure_std_form</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">allow_scaling_up</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.ComplexCuspCrossSection.ensure_std_form" title="Permalink to this definition"></a></dt>
1100
- <dd><p>Makes sure that the cusp neighborhoods intersect each tetrahedron
1101
- in standard form by scaling the cusp neighborhoods down if necessary.</p>
1102
- </dd></dl>
1103
-
1104
- <dl class="py method">
1105
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.lift_vertex_positions_of_horotriangles">
1106
- <span class="sig-name descname"><span class="pre">lift_vertex_positions_of_horotriangles</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.lift_vertex_positions_of_horotriangles" title="Permalink to this definition"></a></dt>
1107
- <dd><p>After developing an incomplete cusp with
1108
- add_vertex_positions_to_horotriangles, this function moves the
1109
- vertex positions first to zero the fixed point (see
1110
- move_ffixed_point_to_zero) and computes logarithms for all the
1111
- vertex positions of the horotriangles in the Euclidean plane
1112
- in a consistent manner. These logarithms are written to a
1113
- dictionary lifted_vertex_positions on the HoroTriangle’s.</p>
1114
- <p>For an incomplete cusp, the respective value in lifted_vertex_positions
1115
- will be None.</p>
1116
- <p>The three logarithms of the vertex positions of a triangle are only
1117
- defined up to adding mu Z + lambda Z where mu and lambda are the
1118
- logarithmic holonomies of the meridian and longitude.</p>
1119
- </dd></dl>
1120
-
1121
- <dl class="py method">
1122
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.move_fixed_point_to_zero">
1123
- <span class="sig-name descname"><span class="pre">move_fixed_point_to_zero</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.move_fixed_point_to_zero" title="Permalink to this definition"></a></dt>
1124
- <dd><p>Determines the fixed point of the holonomies for all
1125
- incomplete cusps. Then moves the vertex positions of the
1126
- corresponding cusp triangles so that the fixed point is at the
1127
- origin.</p>
1128
- <p>It also add the boolean v.is_complete to all vertices of the
1129
- triangulation to mark whether the corresponding cusp is
1130
- complete or not.</p>
1131
- </dd></dl>
1132
-
1133
- <dl class="py method">
1134
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.move_lifted_vertex_positions_to_zero_first">
1135
- <span class="sig-name descname"><span class="pre">move_lifted_vertex_positions_to_zero_first</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.move_lifted_vertex_positions_to_zero_first" title="Permalink to this definition"></a></dt>
1136
- <dd><p>Shift the lifted vertex positions such that the one associated
1137
- to the first vertex when developing the incomplete cusp is
1138
- zero. This makes the values we obtain more stable when
1139
- changing the Dehn-surgery parameters.</p>
1140
- </dd></dl>
1141
-
1142
- <dl class="py method">
1143
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.normalize_cusps">
1144
- <span class="sig-name descname"><span class="pre">normalize_cusps</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">areas</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.ComplexCuspCrossSection.normalize_cusps" title="Permalink to this definition"></a></dt>
1145
- <dd><p>Scale cusp so that they have the given target area.
1146
- Without argument, each cusp is scaled to have area 1.
1147
- If the argument is a number, scale each cusp to have that area.
1148
- If the argument is an array, scale each cusp by the respective
1149
- entry in the array.</p>
1150
- </dd></dl>
1151
-
1152
- <dl class="py method">
1153
- <dt class="sig sig-object py" id="snappy.verify.ComplexCuspCrossSection.scale_cusps">
1154
- <span class="sig-name descname"><span class="pre">scale_cusps</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scales</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.ComplexCuspCrossSection.scale_cusps" title="Permalink to this definition"></a></dt>
1155
- <dd><p>Scale each cusp by Euclidean dilation by values in given array.</p>
1156
- </dd></dl>
1157
-
1158
- </dd></dl>
1159
-
1160
- </section>
1161
- <section id="verified-canonical-cell-decompositions">
1162
- <h2>Verified canonical cell decompositions<a class="headerlink" href="#verified-canonical-cell-decompositions" title="Permalink to this heading"></a></h2>
1163
- <dl class="py function">
1164
- <dt class="sig sig-object py" id="snappy.verify.verifyCanonical.interval_checked_canonical_triangulation">
1165
- <span class="sig-prename descclassname"><span class="pre">snappy.verify.verifyCanonical.</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.verifyCanonical.interval_checked_canonical_triangulation" title="Permalink to this definition"></a></dt>
1166
- <dd><p>Given a canonical triangulation of a cusped (possibly non-orientable)
1167
- manifold M, return this triangulation if it has tetrahedral cells and can
1168
- be verified using interval arithmetics with the optional, given precision.
1169
- Otherwise, raises an Exception.</p>
1170
- <p>It fails when we call it on something which is not the canonical
1171
- triangulation:</p>
1172
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
1173
- sage: M = Manifold(&quot;m015&quot;)
1174
- sage: interval_checked_canonical_triangulation(M) # doctest: +ELLIPSIS +IGNORE_EXCEPTION_DETAIL
1175
- Traceback (most recent call last):
1176
- ...
1177
- 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
1178
- </pre></div>
1179
- </div>
1180
- <p>It verifies the canonical triangulation:</p>
1181
- <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>
1182
- <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>
1183
- <span class="n">sage</span><span class="p">:</span> <span class="n">K</span>
1184
- <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>
1185
- </pre></div>
1186
- </div>
1187
- <p>Has a non-tetrahedral canonical cell:</p>
1188
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;m137&quot;)
1189
- sage: M.canonize()
1190
- sage: interval_checked_canonical_triangulation(M) # doctest: +ELLIPSIS +IGNORE_EXCEPTION_DETAIL
1191
- Traceback (most recent call last):
1192
- ...
1193
- TiltInequalityNumericalVerifyError: Numerical verification that tilt is negative has failed: 0.?e-1... &lt; 0
1194
- </pre></div>
1195
- </div>
1196
- <p>Has a cubical canonical cell:</p>
1197
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: M = Manifold(&quot;m412&quot;)
1198
- sage: M.canonize()
1199
- sage: interval_checked_canonical_triangulation(M) # doctest: +ELLIPSIS +IGNORE_EXCEPTION_DETAIL
1200
- Traceback (most recent call last):
1201
- ...
1202
- TiltInequalityNumericalVerifyError: Numerical verification that tilt is negative has failed: 0.?e-1... &lt; 0
1203
- </pre></div>
1204
- </div>
1205
- </dd></dl>
1206
-
1207
- <dl class="py function">
1208
- <dt class="sig sig-object py" id="snappy.verify.verifyCanonical.exactly_checked_canonical_retriangulation">
1209
- <span class="sig-prename descclassname"><span class="pre">snappy.verify.verifyCanonical.</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.verifyCanonical.exactly_checked_canonical_retriangulation" title="Permalink to this definition"></a></dt>
1210
- <dd><p>Given a proto-canonical triangulation of a cusped (possibly non-orientable)
1211
- manifold M, return its canonical retriangulation which is computed from
1212
- exact shapes. The exact shapes are computed using snap (which uses the
1213
- LLL-algorithm). The precision (in bits) and the maximal degree need to be
1214
- specified (here 300 bits precision and polynomials of degree less than 4):</p>
1215
- <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>
1216
- <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>
1217
- <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>
1218
- <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>
1219
- </pre></div>
1220
- </div>
1221
- <p>M’s canonical cell decomposition has a cube, so non-tetrahedral:</p>
1222
- <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>
1223
- <span class="kc">True</span>
1224
- </pre></div>
1225
- </div>
1226
- <p>Has 12 tetrahedra after the retrianglation:</p>
1227
- <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>
1228
- <span class="mi">12</span>
1229
- </pre></div>
1230
- </div>
1231
- <p>Check that it fails on something which is not a proto-canonical
1232
- triangulation:</p>
1233
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from snappy import Manifold
1234
- sage: M = Manifold(&quot;m015&quot;)
1235
- sage: exactly_checked_canonical_retriangulation(M, 500, 6) # doctest: +IGNORE_EXCEPTION_DETAIL
1236
- Traceback (most recent call last):
1237
- ...
1238
- 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
1239
- </pre></div>
1240
- </div>
1241
- </dd></dl>
1242
-
1243
- </section>
1244
- <section id="module-snappy.verify.squareExtensions">
1245
- <span id="exact-computations-for-cusp-cross-sections"></span><h2>Exact computations for cusp cross sections<a class="headerlink" href="#module-snappy.verify.squareExtensions" title="Permalink to this heading"></a></h2>
1246
- <p>The squareExtensions module provides
1247
- two special classes to give exact representations of the values
1248
- involved when computing a cusp cross section.</p>
1249
- <p>The method find_shapes_as_complex_sqrt_lin_combinations returns a list of
1250
- shapes as ComplexSqrtLinCombination’s. This can be used as input to
1251
- CuspCrossSection. The outputs of CuspCrossSection, including the tilts, will
1252
- then be of type SqrtLinCombination.</p>
1253
- <p>Consider the real number field N generated by the real and imaginary part of
1254
- the shapes. The edge lengths and the factors used to normalize the cusp areas
1255
- will be square roots in N and thus the tilts will be N-linear combinations of
1256
- square roots in N. To avoid computing in a massive tower of square extensions
1257
- of N, we implement SqrtLinCombination here that provides a special
1258
- implementation of the == operator.</p>
1259
- <dl class="py function">
1260
- <dt class="sig sig-object py" id="snappy.verify.squareExtensions.find_shapes_as_complex_sqrt_lin_combinations">
1261
- <span class="sig-prename descclassname"><span class="pre">snappy.verify.squareExtensions.</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.squareExtensions.find_shapes_as_complex_sqrt_lin_combinations" title="Permalink to this definition"></a></dt>
1262
- <dd><p>Given a manifold M, use snap (which uses LLL-algorithm) with the given
1263
- decimal precision and maximal degree to find exact values for the shapes’
1264
- real and imaginary part. Return the shapes as list of
1265
- ComplexSqrtLinCombination’s. Return None on failure.</p>
1266
- <p>Example:</p>
1267
- <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>
1268
- <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>
1269
- <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>
1270
- <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>
1271
- </pre></div>
1272
- </div>
1273
- </dd></dl>
1274
-
1275
- <dl class="py class">
1276
- <dt class="sig sig-object py" id="snappy.verify.squareExtensions.SqrtLinCombination">
1277
- <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.squareExtensions.</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.squareExtensions.SqrtLinCombination" title="Permalink to this definition"></a></dt>
1278
- <dd><p>A class representing a linear combination</p>
1279
- <blockquote>
1280
- <div><p>c_1 * sqrt(r_1) + c_2 * sqrt(r_2) + … + c_n * sqrt(r_n)</p>
1281
- </div></blockquote>
1282
- <p>where c_i and r_i have to be of type Integer, Rational or elements
1283
- of the same Sage NumberField with a real embedding (Caution: this is
1284
- assumed but not checked!) such that all r_i are positive (Caution: this is
1285
- not checked during construction!).</p>
1286
- <p>It implements +, -, * where one of the operators is allowed to be an
1287
- integer or rational.</p>
1288
- <p>/ is only implemented when the denominator has only one term c_1 * sqrt(1).
1289
- sqrt is only implemented for c_1 * sqrt(1) and it is not checked that
1290
- c_1 is positive.</p>
1291
- <p>== is implemented, but the other comparison operators are not: casting to
1292
- a RealIntervalField is implemented instead and the user can compare the
1293
- intervals.</p>
1294
- <p>The == operator is implemented by first reducing A == B to D == 0 and then
1295
- converting to a different data type (_FactorizedSqrtLinCombination) that can
1296
- represent linear combinations:</p>
1297
- <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>
1298
- <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>
1299
- <span class="o">+</span> <span class="o">...</span>
1300
- <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>
1301
- </pre></div>
1302
- </div>
1303
- <dl class="simple">
1304
- <dt>by just trivially setting</dt><dd><p>k_i = 0 when r_i = 1 and
1305
- r_{i,1} = r_i and k_1 = 1 otherwise.</p>
1306
- </dd>
1307
- </dl>
1308
- <p>For this data type, multiplying two sqrt(r_{i,j}) with equal r_{i,j} will
1309
- cancel the two sqrt’s and apply the common r_{i,j} to the c_i of the result
1310
- instead. Thus, the following procedure for determining whether D == 0 will
1311
- eventually terminate:</p>
1312
- <ul class="simple">
1313
- <li><p>if the number of terms n is 0, return True</p></li>
1314
- <li><p>if the number of terms n is 1, return c_1 == 0</p></li>
1315
- <li><p>if there is a r_{i,j} common to each summand, factor it out</p></li>
1316
- <li><p>pick one of the r_{i,j}, split the sum into two parts “left”,
1317
- respectively, “right” of all the terms containing sqrt(r_{i,j}),
1318
- respectively, not containing sqrt(r_{i,j}).</p></li>
1319
- <li><p>If left^2 - right^2 == 0 is False, return False.
1320
- (sqrt(r_{i,j})^2 simplifies to r_{i,j} and disappears, so the resulting
1321
- expression is easier and this recursion terminates eventually.)</p></li>
1322
- <li><p>If left == 0 (some comment applies), return True</p></li>
1323
- <li><p>Use interval arithmetic of increasing precision until it is high enough
1324
- to determine the signs of left and right.
1325
- Return True if and only if the signs differ, otherwise False.</p></li>
1326
- </ul>
1327
- <p>Examples:</p>
1328
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: from sage.rings.number_field.number_field import NumberField
1329
- sage: from sage.rings.integer import Integer
1330
- sage: from sage.rings.rational import Rational
1331
- sage: from sage.rings.real_mpfr import RealLiteral, RealField
1332
- sage: from sage.rings.real_mpfi import RealIntervalField
1333
- sage: from sage.calculus.var import var
1334
- sage: from sage.functions.other import sqrt
1335
- sage: x = var(&#39;x&#39;)
1336
- sage: poly = x ** 6 + Rational((3,2))*x**4 + Rational((9,16))*x**2 - Rational((23,64))
1337
- sage: nf = NumberField(poly, &#39;z&#39;, embedding = RealField()(0.56227951206))
1338
- sage: z = nf.gen()
1339
-
1340
- sage: A = SqrtLinCombination(z)
1341
- sage: B = SqrtLinCombination(Rational((8,9))*z**4 + Rational((10,9))*z**2 + Rational((2,9)))
1342
- sage: C = SqrtLinCombination(3)
1343
- sage: D = SqrtLinCombination(Integer(5))
1344
- sage: E = SqrtLinCombination(Rational((6,7)))
1345
-
1346
- sage: A + B
1347
- (8/9*z^4 + 10/9*z^2 + z + 2/9) * sqrt(1)
1348
- sage: B - E
1349
- (8/9*z^4 + 10/9*z^2 - 40/63) * sqrt(1)
1350
- sage: A + sqrt(B) * sqrt(B)
1351
- (8/9*z^4 + 10/9*z^2 + z + 2/9) * sqrt(1)
1352
- sage: A + sqrt(B) * sqrt(B) + C == A + B + C
1353
- True
1354
- sage: A / E
1355
- (7/6*z) * sqrt(1)
1356
- sage: B / A.sqrt()
1357
- (128/207*z^5 + 376/207*z^3 + 302/207*z) * sqrt(z)
1358
- sage: B / (D * A.sqrt())
1359
- (128/1035*z^5 + 376/1035*z^3 + 302/1035*z) * sqrt(z)
1360
- sage: RIF = RealIntervalField(100)
1361
- sage: RIF(B.sqrt() + E.sqrt())
1362
- 1.73967449622339881238507307209?
1363
- sage: A - B == 0
1364
- False
1365
- sage: (A + B).sqrt()
1366
- (1) * sqrt(8/9*z^4 + 10/9*z^2 + z + 2/9)
1367
- sage: 3 * A.sqrt() + (4 * B).sqrt() + C + 8 == (9 * A).sqrt() + 2 * B.sqrt() + (C * C).sqrt() + 11 - 3
1368
- True
1369
- </pre></div>
1370
- </div>
1371
- <dl class="py method">
1372
- <dt class="sig sig-object py" id="snappy.verify.squareExtensions.SqrtLinCombination.sign">
1373
- <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.squareExtensions.SqrtLinCombination.sign" title="Permalink to this definition"></a></dt>
1374
- <dd><p>Returns the +1, 0, -1 depending on whether the value is positive,
1375
- zero or negative. For the zero case, exact arithmetic is used to
1376
- certify. Otherwise, interval arithmetic is used.</p>
1377
- </dd></dl>
1378
-
1379
- <dl class="py method">
1380
- <dt class="sig sig-object py" id="snappy.verify.squareExtensions.SqrtLinCombination.sign_with_interval">
1381
- <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.squareExtensions.SqrtLinCombination.sign_with_interval" title="Permalink to this definition"></a></dt>
1382
- <dd><p>Similar to sign, but for the non-zero case, also return the interval
1383
- certifying the sign - useful for debugging.</p>
1384
- </dd></dl>
1385
-
1386
- </dd></dl>
1387
-
1388
- <dl class="py class">
1389
- <dt class="sig sig-object py" id="snappy.verify.squareExtensions.ComplexSqrtLinCombination">
1390
- <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.verify.squareExtensions.</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.squareExtensions.ComplexSqrtLinCombination" title="Permalink to this definition"></a></dt>
1391
- <dd><p>A pair (real, imag) of SqrtLinCombinations representing the complex number
1392
- 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>,
1393
- <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>
1394
- <dl class="py method">
1395
- <dt class="sig sig-object py" id="snappy.verify.squareExtensions.ComplexSqrtLinCombination.imag">
1396
- <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.squareExtensions.ComplexSqrtLinCombination.imag" title="Permalink to this definition"></a></dt>
1397
- <dd><p>Imaginary part.</p>
1398
- </dd></dl>
1399
-
1400
- <dl class="py method">
1401
- <dt class="sig sig-object py" id="snappy.verify.squareExtensions.ComplexSqrtLinCombination.real">
1402
- <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.squareExtensions.ComplexSqrtLinCombination.real" title="Permalink to this definition"></a></dt>
1403
- <dd><p>Real part.</p>
1404
- </dd></dl>
1405
-
1406
- </dd></dl>
1407
-
1408
- </section>
1409
- <section id="module-snappy.verify.exceptions">
1410
- <span id="exceptions"></span><h2>Exceptions<a class="headerlink" href="#module-snappy.verify.exceptions" title="Permalink to this heading"></a></h2>
1411
- <p>All final exceptions are deriving from two base classes:</p>
1412
- <ul class="simple">
1413
- <li><p>a subclass of VerifyErrorBase to indicate whether a numerical or exact
1414
- verification failed</p></li>
1415
- <li><p>a subclass of EquationType to indicate the type of equation of
1416
- inequality for which the verification failed.</p></li>
1417
- </ul>
1418
- <p>Intermediate subclasses (those without __init__) are not supposed to be
1419
- raised.</p>
1420
- <p>The hierarchy is as follows:</p>
1421
- <ul class="simple">
1422
- <li><p>VerifyErrorBase(RuntimeError)</p>
1423
- <ul>
1424
- <li><p>NumericalVerifyError</p>
1425
- <ul>
1426
- <li><p>InequalityNumericalVerifyError</p></li>
1427
- <li><p>LogLiftNumericalVerifyError</p></li>
1428
- </ul>
1429
- </li>
1430
- <li><p>ExactVerifyError</p>
1431
- <ul>
1432
- <li><p>IsZeroExactVerifyError</p></li>
1433
- </ul>
1434
- </li>
1435
- </ul>
1436
- </li>
1437
- <li><p>EquationType</p>
1438
- <ul>
1439
- <li><p>EdgeEquationType</p>
1440
- <ul>
1441
- <li><p>EdgeEquationExactVerifyError</p></li>
1442
- <li><p>EdgeEquationLogLiftNumericalVerifyError</p></li>
1443
- </ul>
1444
- </li>
1445
- <li><p>CuspConsistencyType</p>
1446
- <ul>
1447
- <li><p>CuspEquationType</p>
1448
- <ul>
1449
- <li><p>CuspEquationExactVerifyError</p></li>
1450
- <li><p>CuspEquationLogLiftNumericalVerifyError</p></li>
1451
- </ul>
1452
- </li>
1453
- <li><p>CuspDevelopmentType</p>
1454
- <ul>
1455
- <li><p>CuspDevelopmentTypeExactVerifyError</p></li>
1456
- </ul>
1457
- </li>
1458
- </ul>
1459
- </li>
1460
- <li><p>TiltType</p>
1461
- <ul>
1462
- <li><p>TiltInequalityNumericalVerifyError</p>
1463
- <ul>
1464
- <li><p>TiltProvenPositiveNumericalVerifyError</p></li>
1465
- </ul>
1466
- </li>
1467
- <li><p>TiltIsZeroExactVerifyError</p></li>
1468
- </ul>
1469
- </li>
1470
- <li><p>ShapeType</p>
1471
- <ul>
1472
- <li><p>ShapePositiveImaginaryPartNumericalVerifyError</p></li>
1473
- </ul>
1474
- </li>
1475
- <li><p>ConsistencyWithSnapPeaType</p>
1476
- <ul>
1477
- <li><p>ConsistencyWithSnapPeaNumericalVerifyError</p></li>
1478
- </ul>
1479
- </li>
1480
- </ul>
1481
- </li>
1482
- </ul>
1483
- <dl class="py exception">
1484
- <dt class="sig sig-object py" id="snappy.verify.exceptions.ConsistencyWithSnapPeaNumericalVerifyError">
1485
- <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">ConsistencyWithSnapPeaNumericalVerifyError</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">snappea_value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.ConsistencyWithSnapPeaNumericalVerifyError" title="Permalink to this definition"></a></dt>
1486
- <dd><p>Exception raised when there is a significant numerical difference
1487
- between the values computed by the SnapPea kernel and by this module
1488
- for a given quantity.</p>
1489
- </dd></dl>
1490
-
1491
- <dl class="py class">
1492
- <dt class="sig sig-object py" id="snappy.verify.exceptions.ConsistencyWithSnapPeaType">
1493
- <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">ConsistencyWithSnapPeaType</span></span><a class="headerlink" href="#snappy.verify.exceptions.ConsistencyWithSnapPeaType" title="Permalink to this definition"></a></dt>
1494
- <dd><p>A base class for exceptions raised when there is a difference
1495
- between the values computed by the SnapPea kernel and by this module
1496
- for a given quantity.</p>
1497
- </dd></dl>
1498
-
1499
- <dl class="py class">
1500
- <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspConsistencyType">
1501
- <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="Permalink to this definition"></a></dt>
1502
- <dd><p>A base class indicating that verificatin of an equation involving a cusp
1503
- failed.</p>
1504
- </dd></dl>
1505
-
1506
- <dl class="py exception">
1507
- <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspDevelopmentExactVerifyError">
1508
- <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">CuspDevelopmentExactVerifyError</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">value1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.verify.exceptions.CuspDevelopmentExactVerifyError" title="Permalink to this definition"></a></dt>
1509
- <dd><p>Raised when finding a consistent assignment of side lengths to the
1510
- Euclidean Horotriangles to form a Euclidean Horotorus for a cusp failed
1511
- using exact arithmetic.</p>
1512
- </dd></dl>
1513
-
1514
- <dl class="py class">
1515
- <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspDevelopmentType">
1516
- <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">CuspDevelopmentType</span></span><a class="headerlink" href="#snappy.verify.exceptions.CuspDevelopmentType" title="Permalink to this definition"></a></dt>
1517
- <dd><p>A base class indicating that there was a failure to find a consistent
1518
- assignment of side lengths to the Euclidean Horotriangles to form a
1519
- Euclidean Horotorus for a cusp.</p>
1520
- </dd></dl>
1521
-
1522
- <dl class="py exception">
1523
- <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspEquationExactVerifyError">
1524
- <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="Permalink to this definition"></a></dt>
1525
- <dd><p>Exception for failed verification of a polynomial cusp gluing equation
1526
- using exact arithmetics.</p>
1527
- </dd></dl>
1528
-
1529
- <dl class="py exception">
1530
- <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspEquationLogLiftNumericalVerifyError">
1531
- <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="Permalink to this definition"></a></dt>
1532
- <dd><p>Exception for failed numerical verification that a logarithmic cusp
1533
- equation has error bound by epsilon.</p>
1534
- </dd></dl>
1535
-
1536
- <dl class="py class">
1537
- <dt class="sig sig-object py" id="snappy.verify.exceptions.CuspEquationType">
1538
- <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="Permalink to this definition"></a></dt>
1539
- <dd><p>A base class indicating that a cusp gluing equation (involving the
1540
- shapes) failed.</p>
1541
- </dd></dl>
1542
-
1543
- <dl class="py exception">
1544
- <dt class="sig sig-object py" id="snappy.verify.exceptions.EdgeEquationExactVerifyError">
1545
- <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="Permalink to this definition"></a></dt>
1546
- <dd><p>Exception for failed verification of a polynomial edge equation
1547
- using exact arithmetics.</p>
1548
- </dd></dl>
1549
-
1550
- <dl class="py exception">
1551
- <dt class="sig sig-object py" id="snappy.verify.exceptions.EdgeEquationLogLiftNumericalVerifyError">
1552
- <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="Permalink to this definition"></a></dt>
1553
- <dd><p>Exception for failed numerical verification that a logarithmic edge
1554
- equation has error bound by epsilon.</p>
1555
- </dd></dl>
1556
-
1557
- <dl class="py class">
1558
- <dt class="sig sig-object py" id="snappy.verify.exceptions.EdgeEquationType">
1559
- <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="Permalink to this definition"></a></dt>
1560
- <dd><p>A base class indicating that an edge equation could not be verified.</p>
1561
- </dd></dl>
1562
-
1563
- <dl class="py class">
1564
- <dt class="sig sig-object py" id="snappy.verify.exceptions.EquationType">
1565
- <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="Permalink to this definition"></a></dt>
1566
- <dd><p>A base class to derive subclasses which indicate what kind of
1567
- equation failed to be verified.</p>
1568
- </dd></dl>
1569
-
1570
- <dl class="py exception">
1571
- <dt class="sig sig-object py" id="snappy.verify.exceptions.ExactVerifyError">
1572
- <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="Permalink to this definition"></a></dt>
1573
- <dd><p>The base for all exceptions resulting from a failed verification of an
1574
- equation using exact arithmetics.</p>
1575
- </dd></dl>
1576
-
1577
- <dl class="py exception">
1578
- <dt class="sig sig-object py" id="snappy.verify.exceptions.InequalityNumericalVerifyError">
1579
- <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="Permalink to this definition"></a></dt>
1580
- <dd><p>The base for all exceptions resulting from a failed numerical
1581
- verification of an inequality (typically by interval arithmetics).</p>
1582
- </dd></dl>
1583
-
1584
- <dl class="py exception">
1585
- <dt class="sig sig-object py" id="snappy.verify.exceptions.IsZeroExactVerifyError">
1586
- <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="Permalink to this definition"></a></dt>
1587
- <dd><p>The base for all exceptions resulting from verifying that a desired
1588
- quantity is zero using exact arithmetics.</p>
1589
- </dd></dl>
1590
-
1591
- <dl class="py exception">
1592
- <dt class="sig sig-object py" id="snappy.verify.exceptions.LogLiftNumericalVerifyError">
1593
- <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="Permalink to this definition"></a></dt>
1594
- <dd><p>To verify a logarithmic gluing equation, the verify module will usually
1595
- first verify the corresponding polynomial gluing equation.
1596
- This means that the logarithmic gluing equation will be fulfilled up
1597
- to a multiple of 2 Pi I.
1598
- It then computes the logarithms and numerically checks that the result
1599
- is close (by some epsilon) to the right value. Because we already know
1600
- that the difference is a multiple of 2 Pi I, checking closeness is enough.</p>
1601
- <p>This exception is supposed to be raised if the polynomial gluing equations
1602
- have passed but checking the logarithmic equation is epsilon-close has
1603
- failed.</p>
1604
- </dd></dl>
1605
-
1606
- <dl class="py exception">
1607
- <dt class="sig sig-object py" id="snappy.verify.exceptions.NumericalVerifyError">
1608
- <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="Permalink to this definition"></a></dt>
1609
- <dd><p>The base for all exceptions resulting from a failed numerical
1610
- verification of an equality (using some epsilon) or inequality
1611
- (typically by interval arithmetics).</p>
1612
- </dd></dl>
1613
-
1614
- <dl class="py exception">
1615
- <dt class="sig sig-object py" id="snappy.verify.exceptions.ShapePositiveImaginaryPartNumericalVerifyError">
1616
- <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="Permalink to this definition"></a></dt>
1617
- <dd><p>Failed numerical verification of a shape having positive imaginary part.</p>
1618
- </dd></dl>
1619
-
1620
- <dl class="py class">
1621
- <dt class="sig sig-object py" id="snappy.verify.exceptions.ShapeType">
1622
- <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="Permalink to this definition"></a></dt>
1623
- <dd><p>Base class for failed verification of legal shapes.</p>
1624
- </dd></dl>
1625
-
1626
- <dl class="py exception">
1627
- <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltInequalityNumericalVerifyError">
1628
- <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="Permalink to this definition"></a></dt>
1629
- <dd><p>Numerically verifying that a tilt is negative has failed.</p>
1630
- </dd></dl>
1631
-
1632
- <dl class="py exception">
1633
- <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltIsZeroExactVerifyError">
1634
- <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="Permalink to this definition"></a></dt>
1635
- <dd><p>Verifying that a tilt is zero has failed using exact arithmetic.</p>
1636
- </dd></dl>
1637
-
1638
- <dl class="py exception">
1639
- <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltProvenPositiveNumericalVerifyError">
1640
- <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="Permalink to this definition"></a></dt>
1641
- <dd><p>Numerically verifying that a tilt is negative has not only failed, we
1642
- proved that the tilt is positive and thus that this cannot be a
1643
- proto-canonical triangulation.</p>
1644
- </dd></dl>
1645
-
1646
- <dl class="py class">
1647
- <dt class="sig sig-object py" id="snappy.verify.exceptions.TiltType">
1648
- <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="Permalink to this definition"></a></dt>
1649
- <dd><p>A base class relating to tilts.</p>
1650
- </dd></dl>
1651
-
1652
- <dl class="py exception">
1653
- <dt class="sig sig-object py" id="snappy.verify.exceptions.VerifyErrorBase">
1654
- <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="Permalink to this definition"></a></dt>
1655
- <dd><p>The base for all exceptions related to verification.</p>
1656
- </dd></dl>
1657
-
1658
- </section>
1659
- </section>
1660
-
1661
-
1662
- </div>
1663
- </div>
1664
- <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
1665
- <a href="verify_canon.html" class="btn btn-neutral float-left" title="Canonical retriangulation and isometry signature" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
1666
- <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>
1667
- </div>
1668
-
1669
- <hr/>
1670
-
1671
- <div role="contentinfo">
1672
- <p>&#169; Copyright 2009-2023, by Marc Culler, Nathan Dunfield, Matthias Goerner, Jeffrey Weeks and others.</p>
1673
- </div>
1674
-
1675
- Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
1676
- <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
1677
- provided by <a href="https://readthedocs.org">Read the Docs</a>.
1678
-
1679
-
1680
- </footer>
1681
- </div>
1682
- </div>
1683
- </section>
1684
- </div>
1685
- <script>
1686
- jQuery(function () {
1687
- SphinxRtdTheme.Navigation.enable(true);
1688
- });
1689
- </script>
1690
-
1691
- </body>
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>
1692
1235
  </html>