snappy 3.1.1__cp311-cp311-win_amd64.whl → 3.2__cp311-cp311-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.cp311-win_amd64.pyd +0 -0
  2. snappy/SnapPy.cp311-win_amd64.pyd +0 -0
  3. snappy/SnapPyHP.cp311-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 -75
  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 -183
  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 +113 -84
  271. snappy/twister/main.py +1 -7
  272. snappy/twister/twister_core.cp311-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.1.dist-info → snappy-3.2.dist-info}/METADATA +26 -11
  301. snappy-3.2.dist-info/RECORD +503 -0
  302. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
  303. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
  304. snappy/__pycache__/__init__.cpython-311.pyc +0 -0
  305. snappy/__pycache__/browser.cpython-311.pyc +0 -0
  306. snappy/__pycache__/cache.cpython-311.pyc +0 -0
  307. snappy/__pycache__/database.cpython-311.pyc +0 -0
  308. snappy/__pycache__/db_utilities.cpython-311.pyc +0 -0
  309. snappy/__pycache__/decorated_isosig.cpython-311.pyc +0 -0
  310. snappy/__pycache__/exceptions.cpython-311.pyc +0 -0
  311. snappy/__pycache__/export_stl.cpython-311.pyc +0 -0
  312. snappy/__pycache__/filedialog.cpython-311.pyc +0 -0
  313. snappy/__pycache__/gui.cpython-311.pyc +0 -0
  314. snappy/__pycache__/horoviewer.cpython-311.pyc +0 -0
  315. snappy/__pycache__/math_basics.cpython-311.pyc +0 -0
  316. snappy/__pycache__/matrix.cpython-311.pyc +0 -0
  317. snappy/__pycache__/number.cpython-311.pyc +0 -0
  318. snappy/__pycache__/numeric_output_checker.cpython-311.pyc +0 -0
  319. snappy/__pycache__/pari.cpython-311.pyc +0 -0
  320. snappy/__pycache__/polyviewer.cpython-311.pyc +0 -0
  321. snappy/__pycache__/sage_helper.cpython-311.pyc +0 -0
  322. snappy/__pycache__/version.cpython-311.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-311.pyc +0 -0
  331. snappy/drilling/__pycache__/constants.cpython-311.pyc +0 -0
  332. snappy/drilling/__pycache__/crush.cpython-311.pyc +0 -0
  333. snappy/drilling/__pycache__/cusps.cpython-311.pyc +0 -0
  334. snappy/drilling/__pycache__/debug.cpython-311.pyc +0 -0
  335. snappy/drilling/__pycache__/epsilons.cpython-311.pyc +0 -0
  336. snappy/drilling/__pycache__/exceptions.cpython-311.pyc +0 -0
  337. snappy/drilling/__pycache__/fixed_points.cpython-311.pyc +0 -0
  338. snappy/drilling/__pycache__/geodesic_info.cpython-311.pyc +0 -0
  339. snappy/drilling/__pycache__/geodesic_tube.cpython-311.pyc +0 -0
  340. snappy/drilling/__pycache__/geometric_structure.cpython-311.pyc +0 -0
  341. snappy/drilling/__pycache__/line.cpython-311.pyc +0 -0
  342. snappy/drilling/__pycache__/moves.cpython-311.pyc +0 -0
  343. snappy/drilling/__pycache__/peripheral_curves.cpython-311.pyc +0 -0
  344. snappy/drilling/__pycache__/perturb.cpython-311.pyc +0 -0
  345. snappy/drilling/__pycache__/quotient_space.cpython-311.pyc +0 -0
  346. snappy/drilling/__pycache__/spatial_dict.cpython-311.pyc +0 -0
  347. snappy/drilling/__pycache__/subdivide.cpython-311.pyc +0 -0
  348. snappy/drilling/__pycache__/tracing.cpython-311.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-311.pyc +0 -0
  355. snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-311.pyc +0 -0
  356. snappy/exterior_to_link/__pycache__/exceptions.cpython-311.pyc +0 -0
  357. snappy/exterior_to_link/__pycache__/hyp_utils.cpython-311.pyc +0 -0
  358. snappy/exterior_to_link/__pycache__/link_projection.cpython-311.pyc +0 -0
  359. snappy/exterior_to_link/__pycache__/main.cpython-311.pyc +0 -0
  360. snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-311.pyc +0 -0
  361. snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-311.pyc +0 -0
  362. snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-311.pyc +0 -0
  363. snappy/exterior_to_link/__pycache__/pl_utils.cpython-311.pyc +0 -0
  364. snappy/exterior_to_link/__pycache__/put_in_S3.cpython-311.pyc +0 -0
  365. snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-311.pyc +0 -0
  366. snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-311.pyc +0 -0
  367. snappy/exterior_to_link/__pycache__/stored_moves.cpython-311.pyc +0 -0
  368. snappy/hyperboloid/__pycache__/__init__.cpython-311.pyc +0 -0
  369. snappy/manifolds/__pycache__/__init__.cpython-311.pyc +0 -0
  370. snappy/ptolemy/__pycache__/__init__.cpython-311.pyc +0 -0
  371. snappy/ptolemy/__pycache__/component.cpython-311.pyc +0 -0
  372. snappy/ptolemy/__pycache__/coordinates.cpython-311.pyc +0 -0
  373. snappy/ptolemy/__pycache__/fieldExtensions.cpython-311.pyc +0 -0
  374. snappy/ptolemy/__pycache__/findLoops.cpython-311.pyc +0 -0
  375. snappy/ptolemy/__pycache__/homology.cpython-311.pyc +0 -0
  376. snappy/ptolemy/__pycache__/manifoldMethods.cpython-311.pyc +0 -0
  377. snappy/ptolemy/__pycache__/matrix.cpython-311.pyc +0 -0
  378. snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-311.pyc +0 -0
  379. snappy/ptolemy/__pycache__/polynomial.cpython-311.pyc +0 -0
  380. snappy/ptolemy/__pycache__/processComponents.cpython-311.pyc +0 -0
  381. snappy/ptolemy/__pycache__/processFileBase.cpython-311.pyc +0 -0
  382. snappy/ptolemy/__pycache__/processFileDispatch.cpython-311.pyc +0 -0
  383. snappy/ptolemy/__pycache__/processMagmaFile.cpython-311.pyc +0 -0
  384. snappy/ptolemy/__pycache__/processRurFile.cpython-311.pyc +0 -0
  385. snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-311.pyc +0 -0
  386. snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-311.pyc +0 -0
  387. snappy/ptolemy/__pycache__/ptolemyVariety.cpython-311.pyc +0 -0
  388. snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-311.pyc +0 -0
  389. snappy/ptolemy/__pycache__/rur.cpython-311.pyc +0 -0
  390. snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-311.pyc +0 -0
  391. snappy/ptolemy/__pycache__/utilities.cpython-311.pyc +0 -0
  392. snappy/snap/__pycache__/__init__.cpython-311.pyc +0 -0
  393. snappy/snap/__pycache__/character_varieties.cpython-311.pyc +0 -0
  394. snappy/snap/__pycache__/fundamental_polyhedron.cpython-311.pyc +0 -0
  395. snappy/snap/__pycache__/interval_reps.cpython-311.pyc +0 -0
  396. snappy/snap/__pycache__/kernel_structures.cpython-311.pyc +0 -0
  397. snappy/snap/__pycache__/mcomplex_base.cpython-311.pyc +0 -0
  398. snappy/snap/__pycache__/nsagetools.cpython-311.pyc +0 -0
  399. snappy/snap/__pycache__/polished_reps.cpython-311.pyc +0 -0
  400. snappy/snap/__pycache__/shapes.cpython-311.pyc +0 -0
  401. snappy/snap/__pycache__/slice_obs_HKL.cpython-311.pyc +0 -0
  402. snappy/snap/__pycache__/utilities.cpython-311.pyc +0 -0
  403. snappy/snap/peripheral/__pycache__/__init__.cpython-311.pyc +0 -0
  404. snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-311.pyc +0 -0
  405. snappy/snap/peripheral/__pycache__/link.cpython-311.pyc +0 -0
  406. snappy/snap/peripheral/__pycache__/peripheral.cpython-311.pyc +0 -0
  407. snappy/snap/peripheral/__pycache__/surface.cpython-311.pyc +0 -0
  408. snappy/snap/t3mlite/__pycache__/__init__.cpython-311.pyc +0 -0
  409. snappy/snap/t3mlite/__pycache__/arrow.cpython-311.pyc +0 -0
  410. snappy/snap/t3mlite/__pycache__/corner.cpython-311.pyc +0 -0
  411. snappy/snap/t3mlite/__pycache__/edge.cpython-311.pyc +0 -0
  412. snappy/snap/t3mlite/__pycache__/face.cpython-311.pyc +0 -0
  413. snappy/snap/t3mlite/__pycache__/files.cpython-311.pyc +0 -0
  414. snappy/snap/t3mlite/__pycache__/homology.cpython-311.pyc +0 -0
  415. snappy/snap/t3mlite/__pycache__/linalg.cpython-311.pyc +0 -0
  416. snappy/snap/t3mlite/__pycache__/mcomplex.cpython-311.pyc +0 -0
  417. snappy/snap/t3mlite/__pycache__/perm4.cpython-311.pyc +0 -0
  418. snappy/snap/t3mlite/__pycache__/simplex.cpython-311.pyc +0 -0
  419. snappy/snap/t3mlite/__pycache__/spun.cpython-311.pyc +0 -0
  420. snappy/snap/t3mlite/__pycache__/surface.cpython-311.pyc +0 -0
  421. snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-311.pyc +0 -0
  422. snappy/snap/t3mlite/__pycache__/vertex.cpython-311.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-311.pyc +0 -0
  442. snappy/twister/__pycache__/main.cpython-311.pyc +0 -0
  443. snappy/upper_halfspace/__pycache__/__init__.cpython-311.pyc +0 -0
  444. snappy/upper_halfspace/__pycache__/ideal_point.cpython-311.pyc +0 -0
  445. snappy/verify/__pycache__/__init__.cpython-311.pyc +0 -0
  446. snappy/verify/__pycache__/cuspCrossSection.cpython-311.pyc +0 -0
  447. snappy/verify/__pycache__/cuspTranslations.cpython-311.pyc +0 -0
  448. snappy/verify/__pycache__/cusp_areas.cpython-311.pyc +0 -0
  449. snappy/verify/__pycache__/cusp_shapes.cpython-311.pyc +0 -0
  450. snappy/verify/__pycache__/exceptions.cpython-311.pyc +0 -0
  451. snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-311.pyc +0 -0
  452. snappy/verify/__pycache__/interval_tree.cpython-311.pyc +0 -0
  453. snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-311.pyc +0 -0
  454. snappy/verify/__pycache__/realAlgebra.cpython-311.pyc +0 -0
  455. snappy/verify/__pycache__/shapes.cpython-311.pyc +0 -0
  456. snappy/verify/__pycache__/short_slopes.cpython-311.pyc +0 -0
  457. snappy/verify/__pycache__/squareExtensions.cpython-311.pyc +0 -0
  458. snappy/verify/__pycache__/verifyCanonical.cpython-311.pyc +0 -0
  459. snappy/verify/__pycache__/verifyHyperbolicity.cpython-311.pyc +0 -0
  460. snappy/verify/__pycache__/volume.cpython-311.pyc +0 -0
  461. snappy/verify/complex_volume/__pycache__/__init__.cpython-311.pyc +0 -0
  462. snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-311.pyc +0 -0
  463. snappy/verify/complex_volume/__pycache__/closed.cpython-311.pyc +0 -0
  464. snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-311.pyc +0 -0
  465. snappy/verify/complex_volume/__pycache__/cusped.cpython-311.pyc +0 -0
  466. snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-311.pyc +0 -0
  467. snappy/verify/cuspCrossSection.py +0 -1422
  468. snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-311.pyc +0 -0
  469. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-311.pyc +0 -0
  470. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-311.pyc +0 -0
  471. snappy/verify/upper_halfspace/__pycache__/__init__.cpython-311.pyc +0 -0
  472. snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-311.pyc +0 -0
  473. snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-311.pyc +0 -0
  474. snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-311.pyc +0 -0
  475. snappy-3.1.1.dist-info/RECORD +0 -575
  476. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
@@ -1,1147 +1,1144 @@
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>Classes &mdash; SnapPy 3.1.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 async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
22
- <script src="_static/js/theme.js"></script>
23
- <link rel="index" title="Index" href="genindex.html" />
24
- <link rel="search" title="Search" href="search.html" />
25
- <link rel="next" title="News" href="news.html" />
26
- <link rel="prev" title="Step-by-step examples: Part 4" href="ptolemy_examples4.html" />
27
- </head>
28
-
29
- <body class="wy-body-for-nav">
30
- <div class="wy-grid-for-nav">
31
- <nav data-toggle="wy-nav-shift" class="wy-nav-side">
32
- <div class="wy-side-scroll">
33
- <div class="wy-side-nav-search" >
34
-
35
-
36
-
37
- <a href="index.html" class="icon icon-home">
38
- SnapPy
39
- <img src="_static/SnapPy-horizontal-128.png" class="logo" alt="Logo"/>
40
- </a>
41
- <div class="version">
42
- 3.1.1
43
- </div>
44
- <div role="search">
45
- <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
46
- <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
47
- <input type="hidden" name="check_keywords" value="yes" />
48
- <input type="hidden" name="area" value="default" />
49
- </form>
50
- </div>
51
- </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
52
- <ul class="current">
53
- <li class="toctree-l1"><a class="reference internal" href="installing.html">Installing SnapPy</a></li>
54
- <li class="toctree-l1"><a class="reference internal" href="screenshots.html">Screenshots: SnapPy in action</a></li>
55
- <li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
56
- <li class="toctree-l1"><a class="reference internal" href="snappy.html">The snappy module and its classes</a></li>
57
- <li class="toctree-l1"><a class="reference internal" href="plink.html">Using SnapPy’s link editor</a></li>
58
- <li class="toctree-l1"><a class="reference internal" href="spherogram.html">Links: planar diagrams and invariants</a></li>
59
- <li class="toctree-l1"><a class="reference internal" href="snap.html">Number theory of hyperbolic 3-manifolds</a></li>
60
- <li class="toctree-l1"><a class="reference internal" href="verify.html">Verified computations</a></li>
61
- <li class="toctree-l1 current"><a class="reference internal" href="other.html">Other components</a><ul class="current">
62
- <li class="toctree-l2 current"><a class="reference internal" href="other.html#ptolemy-module">Ptolemy module</a><ul class="current">
63
- <li class="toctree-l3 current"><a class="reference internal" href="ptolemy.html">The ptolemy module</a><ul class="current">
64
- <li class="toctree-l4"><a class="reference internal" href="ptolemy.html#what-is-the-ptolemy-module">What is the ptolemy module?</a></li>
65
- <li class="toctree-l4 current"><a class="reference internal" href="ptolemy.html#documentation">Documentation</a><ul class="current">
66
- <li class="toctree-l5"><a class="reference internal" href="ptolemy_prelim.html">Mathematical preliminaries</a></li>
67
- <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples1.html">Step-by-step examples: Part 1</a></li>
68
- <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples2.html">Step-by-step examples: Part 2</a></li>
69
- <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples3.html">Step-by-step examples: Part 3</a></li>
70
- <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples4.html">Step-by-step examples: Part 4</a></li>
71
- <li class="toctree-l5 current"><a class="current reference internal" href="#">Classes</a></li>
72
- </ul>
73
- </li>
74
- </ul>
75
- </li>
76
- </ul>
77
- </li>
78
- <li class="toctree-l2"><a class="reference internal" href="other.html#twister">Twister</a></li>
79
- </ul>
80
- </li>
81
- <li class="toctree-l1"><a class="reference internal" href="news.html">News</a></li>
82
- <li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
83
- <li class="toctree-l1"><a class="reference internal" href="bugs.html">Reporting bugs and other problems</a></li>
84
- <li class="toctree-l1"><a class="reference internal" href="todo.html">To Do List</a></li>
85
- <li class="toctree-l1"><a class="reference internal" href="development.html">Development Basics</a></li>
86
- </ul>
87
-
88
- </div>
89
- </div>
90
- </nav>
91
-
92
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
93
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
94
- <a href="index.html">SnapPy</a>
95
- </nav>
96
-
97
- <div class="wy-nav-content">
98
- <div class="rst-content">
99
- <div role="navigation" aria-label="Page navigation">
100
- <ul class="wy-breadcrumbs">
101
- <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
102
- <li class="breadcrumb-item"><a href="other.html">Other components</a></li>
103
- <li class="breadcrumb-item"><a href="ptolemy.html">The ptolemy module</a></li>
104
- <li class="breadcrumb-item active">Classes</li>
105
- <li class="wy-breadcrumbs-aside">
106
- </li>
107
- </ul>
108
- <hr/>
109
- </div>
110
- <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
111
- <div itemprop="articleBody">
112
-
113
- <section id="classes">
114
- <h1>Classes<a class="headerlink" href="#classes" title="Permalink to this heading"></a></h1>
115
- <section id="ptolemyvariety">
116
- <h2>PtolemyVariety<a class="headerlink" href="#ptolemyvariety" title="Permalink to this heading"></a></h2>
117
- <dl class="py class">
118
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety">
119
- <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.ptolemyVariety.</span></span><span class="sig-name descname"><span class="pre">PtolemyVariety</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">N</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">obstruction_class</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simplify</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eliminate_fixed_ptolemys</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety" title="Permalink to this definition"></a></dt>
120
- <dd><p>Holds a reduced Ptolemy variety.</p>
121
- <p>=== Examples ===</p>
122
- <p>To generate such a variety, call:</p>
123
- <div class="doctest 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>
124
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;4_1&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
125
- </pre></div>
126
- </div>
127
- <p>Show the equations and variables:</p>
128
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">p</span><span class="o">.</span><span class="n">equations</span><span class="p">:</span> <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
129
- <span class="go">- c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2</span>
130
- <span class="go">c_0011_0 * c_0101_0 - c_0011_0^2 - c_0101_0^2</span>
131
- <span class="go">- 1 + c_0011_0</span>
132
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">variables</span>
133
- <span class="go">[&#39;c_0011_0&#39;, &#39;c_0101_0&#39;]</span>
134
- </pre></div>
135
- </div>
136
- <p>Show as an ideal (sage object):</p>
137
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">ideal</span>
138
- <span class="go">Ideal (-c_0011_0^2 + c_0011_0*c_0101_0 + c_0101_0^2, -c_0011_0^2 - c_0011_0*c_0101_0 + c_0101_0^2, c_0011_0 - 1) of Multivariate Polynomial Ring in c_0011_0, c_0101_0 over Rational Field</span>
139
- <span class="go">(skip doctest because example only works in sage and not plain python)</span>
140
- </pre></div>
141
- </div>
142
- <p>Produce magma input:</p>
143
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">s</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">to_magma</span><span class="p">()</span>
144
- <span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;ring and ideal&#39;</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
145
- <span class="go">R&lt;c_0011_0, c_0101_0&gt; := PolynomialRing(RationalField(), 2, &quot;grevlex&quot;);</span>
146
- <span class="go">MyIdeal := ideal&lt;R |</span>
147
- <span class="go"> - c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2,</span>
148
- <span class="go"> ...</span>
149
- </pre></div>
150
- </div>
151
- <p>Call <code class="docutils literal notranslate"><span class="pre">p.compute_solutions()</span></code> to automatically compute solutions!</p>
152
- <p>Show canonical representatives:</p>
153
- <p>(The Ptolemy coordinates c_0110_0 and c_0101_0 are identified, this
154
- information is needed to recover all Ptolemy coordinates from the solutions
155
- of a simplified Ptolemy variety. The information is also packaged into a
156
- python section by py_eval_variable_dict().)</p>
157
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">canonical_representative</span><span class="p">[</span><span class="s2">&quot;c_0110_0&quot;</span><span class="p">]</span>
158
- <span class="go">(1, 0, &#39;c_0101_0&#39;)</span>
159
- </pre></div>
160
- </div>
161
- <dl class="py method">
162
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.compute_decomposition">
163
- <span class="sig-name descname"><span class="pre">compute_decomposition</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</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">memory_limit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">750000000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</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">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.compute_decomposition" title="Permalink to this definition"></a></dt>
164
- <dd><p>Starts an engine such as magma to compute the
165
- radical decomposition of the Ptolemy variety.</p>
166
- <p>If started in sage, uses sage, otherwise, uses magma.</p>
167
- <p>=== Arguments ===</p>
168
- <p>engineengine to use, currently, only support magma and sage
169
- memory_limit — maximal allowed memory in bytes
170
- directory — location for input and output files, temporary directory used if not specified
171
- verbose print extra information</p>
172
- </dd></dl>
173
-
174
- <dl class="py method">
175
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.compute_solutions">
176
- <span class="sig-name descname"><span class="pre">compute_solutions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</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">numerical</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_limit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">750000000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</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">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.ptolemy.ptolemyVariety.PtolemyVariety.compute_solutions" title="Permalink to this definition"></a></dt>
177
- <dd><p>Starts an engine such as magma to compute the
178
- radical decomposition of the ideal and computes exact solutions.</p>
179
- <p>If started in sage, uses sage, otherwise, uses magma.</p>
180
- <p>=== Arguments ===</p>
181
- <p>engineengine to use, currently, only support magma and sage
182
- numericalget numerical solutions from magma instead of exact ones
183
- memory_limit — maximal allowed memory in bytes
184
- directory — location for input and output files, temporary directory used if not specified
185
- verbose print extra information</p>
186
- </dd></dl>
187
-
188
- <dl class="py method">
189
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.degree_to_shapes">
190
- <span class="sig-name descname"><span class="pre">degree_to_shapes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.degree_to_shapes" title="Permalink to this definition"></a></dt>
191
- <dd><p>In general, there can be d different solutions to the (reduced) Ptolemy
192
- variety for each solution to the gluing equations (with peripheral
193
- equations). This method computes d which is also the number of elements
194
- in H^1(Mhat; Z/N) where Mhat is the non-manifold cell comples obtained
195
- by gluing together the tetrahedra as non-ideal tetrahedra.</p>
196
- <p>For example, the Ptolemy variety for m009 has 4 points but there are
197
- only 2 distinct boundary-unipotent PSL(2,C) representations.
198
- Thus the following call returns 2 = 4 / 2</p>
199
- <div class="doctest 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>
200
- <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m009&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</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">degree_to_shapes</span><span class="p">()</span>
201
- <span class="go">2</span>
202
- </pre></div>
203
- </div>
204
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m010&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</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">degree_to_shapes</span><span class="p">()</span>
205
- <span class="go">2</span>
206
- <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m011&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</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">degree_to_shapes</span><span class="p">()</span>
207
- <span class="go">1</span>
208
- </pre></div>
209
- </div>
210
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m009&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">degree_to_shapes</span><span class="p">()</span>
211
- <span class="go">1</span>
212
- <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m010&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">degree_to_shapes</span><span class="p">()</span>
213
- <span class="go">3</span>
214
- <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m011&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">degree_to_shapes</span><span class="p">()</span>
215
- <span class="go">1</span>
216
- </pre></div>
217
- </div>
218
- </dd></dl>
219
-
220
- <dl class="py method">
221
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.filename_base">
222
- <span class="sig-name descname"><span class="pre">filename_base</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.filename_base" title="Permalink to this definition"></a></dt>
223
- <dd><p>Preferred filename base for writing out this Ptolemy variety</p>
224
- <div class="doctest 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="o">*</span>
225
- <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="s1">&#39;4_1&#39;</span><span class="p">)</span>
226
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
227
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">filename_base</span><span class="p">()</span>
228
- <span class="go">&#39;4_1__sl2_c1&#39;</span>
229
- </pre></div>
230
- </div>
231
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
232
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">filename_base</span><span class="p">()</span>
233
- <span class="go">&#39;4_1__sl2_c0&#39;</span>
234
- </pre></div>
235
- </div>
236
- </dd></dl>
237
-
238
- <dl class="py method">
239
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.py_eval_section">
240
- <span class="sig-name descname"><span class="pre">py_eval_section</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.py_eval_section" title="Permalink to this definition"></a></dt>
241
- <dd><p>Returns a string that can be evaluated in python and contains extra
242
- information needed to recover solutions from a simplified Ptolemy
243
- variety.</p>
244
- <div class="doctest 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><span class="p">,</span> <span class="n">pari</span>
245
- <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="s1">&#39;4_1&#39;</span><span class="p">)</span>
246
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
247
- </pre></div>
248
- </div>
249
- <p>Get extra information</p>
250
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">eval_section</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">py_eval_section</span><span class="p">()</span>
251
- <span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">eval_section</span><span class="p">)</span>
252
- <span class="go">{&#39;variable_dict&#39; :</span>
253
- <span class="go"> (lambda d: {</span>
254
- <span class="go"> ...</span>
255
- </pre></div>
256
- </div>
257
- <p>Turn it into a python object by evaluation.</p>
258
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span> <span class="o">=</span> <span class="nb">eval</span><span class="p">(</span><span class="n">eval_section</span><span class="p">)</span>
259
- </pre></div>
260
- </div>
261
- <p>Access the function that expands a solution to the simplified
262
- Ptolemy variety to a full solution.</p>
263
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">variable_dict</span> <span class="o">=</span> <span class="n">obj</span><span class="p">[</span><span class="s1">&#39;variable_dict&#39;</span><span class="p">]</span>
264
- </pre></div>
265
- </div>
266
- <p>Setup a solution and expand it to a full solution, ‘1’ must map to 1</p>
267
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">simplified_solution</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;c_0101_0&#39;</span> <span class="p">:</span> <span class="n">pari</span><span class="p">(</span><span class="s1">&#39;0.5 - 0.866025403784439*I&#39;</span><span class="p">),</span> <span class="s1">&#39;1&#39;</span> <span class="p">:</span> <span class="n">pari</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="s1">&#39;c_0011_0&#39;</span> <span class="p">:</span> <span class="n">pari</span><span class="p">(</span><span class="mi">1</span><span class="p">)}</span>
268
- <span class="gp">&gt;&gt;&gt; </span><span class="n">full_solution</span> <span class="o">=</span> <span class="n">variable_dict</span><span class="p">(</span><span class="n">simplified_solution</span><span class="p">)</span>
269
- </pre></div>
270
- </div>
271
- <p>Full solution is a dictionary with a key for every Ptolemy coordinate</p>
272
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">full_solution</span><span class="p">[</span><span class="s1">&#39;c_1010_1&#39;</span><span class="p">]</span>
273
- <span class="go">1</span>
274
- <span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">tet</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">2</span><span class="p">):</span>
275
- <span class="gp">... </span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">utilities</span><span class="o">.</span><span class="n">quadruples_with_fixed_sum_iterator</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">skipVertices</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
276
- <span class="gp">... </span> <span class="n">c</span> <span class="o">=</span> <span class="s2">&quot;c_</span><span class="si">%d%d%d%d</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">i</span> <span class="o">+</span> <span class="s2">&quot;_</span><span class="si">%d</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">tet</span>
277
- <span class="gp">... </span> <span class="k">assert</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">full_solution</span>
278
- </pre></div>
279
- </div>
280
- </dd></dl>
281
-
282
- <dl class="py method">
283
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma">
284
- <span class="sig-name descname"><span class="pre">to_magma</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma" title="Permalink to this definition"></a></dt>
285
- <dd><p>Returns a string with the ideal that can be used as input for magma.</p>
286
- <p>The advanced user can provide a template string to write own magma
287
- code to process the equations.</p>
288
- <div class="doctest 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="o">*</span>
289
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;4_1&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
290
- </pre></div>
291
- </div>
292
- <p>Magma input to compute radical Decomposition
293
- &gt;&gt;&gt; s = p.to_magma()
294
- &gt;&gt;&gt; print(s.split(‘ring and ideal’)[1].strip()) #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
295
- R&lt;c_0011_0, c_0101_0&gt; := PolynomialRing(RationalField(), 2, “grevlex”);
296
- MyIdeal := ideal&lt;R | - c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2,
297
-
298
- &gt;&gt;&gt; “RadicalDecomposition” in p.to_magma()
299
- True</p>
300
- </dd></dl>
301
-
302
- <dl class="py method">
303
- <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma_file">
304
- <span class="sig-name descname"><span class="pre">to_magma_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma_file" title="Permalink to this definition"></a></dt>
305
- <dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">tempfile</span>
306
- <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>
307
- <span class="gp">&gt;&gt;&gt; </span><span class="n">handle</span><span class="p">,</span> <span class="n">name</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">mkstemp</span><span class="p">()</span>
308
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;4_1&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
309
- <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">to_magma_file</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
310
- <span class="gp">&gt;&gt;&gt; </span><span class="n">os</span><span class="o">.</span><span class="n">close</span><span class="p">(</span><span class="n">handle</span><span class="p">);</span> <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
311
- </pre></div>
312
- </div>
313
- </dd></dl>
314
-
315
- </dd></dl>
316
-
317
- </section>
318
- <section id="ptolemycoordinates">
319
- <h2>PtolemyCoordinates<a class="headerlink" href="#ptolemycoordinates" title="Permalink to this heading"></a></h2>
320
- <dl class="py class">
321
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates">
322
- <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.coordinates.</span></span><span class="sig-name descname"><span class="pre">PtolemyCoordinates</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">is_numerical=True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">py_eval_section=None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">manifold_thunk=&lt;function</span> <span class="pre">PtolemyCoordinates.&lt;lambda&gt;&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">non_trivial_generalized_obstruction_class=False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates" title="Permalink to this definition"></a></dt>
323
- <dd><p>Represents a solution of a Ptolemy variety as python dictionary.</p>
324
- <p>=== Examples ===</p>
325
- <p>Construct solution from magma output:</p>
326
- <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
327
- <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>
328
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
329
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
330
- </pre></div>
331
- </div>
332
- <p>Access a Ptolemy coordinate:</p>
333
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="p">[</span><span class="s1">&#39;c_2100_0&#39;</span><span class="p">]</span>
334
- <span class="go">1</span>
335
- </pre></div>
336
- </div>
337
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">number_field</span><span class="p">()</span>
338
- <span class="go">x^2 + x + 1</span>
339
- </pre></div>
340
- </div>
341
- <p>Solution is always 0 dimensional:</p>
342
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">dimension</span>
343
- <span class="go">0</span>
344
- </pre></div>
345
- </div>
346
- <p>Check that it is really a solution, exactly:</p>
347
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">()</span>
348
- </pre></div>
349
- </div>
350
- <p>If the solution was not created through the ptolemy module
351
- and thus not associated to a manifold, we need to explicitly
352
- specify one:</p>
353
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">myDict</span> <span class="o">=</span> <span class="p">{}</span>
354
- <span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">solution</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
355
- <span class="gp">... </span> <span class="n">myDict</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
356
- <span class="gp">&gt;&gt;&gt; </span><span class="n">mysolution</span> <span class="o">=</span> <span class="n">PtolemyCoordinates</span><span class="p">(</span><span class="n">myDict</span><span class="p">)</span>
357
- <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;4_1&quot;</span><span class="p">)</span>
358
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">)</span>
359
- </pre></div>
360
- </div>
361
- <p>Turn into (Galois conjugate) numerical solutions:</p>
362
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">old_precision</span> <span class="o">=</span> <span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># with high precision</span>
363
- <span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solutions</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">numerical</span><span class="p">()</span>
364
- </pre></div>
365
- </div>
366
- <p>Check that it is a solution, numerically:</p>
367
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solutions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">,</span> <span class="mf">1e-80</span><span class="p">)</span>
368
- <span class="gp">&gt;&gt;&gt; </span><span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="n">old_precision</span><span class="p">)</span> <span class="c1"># reset pari engine</span>
369
- <span class="go">100</span>
370
- </pre></div>
371
- </div>
372
- <p>Compute cross ratios from the Ptolemy coordinates (cross ratios
373
- according to SnapPy convention, see help(solution.cross_ratios):</p>
374
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">cross</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">cross_ratios</span><span class="p">()</span>
375
- <span class="gp">&gt;&gt;&gt; </span><span class="n">cross</span><span class="p">[</span><span class="s1">&#39;z_0001_0&#39;</span><span class="p">]</span>
376
- <span class="go">Mod(-x, x^2 + x + 1)</span>
377
- </pre></div>
378
- </div>
379
- <p>Compute volumes:</p>
380
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">volumes</span> <span class="o">=</span> <span class="n">cross</span><span class="o">.</span><span class="n">volume_numerical</span><span class="p">()</span>
381
- </pre></div>
382
- </div>
383
- <p>Check that volume is 4 times the geometric one:</p>
384
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">volume</span> <span class="o">=</span> <span class="n">volumes</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">abs</span><span class="p">()</span>
385
- <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">=</span> <span class="nb">abs</span><span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">M</span><span class="o">.</span><span class="n">volume</span><span class="p">()</span> <span class="o">-</span> <span class="n">volume</span><span class="p">)</span>
386
- <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">&lt;</span> <span class="mf">1e-9</span>
387
- <span class="go">True</span>
388
- </pre></div>
389
- </div>
390
- <p>Compute flattenings:</p>
391
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">flattenings_numerical</span><span class="p">()</span>
392
- </pre></div>
393
- </div>
394
- <p>Compute complex volumes:</p>
395
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">cvols</span> <span class="o">=</span> <span class="p">[</span><span class="n">flattening</span><span class="o">.</span><span class="n">complex_volume</span><span class="p">()</span> <span class="k">for</span> <span class="n">flattening</span> <span class="ow">in</span> <span class="n">flattenings</span><span class="p">]</span>
396
- <span class="gp">&gt;&gt;&gt; </span><span class="n">volume</span> <span class="o">=</span> <span class="n">cvols</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">real</span><span class="p">()</span><span class="o">.</span><span class="n">abs</span><span class="p">()</span>
397
- <span class="gp">&gt;&gt;&gt; </span><span class="n">chernSimons</span> <span class="o">=</span> <span class="n">cvols</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">imag</span><span class="p">()</span>
398
- <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">=</span> <span class="nb">abs</span><span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">M</span><span class="o">.</span><span class="n">volume</span><span class="p">()</span> <span class="o">-</span> <span class="n">volume</span><span class="p">)</span>
399
- <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">&lt;</span> <span class="mf">1e-9</span>
400
- <span class="go">True</span>
401
- </pre></div>
402
- </div>
403
- <div class="doctest 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">pari</span>
404
- <span class="gp">&gt;&gt;&gt; </span><span class="n">normalized</span> <span class="o">=</span> <span class="n">chernSimons</span> <span class="o">*</span> <span class="mi">6</span> <span class="o">/</span> <span class="p">(</span><span class="n">pari</span><span class="p">(</span><span class="s1">&#39;Pi&#39;</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
405
- </pre></div>
406
- </div>
407
- <p>Check that Chern Simons is zero up to 6 torsion:</p>
408
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">normalized</span> <span class="o">-</span> <span class="n">normalized</span><span class="o">.</span><span class="n">round</span><span class="p">()</span> <span class="o">&lt;</span> <span class="mf">1e-9</span>
409
- <span class="go">True</span>
410
- </pre></div>
411
- </div>
412
- <dl class="py method">
413
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.N">
414
- <span class="sig-name descname"><span class="pre">N</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.N" title="Permalink to this definition"></a></dt>
415
- <dd><p>Get the <em>N</em> where these coordinates are for SL/PSL(<em>N</em>, <strong>C</strong>)-representations.</p>
416
- </dd></dl>
417
-
418
- <dl class="py method">
419
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.check_against_manifold">
420
- <span class="sig-name descname"><span class="pre">check_against_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</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">epsilon</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.ptolemy.coordinates.PtolemyCoordinates.check_against_manifold" title="Permalink to this definition"></a></dt>
421
- <dd><p>Checks that the given solution really is a solution to the Ptolemy
422
- variety of a manifold. See help(ptolemy.PtolemyCoordinates) for
423
- more example.</p>
424
- <p>=== Arguments ===</p>
425
- <ul class="simple">
426
- <li><p>M — manifold to check this for</p></li>
427
- <li><p>epsilon — maximal allowed error when checking the relations, use
428
- None for exact comparison.</p></li>
429
- </ul>
430
- </dd></dl>
431
-
432
- <dl class="py method">
433
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.complex_volume_numerical">
434
- <span class="sig-name descname"><span class="pre">complex_volume_numerical</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">drop_negative_vols</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">with_modulo</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.ptolemy.coordinates.PtolemyCoordinates.complex_volume_numerical" title="Permalink to this definition"></a></dt>
435
- <dd><p>Turn into (Galois conjugate) numerical solutions and compute complex
436
- volumes. If already numerical, return the volume.</p>
437
- <p>Complex volume is defined up to i*pi**2/6.</p>
438
- <p>See numerical(). If drop_negative_vols = True is given as optional
439
- argument, only return complex volumes with non-negative real part.</p>
440
- </dd></dl>
441
-
442
- <dl class="py method">
443
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios">
444
- <span class="sig-name descname"><span class="pre">cross_ratios</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios" title="Permalink to this definition"></a></dt>
445
- <dd><p>Compute cross ratios from Ptolemy coordinates. The cross ratios are
446
- according to the SnapPy convention, so we have:</p>
447
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zp</span><span class="p">,</span> <span class="n">zp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zpp</span><span class="p">,</span> <span class="n">zpp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">z</span>
448
- </pre></div>
449
- </div>
450
- <p>where:</p>
451
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">01</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s1</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1010</span> <span class="o">*</span> <span class="n">c_0101</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span>
452
- <span class="n">zp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">02</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="o">-</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s2</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span>
453
- <span class="n">zpp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">03</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s3</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_0101</span> <span class="o">*</span> <span class="n">c_1010</span><span class="p">)</span><span class="o">.</span>
454
- </pre></div>
455
- </div>
456
- <p>Note that this is different from the convention used in
457
- Garoufalidis, Goerner, Zickert:
458
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
459
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
460
- <p>Take an exact solution:</p>
461
- <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
462
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
463
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
464
- </pre></div>
465
- </div>
466
- <p>Turn into cross Ratios:</p>
467
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">cross_ratios</span><span class="p">()</span>
468
- </pre></div>
469
- </div>
470
- <p>Get a cross ratio:</p>
471
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zp_0010_0&#39;</span><span class="p">]</span>
472
- <span class="go">Mod(-x, x^2 + x + 1)</span>
473
- </pre></div>
474
- </div>
475
- <p>Check the relationship between cross ratios:</p>
476
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;z_0010_0&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zp_0010_0&#39;</span><span class="p">]</span>
477
- <span class="go">True</span>
478
- </pre></div>
479
- </div>
480
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zp_0010_0&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zpp_0010_0&#39;</span><span class="p">]</span>
481
- <span class="go">True</span>
482
- </pre></div>
483
- </div>
484
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zpp_0010_0&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;z_0010_0&#39;</span><span class="p">]</span>
485
- <span class="go">True</span>
486
- </pre></div>
487
- </div>
488
- <p>Get information about what one can do with cross ratios</p>
489
- </dd></dl>
490
-
491
- <dl class="py method">
492
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios_numerical">
493
- <span class="sig-name descname"><span class="pre">cross_ratios_numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios_numerical" title="Permalink to this definition"></a></dt>
494
- <dd><p>Turn exact solutions into numerical and then compute cross ratios.
495
- See numerical() and cross_ratios().</p>
496
- </dd></dl>
497
-
498
- <dl class="py method">
499
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.diamond_coordinate">
500
- <span class="sig-name descname"><span class="pre">diamond_coordinate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.diamond_coordinate" title="Permalink to this definition"></a></dt>
501
- <dd><p>Returns the diamond coordinate for tetrahedron with index tet
502
- for the face with vertices v0, v1, v2 (integers between 0 and 3) and
503
- integral point pt (quadruple adding up to N-2).</p>
504
- <p>See Definition 10.1:
505
- Garoufalidis, Goerner, Zickert:
506
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
507
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
508
- </dd></dl>
509
-
510
- <dl class="py method">
511
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.evaluate_word">
512
- <span class="sig-name descname"><span class="pre">evaluate_word</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">word</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">G</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.ptolemy.coordinates.PtolemyCoordinates.evaluate_word" title="Permalink to this definition"></a></dt>
513
- <dd><p>Given a word in the generators of the fundamental group,
514
- compute the corresponding matrix. By default, these are the
515
- generators of the unsimplified presentation of the fundamental
516
- group. An optional SnapPy fundamental group can be given if the
517
- words are in generators of a different presentation, e.g.,
518
- c.evaluate_word(word, M.fundamental_group(True)) to
519
- evaluate a word in the simplified presentation returned by
520
- M.fundamental_group(True).</p>
521
- <p>For now, the matrix is returned as list of lists.</p>
522
- </dd></dl>
523
-
524
- <dl class="py method">
525
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.flattenings_numerical">
526
- <span class="sig-name descname"><span class="pre">flattenings_numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.flattenings_numerical" title="Permalink to this definition"></a></dt>
527
- <dd><p>Turn into numerical solutions and compute flattenings, see
528
- help(snappy.ptolemy.coordinates.Flattenings)
529
- Also see numerical()</p>
530
- <p>Get Ptolemy coordinates.</p>
531
- <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
532
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
533
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
534
- </pre></div>
535
- </div>
536
- <p>Compute a numerical solution</p>
537
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">flattenings_numerical</span><span class="p">()</span>
538
- </pre></div>
539
- </div>
540
- <p>Get more information with help(flattenings[0])</p>
541
- </dd></dl>
542
-
543
- <dl class="py method">
544
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.get_manifold">
545
- <span class="sig-name descname"><span class="pre">get_manifold</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.get_manifold" title="Permalink to this definition"></a></dt>
546
- <dd><p>Get the manifold for which this structure represents a solution
547
- to the Ptolemy variety.</p>
548
- </dd></dl>
549
-
550
- <dl class="py method">
551
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.has_obstruction">
552
- <span class="sig-name descname"><span class="pre">has_obstruction</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.has_obstruction" title="Permalink to this definition"></a></dt>
553
- <dd><p>Whether the Ptolemy variety has legacy obstruction class that
554
- modifies the Ptolemy relation to</p>
555
- </dd></dl>
556
-
557
- <dl class="py method">
558
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.is_geometric">
559
- <span class="sig-name descname"><span class="pre">is_geometric</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-06</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.is_geometric" title="Permalink to this definition"></a></dt>
560
- <dd><p>Returns true if all shapes corresponding to this solution have positive
561
- imaginary part.</p>
562
- <p>If the solutions are exact, it returns true if one of the corresponding
563
- numerical solutions is geometric.</p>
564
- <p>An optional epsilon can be given. An imaginary part of a shape is
565
- considered positive if it is larger than this epsilon.</p>
566
- </dd></dl>
567
-
568
- <dl class="py method">
569
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.long_edge">
570
- <span class="sig-name descname"><span class="pre">long_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.long_edge" title="Permalink to this definition"></a></dt>
571
- <dd><p>The matrix that labels a long edge from v0 to v1 (integers between 0
572
- and 3) of a (doubly) truncated simplex corresponding to an ideal
573
- tetrahedron with index tet.</p>
574
- <p>This matrix was labeled alpha^{v0v1v2} (v2 does not matter for non
575
- double-truncated simplex) in Figure 18 of
576
- Garoufalidis, Goerner, Zickert:
577
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
578
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
579
- <p>It is computed using equation 10.4. Note that the ratio coordinate
580
- is different from the definition in the paper (see ratio_coordinate).</p>
581
- <p>The resulting matrix is given as a python list of lists.</p>
582
- </dd></dl>
583
-
584
- <dl class="py method">
585
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.middle_edge">
586
- <span class="sig-name descname"><span class="pre">middle_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.middle_edge" title="Permalink to this definition"></a></dt>
587
- <dd><p>The matrix that labels a middle edge on the face v0, v1, v2 (integers
588
- between 0 and 3) of a doubly truncated simplex (or a short edge of the
589
- truncated simplex) corresponding to an ideal tetrahedron with index
590
- tet.</p>
591
- <p>This matrix was labeled beta^{v0v1v2} in Figure 18 of
592
- Garoufalidis, Goerner, Zickert:
593
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
594
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
595
- <p>It is computed using equation 10.4.</p>
596
- <p>The resulting matrix is given as a python list of lists.</p>
597
- </dd></dl>
598
-
599
- <dl class="py method">
600
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_and_simplify_terms_in_RUR">
601
- <span class="sig-name descname"><span class="pre">multiply_and_simplify_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_and_simplify_terms_in_RUR" title="Permalink to this definition"></a></dt>
602
- <dd><p>If a Ptolemy coordinate is given as Rational Univariate Representation
603
- with numerator and denominator being a product, multiply the terms,
604
- reduce the fraction and return the result.</p>
605
- <p>See multiply_and_simplify_terms of RUR.</p>
606
- <p>This loses information about how the numerator and denominator are
607
- factorised.</p>
608
- </dd></dl>
609
-
610
- <dl class="py method">
611
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_terms_in_RUR">
612
- <span class="sig-name descname"><span class="pre">multiply_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_terms_in_RUR" title="Permalink to this definition"></a></dt>
613
- <dd><p>If a Ptolemy coordinate is given as Rational Univariate Representation
614
- with numerator and denominator being a product, multiply the terms and
615
- return the result.</p>
616
- <p>See multiply_terms of RUR.</p>
617
- <p>This loses information about how the numerator and denominator are
618
- factorised.</p>
619
- </dd></dl>
620
-
621
- <dl class="py method">
622
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.num_tetrahedra">
623
- <span class="sig-name descname"><span class="pre">num_tetrahedra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.num_tetrahedra" title="Permalink to this definition"></a></dt>
624
- <dd><p>The number of tetrahedra for which we have Ptolemy coordinates.</p>
625
- </dd></dl>
626
-
627
- <dl class="py method">
628
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.number_field">
629
- <span class="sig-name descname"><span class="pre">number_field</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.number_field" title="Permalink to this definition"></a></dt>
630
- <dd><p>For an exact solution, return the number_field spanned by the
631
- Ptolemy coordinates. If number_field is Q, return None.</p>
632
- </dd></dl>
633
-
634
- <dl class="py method">
635
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.numerical">
636
- <span class="sig-name descname"><span class="pre">numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.numerical" title="Permalink to this definition"></a></dt>
637
- <dd><p>Turn exact solutions into numerical solutions using pari.</p>
638
- <p>Take an exact solution:</p>
639
- <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
640
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
641
- <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
642
- </pre></div>
643
- </div>
644
- <p>Turn into a numerical solution:</p>
645
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">old_precision</span> <span class="o">=</span> <span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># with high precision</span>
646
- <span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solutions</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">numerical</span><span class="p">()</span>
647
- <span class="gp">&gt;&gt;&gt; </span><span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="n">old_precision</span><span class="p">)</span> <span class="c1"># reset pari engine</span>
648
- <span class="go">100</span>
649
- </pre></div>
650
- </div>
651
- <p>Pick one of the Galois conjugates:</p>
652
- <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solution</span> <span class="o">=</span> <span class="n">numerical_solutions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
653
- <span class="gp">&gt;&gt;&gt; </span><span class="n">value</span> <span class="o">=</span> <span class="n">numerical_solution</span><span class="p">[</span><span class="s1">&#39;c_1110_0&#39;</span><span class="p">]</span>
654
- </pre></div>
655
- </div>
656
- </dd></dl>
657
-
658
- <dl class="py method">
659
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.ratio_coordinate">
660
- <span class="sig-name descname"><span class="pre">ratio_coordinate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.ratio_coordinate" title="Permalink to this definition"></a></dt>
661
- <dd><p>Returns the ratio coordinate for tetrahedron with index tet
662
- for the edge from v0 to v1 (integers between 0 and 3) and integral
663
- point pt (quadruple adding up N-1) on the edge.</p>
664
- <p>See Definition 10.2:
665
- Garoufalidis, Goerner, Zickert:
666
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
667
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
668
- <p>Note that this definition turned out to have the wrong sign. Multiply
669
- the result by -1 if v1 &lt; v0 and N is even.</p>
670
- </dd></dl>
671
-
672
- <dl class="py method">
673
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.short_edge">
674
- <span class="sig-name descname"><span class="pre">short_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.short_edge" title="Permalink to this definition"></a></dt>
675
- <dd><p>Returns the identity. This is because we can think of the matrices
676
- given by Ptolemy coordinates of living on truncated simplices which
677
- can be though of as doubly truncated simplices where all short edges
678
- are collapsed, hence labeled by the identity.</p>
679
- <p>See equation 10.4 in
680
- Garoufalidis, Goerner, Zickert:
681
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
682
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
683
- </dd></dl>
684
-
685
- <dl class="py method">
686
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.to_PUR">
687
- <span class="sig-name descname"><span class="pre">to_PUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.to_PUR" title="Permalink to this definition"></a></dt>
688
- <dd><p>If any Ptolemy coordinates are given as Rational Univariate
689
- Representation, convert them to Polynomial Univariate Representation and
690
- return the result.</p>
691
- <p>See to_PUR of RUR.</p>
692
- <p>This conversion might lead to very large coefficients.</p>
693
- </dd></dl>
694
-
695
- <dl class="py method">
696
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.volume_numerical">
697
- <span class="sig-name descname"><span class="pre">volume_numerical</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">drop_negative_vols</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.ptolemy.coordinates.PtolemyCoordinates.volume_numerical" title="Permalink to this definition"></a></dt>
698
- <dd><p>Turn into (Galois conjugate) numerical solutions and compute volumes.
699
- If already numerical, only return the one volume.
700
- See numerical().</p>
701
- <p>If drop_negative_vols = True is given as optional argument,
702
- only return non-negative volumes.</p>
703
- </dd></dl>
704
-
705
- </dd></dl>
706
-
707
- </section>
708
- <section id="crossratios">
709
- <h2>CrossRatios<a class="headerlink" href="#crossratios" title="Permalink to this heading"></a></h2>
710
- <dl class="py class">
711
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios">
712
- <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.coordinates.</span></span><span class="sig-name descname"><span class="pre">CrossRatios</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">is_numerical</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">manifold_thunk</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.ptolemy.coordinates.CrossRatios" title="Permalink to this definition"></a></dt>
713
- <dd><p>Represents assigned shape parameters/cross ratios as
714
- dictionary. The cross ratios are according to SnapPy convention, so we
715
- have:</p>
716
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zp</span><span class="p">,</span> <span class="n">zp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zpp</span><span class="p">,</span> <span class="n">zpp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">z</span>
717
- </pre></div>
718
- </div>
719
- <p>where:</p>
720
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">01</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s1</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1010</span> <span class="o">*</span> <span class="n">c_0101</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span>
721
- <span class="n">zp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">02</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s2</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span>
722
- <span class="n">zpp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">03</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s3</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_0101</span> <span class="o">*</span> <span class="n">c_1010</span><span class="p">)</span><span class="o">.</span>
723
- </pre></div>
724
- </div>
725
- <p>Note that this is different from the convention used in
726
- Garoufalidis, Goerner, Zickert:
727
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
728
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
729
- <dl class="py method">
730
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.N">
731
- <span class="sig-name descname"><span class="pre">N</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.N" title="Permalink to this definition"></a></dt>
732
- <dd><p>Get the N such that these cross ratios are for
733
- SL/PSL(N,C)-representations.</p>
734
- </dd></dl>
735
-
736
- <dl class="py method">
737
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.check_against_manifold">
738
- <span class="sig-name descname"><span class="pre">check_against_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</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">epsilon</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.ptolemy.coordinates.CrossRatios.check_against_manifold" title="Permalink to this definition"></a></dt>
739
- <dd><p>Checks that the given solution really is a solution to the PGL(N,C) gluing
740
- equations of a manifold. Usage similar to check_against_manifold of
741
- PtolemyCoordinates. See help(ptolemy.PtolemtyCoordinates) for example.</p>
742
- <p>=== Arguments ===</p>
743
- <p>M — manifold to check this for
744
- epsilon — maximal allowed error when checking the relations, use
745
- None for exact comparison.</p>
746
- </dd></dl>
747
-
748
- <dl class="py method">
749
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.evaluate_word">
750
- <span class="sig-name descname"><span class="pre">evaluate_word</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">word</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">G</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.ptolemy.coordinates.CrossRatios.evaluate_word" title="Permalink to this definition"></a></dt>
751
- <dd><p>Given a word in the generators of the fundamental group,
752
- compute the corresponding matrix. By default, these are the
753
- generators of the unsimplified presentation of the fundamental
754
- group. An optional SnapPy fundamental group can be given if the
755
- words are in generators of a different presentation, e.g.,
756
- c.evaluate_word(word, M.fundamental_group(True)) to
757
- evaluate a word in the simplified presentation returned by
758
- M.fundamental_group(True).</p>
759
- <p>For now, the matrix is returned as list of lists.</p>
760
- </dd></dl>
761
-
762
- <dl class="py method">
763
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.from_snappy_manifold">
764
- <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_snappy_manifold</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">dec_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">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">intervals</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.ptolemy.coordinates.CrossRatios.from_snappy_manifold" title="Permalink to this definition"></a></dt>
765
- <dd><p>Constructs an assignment of shape parameters/cross ratios using
766
- the tetrahehdra_shapes method of a given SnapPy manifold. The optional
767
- parameters are the same as that of tetrahedra_shapes.</p>
768
- </dd></dl>
769
-
770
- <dl class="py method">
771
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.get_manifold">
772
- <span class="sig-name descname"><span class="pre">get_manifold</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.get_manifold" title="Permalink to this definition"></a></dt>
773
- <dd><p>Get the manifold for which this structure represents a solution
774
- to the gluing equations.</p>
775
- </dd></dl>
776
-
777
- <dl class="py method">
778
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.induced_representation">
779
- <span class="sig-name descname"><span class="pre">induced_representation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">N</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.induced_representation" title="Permalink to this definition"></a></dt>
780
- <dd><p>Given a PSL(2,C) representation constructs the induced representation
781
- for the given N.
782
- The induced representation is in SL(N,C) if N is odd and
783
- SL(N,C) / {+1,-1} if N is even and is described in the Introduction of
784
- Garoufalidis, Thurston, Zickert
785
- The Complex Volume of SL(n,C)-Representations of 3-Manifolds
786
- <a class="reference external" href="http://arxiv.org/abs/1111.2828">http://arxiv.org/abs/1111.2828</a></p>
787
- <p>There is a canonical group homomorphism SL(2,C)-&gt;SL(N,C) coming from
788
- the the natural SL(2,C)-action on the vector space Sym^{N-1}(C^2).
789
- This homomorphisms decends to a homomorphism from PSL(2,C) if one
790
- divides the right side by {+1,-1} when N is even.
791
- Composing a representation with this homomorphism gives the induced
792
- representation.</p>
793
- </dd></dl>
794
-
795
- <dl class="py method">
796
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_geometric">
797
- <span class="sig-name descname"><span class="pre">is_geometric</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-06</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.is_geometric" title="Permalink to this definition"></a></dt>
798
- <dd><p>Returns true if all shapes corresponding to this solution have positive
799
- imaginary part.</p>
800
- <p>If the solutions are exact, it returns true if one of the corresponding
801
- numerical solutions is geometric.</p>
802
- <p>An optional epsilon can be given. An imaginary part of a shape is
803
- considered positive if it is larger than this epsilon.</p>
804
- </dd></dl>
805
-
806
- <dl class="py method">
807
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_induced_from_psl2">
808
- <span class="sig-name descname"><span class="pre">is_induced_from_psl2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</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.ptolemy.coordinates.CrossRatios.is_induced_from_psl2" title="Permalink to this definition"></a></dt>
809
- <dd><p>For each simplex and each edges, checks that all cross ratios of that
810
- simplex that are parallel to that each are the same (maximal absolute
811
- difference is the epsilon given as argument).
812
- This means that the corresponding representation is induced by a
813
- PSL(2,C) representation.</p>
814
- </dd></dl>
815
-
816
- <dl class="py method">
817
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_pu_2_1_representation">
818
- <span class="sig-name descname"><span class="pre">is_pu_2_1_representation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">epsilon2</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.ptolemy.coordinates.CrossRatios.is_pu_2_1_representation" title="Permalink to this definition"></a></dt>
819
- <dd><p>Returns True if the representation is also a
820
- PU(2,1)-representation. This uses Proposition 3.5 and the
821
- remark following that proposition in <a class="reference internal" href="#fkr2013" id="id1"><span>[FKR2013]</span></a>.</p>
822
- <p>If a condition given in that Proposition is violated, the method returns
823
- an object whose Boolean value is still False and that indicates which condition
824
- was violated. Thus, this method can still be used in <code class="docutils literal notranslate"><span class="pre">if</span></code> statements.</p>
825
- <p>The method tests the following complex equalities and inequalities:</p>
826
- <ul class="simple">
827
- <li><p>the three complex equations given in (3.5.1) of <a class="reference internal" href="#fkr2013" id="id2"><span>[FKR2013]</span></a>.</p></li>
828
- <li><p>the inequality z<sub>ijl</sub> <span class="math notranslate nohighlight">\(\\not=\)</span> -1.</p></li>
829
- </ul>
830
- <p><strong>Remark:</strong> It does not check whether all z<sub>ij</sub> * z<sub>ji</sub> are real or
831
- not as these are still valid CR configurations, see the remark following
832
- Proposition 3.5.</p>
833
- <p>The user has to supply an epsilon: an equality/inequality is considered
834
- to be true if and only if the absolute value | LHS - RHS | of difference between the
835
- left and right hand side is less/greater than epsilon.</p>
836
- <p>The user can supply another parameter, epsilon2. If any | LHS - RHS | is in
837
- the interval [epsilon, epsilon2], this method fails with an exception
838
- as the value of | LHS - RHS | is an ambiguous interval where
839
- it is unclear whether inequality fails to hold because it truly does
840
- hold or just because of numerical noise.</p>
841
- </dd></dl>
842
-
843
- <dl class="py method">
844
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_real">
845
- <span class="sig-name descname"><span class="pre">is_real</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.is_real" title="Permalink to this definition"></a></dt>
846
- <dd><p>Returns True if all cross ratios are real (have absolute imaginary
847
- part &lt; epsilon where epsilon is given as argument).
848
- This means that the corresponding representation is in PSL(N,R).</p>
849
- </dd></dl>
850
-
851
- <dl class="py method">
852
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.long_edge">
853
- <span class="sig-name descname"><span class="pre">long_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.long_edge" title="Permalink to this definition"></a></dt>
854
- <dd><p>The matrix that labels a long edge starting at vertex (v0, v1, v2)
855
- of a doubly truncated simplex corresponding to the ideal tetrahedron
856
- with index tet.</p>
857
- <p>This matrix was labeled alpha^{v0v1v2} in Figure 18 of
858
- Garoufalidis, Goerner, Zickert:
859
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
860
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
861
- <p>It is computed using equation 10.22.</p>
862
- <p>The resulting matrix is given as a python list of lists.</p>
863
- </dd></dl>
864
-
865
- <dl class="py method">
866
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.middle_edge">
867
- <span class="sig-name descname"><span class="pre">middle_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.middle_edge" title="Permalink to this definition"></a></dt>
868
- <dd><p>The matrix that labels a middle edge starting at vertex (v0, v1, v2)
869
- of a doubly truncated simplex corresponding to the ideal tetrahedron
870
- with index tet.</p>
871
- <p>This matrix was labeled beta^{v0v1v2} in Figure 18 of
872
- Garoufalidis, Goerner, Zickert:
873
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
874
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
875
- <p>It is computed using equation 10.22.</p>
876
- <p>The resulting matrix is given as a python list of lists.</p>
877
- </dd></dl>
878
-
879
- <dl class="py method">
880
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.multiply_and_simplify_terms_in_RUR">
881
- <span class="sig-name descname"><span class="pre">multiply_and_simplify_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.multiply_and_simplify_terms_in_RUR" title="Permalink to this definition"></a></dt>
882
- <dd><p>If a cross ratio is given as Rational Univariate Representation
883
- with numerator and denominator being a product, multiply the terms,
884
- reduce the fraction and return the result.</p>
885
- <p>See multiply_and_simplify_terms of RUR.</p>
886
- <p>This loses information about how the numerator and denominator are
887
- factorised.</p>
888
- </dd></dl>
889
-
890
- <dl class="py method">
891
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.multiply_terms_in_RUR">
892
- <span class="sig-name descname"><span class="pre">multiply_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.multiply_terms_in_RUR" title="Permalink to this definition"></a></dt>
893
- <dd><p>If a cross ratio is given as Rational Univariate Representation
894
- with numerator and denominator being a product, multiply the terms and
895
- return the result.</p>
896
- <p>See multiply_terms of RUR.</p>
897
- <p>This loses information about how the numerator and denominator are
898
- factorised.</p>
899
- </dd></dl>
900
-
901
- <dl class="py method">
902
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.num_tetrahedra">
903
- <span class="sig-name descname"><span class="pre">num_tetrahedra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.num_tetrahedra" title="Permalink to this definition"></a></dt>
904
- <dd><p>The number of tetrahedra for which we have cross ratios.</p>
905
- </dd></dl>
906
-
907
- <dl class="py method">
908
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.numerical">
909
- <span class="sig-name descname"><span class="pre">numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.numerical" title="Permalink to this definition"></a></dt>
910
- <dd><p>Turn exact solutions into numerical solutions using pari. Similar to
911
- numerical() of PtolemyCoordinates. See help(ptolemy.PtolemyCoordinates)
912
- for example.</p>
913
- </dd></dl>
914
-
915
- <dl class="py method">
916
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.short_edge">
917
- <span class="sig-name descname"><span class="pre">short_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.short_edge" title="Permalink to this definition"></a></dt>
918
- <dd><p>The matrix that labels a long edge starting at vertex (v0, v1, v2)
919
- of a doubly truncated simplex corresponding to the ideal tetrahedron
920
- with index tet.</p>
921
- <p>This matrix was labeled gamma^{v0v1v2} in Figure 18 of
922
- Garoufalidis, Goerner, Zickert:
923
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
924
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
925
- <p>It is computed using equation 10.22.</p>
926
- <p>The resulting matrix is given as a python list of lists.</p>
927
- </dd></dl>
928
-
929
- <dl class="py method">
930
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.to_PUR">
931
- <span class="sig-name descname"><span class="pre">to_PUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.to_PUR" title="Permalink to this definition"></a></dt>
932
- <dd><p>If any Ptolemy coordinates are given as Rational Univariate
933
- Representation, convert them to Polynomial Univariate Representation and
934
- return the result.</p>
935
- <p>See to_PUR of RUR.</p>
936
- <p>This conversion might lead to very large coefficients.</p>
937
- </dd></dl>
938
-
939
- <dl class="py method">
940
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.volume_numerical">
941
- <span class="sig-name descname"><span class="pre">volume_numerical</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">drop_negative_vols</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.ptolemy.coordinates.CrossRatios.volume_numerical" title="Permalink to this definition"></a></dt>
942
- <dd><p>Turn into (Galois conjugate) numerical solutions and compute volumes.
943
- If already numerical, only compute the one volume.
944
- See numerical().</p>
945
- <p>If drop_negative_vols = True is given as optional argument,
946
- only return non-negative volumes.</p>
947
- </dd></dl>
948
-
949
- <dl class="py method">
950
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.x_coordinate">
951
- <span class="sig-name descname"><span class="pre">x_coordinate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.x_coordinate" title="Permalink to this definition"></a></dt>
952
- <dd><p>Returns the X-coordinate for the tetrahedron with index tet
953
- at the point pt (quadruple of integers adding up to N).</p>
954
- <p>See Definition 10.9:
955
- Garoufalidis, Goerner, Zickert:
956
- Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
957
- <a class="reference external" href="http://arxiv.org/abs/1207.6711">http://arxiv.org/abs/1207.6711</a></p>
958
- </dd></dl>
959
-
960
- </dd></dl>
961
-
962
- </section>
963
- <section id="flattenings">
964
- <h2>Flattenings<a class="headerlink" href="#flattenings" title="Permalink to this heading"></a></h2>
965
- <dl class="py class">
966
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings">
967
- <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.coordinates.</span></span><span class="sig-name descname"><span class="pre">Flattenings</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">manifold_thunk=&lt;function</span> <span class="pre">Flattenings.&lt;lambda&gt;&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">evenN=2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings" title="Permalink to this definition"></a></dt>
968
- <dd><p>Represents a flattening assigned to each edge of a simplex as dictionary.</p>
969
- <p>We assign to each pair of parallel edges of each simplex a triple (w, z, p)
970
- such that:</p>
971
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">w</span> <span class="o">=</span> <span class="n">log</span><span class="p">(</span><span class="n">z</span><span class="p">)</span> <span class="o">+</span> <span class="n">p</span> <span class="o">*</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">*</span> <span class="n">i</span> <span class="o">/</span> <span class="n">N</span><span class="p">)</span> <span class="n">where</span> <span class="n">N</span> <span class="ow">is</span> <span class="n">fixed</span> <span class="ow">and</span> <span class="n">even</span><span class="o">.</span>
972
- </pre></div>
973
- </div>
974
- <p>For N = 2, the three triples belonging to a simplex form a combinatorial
975
- flattening (w0, w1, w2) as defined in Definition 3.1 in
976
- Walter D. Neumann, Extended Bloch group and the Cheeger-Chern-Simons class
977
- <a class="reference external" href="http://arxiv.org/abs/math.GT/0307092">http://arxiv.org/abs/math.GT/0307092</a></p>
978
- <p>For N &gt; 2, the three triples form a generalized combinatorial flattening
979
- (w0, w1, w2) that gives an element in the generalized Extended Bloch group
980
- which is the Extended Bloch group corresponding to the Riemann surface
981
- given by:</p>
982
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">u1</span> <span class="o">*</span> <span class="n">e</span><span class="o">^</span><span class="n">w0</span> <span class="o">+</span> <span class="n">u2</span> <span class="o">*</span> <span class="n">e</span><span class="o">^</span><span class="n">w1</span> <span class="o">=</span> <span class="mi">1</span>
983
- </pre></div>
984
- </div>
985
- <p>where u1^N = u2^N = 1.</p>
986
- <p>A representation in SL(n,C) and SL(n,C)/{+1,-1} with n even gives an element
987
- in the generalized Extended Bloch group for N = 2.
988
- A representation in PSL(n,C) with n even in the group for N = n.
989
- A representation in PSL(n,C) with n odd in the group for N = 2 * n.</p>
990
- <p>This work has not been published yet.</p>
991
- <p>If f is a flattening, then in the notation of Neumann, the value of:</p>
992
- <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">[</span><span class="s1">&#39;z_xxxx_y&#39;</span><span class="p">]</span> <span class="ow">is</span> <span class="p">(</span><span class="n">w0</span><span class="p">,</span> <span class="n">z</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
993
- <span class="n">f</span><span class="p">[</span><span class="s1">&#39;zp_xxxx_y&#39;</span><span class="p">]</span> <span class="ow">is</span> <span class="p">(</span><span class="n">w1</span><span class="p">,</span> <span class="n">z</span><span class="s1">&#39;, q)</span>
994
- <span class="n">f</span><span class="p">[</span><span class="s1">&#39;zpp_xxxx_y&#39;</span><span class="p">]</span> <span class="ow">is</span> <span class="p">(</span><span class="n">w2</span><span class="p">,</span> <span class="n">z</span><span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="n">r</span><span class="p">)</span><span class="o">.</span>
995
- </pre></div>
996
- </div>
997
- <dl class="py method">
998
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.N">
999
- <span class="sig-name descname"><span class="pre">N</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.N" title="Permalink to this definition"></a></dt>
1000
- <dd><p>Get the N such that these cross ratios are for
1001
- SL/PSL(N,C)-representations.</p>
1002
- </dd></dl>
1003
-
1004
- <dl class="py method">
1005
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.check_against_manifold">
1006
- <span class="sig-name descname"><span class="pre">check_against_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</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">epsilon</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.check_against_manifold" title="Permalink to this definition"></a></dt>
1007
- <dd><p>Checks that the flattening really is a solution to the logarithmic
1008
- PGL(N,C) gluing equations of a manifold. Usage similar to
1009
- check_against_manifold of Ptolemy Coordinates, see
1010
- help(ptolemy.Coordinates) for similar examples.</p>
1011
- <p>=== Arguments ===</p>
1012
- <p>M — manifold to check this for
1013
- epsilon maximal allowed error when checking the equations</p>
1014
- </dd></dl>
1015
-
1016
- <dl class="py method">
1017
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.complex_volume">
1018
- <span class="sig-name descname"><span class="pre">complex_volume</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">with_modulo</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.ptolemy.coordinates.Flattenings.complex_volume" title="Permalink to this definition"></a></dt>
1019
- <dd><p>Compute complex volume. The complex volume is defined only up to
1020
- some multiple of m where m = i * pi**2/6 for PSL(2,C) and SL(N,C)
1021
- and m = i * pi**2/18 for PSL(3,C).</p>
1022
- <p>When called with with_modulo = True, gives a pair
1023
- (volume, m)</p>
1024
- </dd></dl>
1025
-
1026
- <dl class="py method">
1027
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.from_tetrahedra_shapes_of_manifold">
1028
- <em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_tetrahedra_shapes_of_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.from_tetrahedra_shapes_of_manifold" title="Permalink to this definition"></a></dt>
1029
- <dd><p>Takes as argument a manifold and produces (weak) flattenings using
1030
- the tetrahedra_shapes of the manifold M.</p>
1031
- <div class="doctest 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>
1032
- <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;5_2&quot;</span><span class="p">)</span>
1033
- <span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span> <span class="o">=</span> <span class="n">Flattenings</span><span class="o">.</span><span class="n">from_tetrahedra_shapes_of_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">)</span>
1034
- <span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">)</span>
1035
- <span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">()</span>
1036
- </pre></div>
1037
- </div>
1038
- </dd></dl>
1039
-
1040
- <dl class="py method">
1041
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.get_manifold">
1042
- <span class="sig-name descname"><span class="pre">get_manifold</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.get_manifold" title="Permalink to this definition"></a></dt>
1043
- <dd><p>Get the manifold for which this structure represents a flattening.</p>
1044
- </dd></dl>
1045
-
1046
- <dl class="py method">
1047
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.get_order">
1048
- <span class="sig-name descname"><span class="pre">get_order</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.get_order" title="Permalink to this definition"></a></dt>
1049
- <dd><p>Returns the number N. This flattening represents an element in the
1050
- generalized Extended Bloch group for the Riemann surface given by
1051
- u1 * e^w0 + u2 * e^w1 = 1 where u1^N = u2^N = 1.</p>
1052
- </dd></dl>
1053
-
1054
- <dl class="py method">
1055
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.get_zpq_triple">
1056
- <span class="sig-name descname"><span class="pre">get_zpq_triple</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key_z</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.get_zpq_triple" title="Permalink to this definition"></a></dt>
1057
- <dd><p>Gives a flattening as triple [z;p,q] representing an element
1058
- in the generalized Extended Bloch group similar to the way the
1059
- triple [z;p,q] is used in Lemma 3.2 in
1060
- Walter D. Neumann, Extended Bloch group and the Cheeger-Chern-Simons class
1061
- <a class="reference external" href="http://arxiv.org/abs/math.GT/0307092">http://arxiv.org/abs/math.GT/0307092</a></p>
1062
- </dd></dl>
1063
-
1064
- <dl class="py method">
1065
- <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.num_tetrahedra">
1066
- <span class="sig-name descname"><span class="pre">num_tetrahedra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.num_tetrahedra" title="Permalink to this definition"></a></dt>
1067
- <dd><p>The number of tetrahedra for which we have cross ratios.</p>
1068
- </dd></dl>
1069
-
1070
- </dd></dl>
1071
-
1072
- </section>
1073
- <section id="nonzerodimensionalcomponent">
1074
- <h2>NonZeroDimensionalComponent<a class="headerlink" href="#nonzerodimensionalcomponent" title="Permalink to this heading"></a></h2>
1075
- <dl class="py class">
1076
- <dt class="sig sig-object py" id="snappy.ptolemy.component.NonZeroDimensionalComponent">
1077
- <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.component.</span></span><span class="sig-name descname"><span class="pre">NonZeroDimensionalComponent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">witnesses</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">dimension</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'unknown'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">free_variables</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">genus</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">p</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.ptolemy.component.NonZeroDimensionalComponent" title="Permalink to this definition"></a></dt>
1078
- <dd><p>Represents a non-zero dimensional component in the
1079
- Ptolemy variety. It is a list that can hold points sampled from that
1080
- component (witnesses).</p>
1081
- </dd></dl>
1082
-
1083
- </section>
1084
- <section id="other-functions">
1085
- <h2>Other functions<a class="headerlink" href="#other-functions" title="Permalink to this heading"></a></h2>
1086
- <dl class="py function">
1087
- <dt class="sig sig-object py" id="snappy.ptolemy.solutions_from_magma">
1088
- <span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.</span></span><span class="sig-name descname"><span class="pre">solutions_from_magma</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">output</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">numerical</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.ptolemy.solutions_from_magma" title="Permalink to this definition"></a></dt>
1089
- <dd><p>Obsolete, use processFileDispatch.parse_solutions instead.</p>
1090
- <p>Assumes the given string is the output of a magma computation, parses
1091
- it and returns a list of solutions.
1092
- A non-zero dimensional component of the variety is reported as
1093
- NonZeroDimensionalComponent.</p>
1094
- </dd></dl>
1095
-
1096
- <dl class="py function">
1097
- <dt class="sig sig-object py" id="snappy.ptolemy.solutions_from_magma_file">
1098
- <span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.</span></span><span class="sig-name descname"><span class="pre">solutions_from_magma_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">numerical</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.ptolemy.solutions_from_magma_file" title="Permalink to this definition"></a></dt>
1099
- <dd><p>Obsolete, use processFileDispatch.parse_solutions_from_file instead.</p>
1100
- <p>Reads the output from a magma computation from the file with the given
1101
- filename and returns a list of solutions. Also see solutions_from_magma.
1102
- A non-zero dimensional component of the variety is reported as
1103
- NonZeroDimensionalComponent.</p>
1104
- </dd></dl>
1105
-
1106
- <div role="list" class="citation-list">
1107
- <div class="citation" id="fkr2013" role="doc-biblioentry">
1108
- <span class="label"><span class="fn-bracket">[</span>FKR2013<span class="fn-bracket">]</span></span>
1109
- <span class="backrefs">(<a role="doc-backlink" href="#id1">1</a>,<a role="doc-backlink" href="#id2">2</a>)</span>
1110
- <p>Falbel, Koseleff, Rouillier: Representations of Fundamental Groups of 3-Manifolds into PGL(3,C): Exact Computations in Low Complexity, <a class="reference external" href="http://arxiv.org/abs/1307.6697">http://arxiv.org/abs/1307.6697</a></p>
1111
- </div>
1112
- </div>
1113
- </section>
1114
- </section>
1115
-
1116
-
1117
- </div>
1118
- </div>
1119
- <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
1120
- <a href="ptolemy_examples4.html" class="btn btn-neutral float-left" title="Step-by-step examples: Part 4" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
1121
- <a href="news.html" class="btn btn-neutral float-right" title="News" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
1122
- </div>
1123
-
1124
- <hr/>
1125
-
1126
- <div role="contentinfo">
1127
- <p>&#169; Copyright 2009-2023, by Marc Culler, Nathan Dunfield, Matthias Goerner, Jeffrey Weeks and others.</p>
1128
- </div>
1129
-
1130
- Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
1131
- <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
1132
- provided by <a href="https://readthedocs.org">Read the Docs</a>.
1133
-
1134
-
1135
- </footer>
1136
- </div>
1137
- </div>
1138
- </section>
1139
- </div>
1140
- <script>
1141
- jQuery(function () {
1142
- SphinxRtdTheme.Navigation.enable(true);
1143
- });
1144
- </script>
1145
-
1146
- </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>Classes &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 async="async" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
22
+ <script src="_static/js/theme.js"></script>
23
+ <link rel="index" title="Index" href="genindex.html" />
24
+ <link rel="search" title="Search" href="search.html" />
25
+ <link rel="next" title="News" href="news.html" />
26
+ <link rel="prev" title="Step-by-step examples: Part 4" href="ptolemy_examples4.html" />
27
+ </head>
28
+
29
+ <body class="wy-body-for-nav">
30
+ <div class="wy-grid-for-nav">
31
+ <nav data-toggle="wy-nav-shift" class="wy-nav-side">
32
+ <div class="wy-side-scroll">
33
+ <div class="wy-side-nav-search" >
34
+
35
+
36
+
37
+ <a href="index.html" class="icon icon-home">
38
+ SnapPy
39
+ <img src="_static/SnapPy-horizontal-128.png" class="logo" alt="Logo"/>
40
+ </a>
41
+ <div role="search">
42
+ <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
43
+ <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
44
+ <input type="hidden" name="check_keywords" value="yes" />
45
+ <input type="hidden" name="area" value="default" />
46
+ </form>
47
+ </div>
48
+ </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
49
+ <ul class="current">
50
+ <li class="toctree-l1"><a class="reference internal" href="installing.html">Installing SnapPy</a></li>
51
+ <li class="toctree-l1"><a class="reference internal" href="screenshots.html">Screenshots: SnapPy in action</a></li>
52
+ <li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
53
+ <li class="toctree-l1"><a class="reference internal" href="snappy.html">The snappy module and its classes</a></li>
54
+ <li class="toctree-l1"><a class="reference internal" href="plink.html">Using SnapPy’s link editor</a></li>
55
+ <li class="toctree-l1"><a class="reference internal" href="spherogram.html">Links: planar diagrams and invariants</a></li>
56
+ <li class="toctree-l1"><a class="reference internal" href="snap.html">Number theory of hyperbolic 3-manifolds</a></li>
57
+ <li class="toctree-l1"><a class="reference internal" href="verify.html">Verified computations</a></li>
58
+ <li class="toctree-l1 current"><a class="reference internal" href="other.html">Other components</a><ul class="current">
59
+ <li class="toctree-l2 current"><a class="reference internal" href="other.html#ptolemy-module">Ptolemy module</a><ul class="current">
60
+ <li class="toctree-l3 current"><a class="reference internal" href="ptolemy.html">The ptolemy module</a><ul class="current">
61
+ <li class="toctree-l4"><a class="reference internal" href="ptolemy.html#what-is-the-ptolemy-module">What is the ptolemy module?</a></li>
62
+ <li class="toctree-l4 current"><a class="reference internal" href="ptolemy.html#documentation">Documentation</a><ul class="current">
63
+ <li class="toctree-l5"><a class="reference internal" href="ptolemy_prelim.html">Mathematical preliminaries</a></li>
64
+ <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples1.html">Step-by-step examples: Part 1</a></li>
65
+ <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples2.html">Step-by-step examples: Part 2</a></li>
66
+ <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples3.html">Step-by-step examples: Part 3</a></li>
67
+ <li class="toctree-l5"><a class="reference internal" href="ptolemy_examples4.html">Step-by-step examples: Part 4</a></li>
68
+ <li class="toctree-l5 current"><a class="current reference internal" href="#">Classes</a></li>
69
+ </ul>
70
+ </li>
71
+ </ul>
72
+ </li>
73
+ </ul>
74
+ </li>
75
+ <li class="toctree-l2"><a class="reference internal" href="other.html#twister">Twister</a></li>
76
+ </ul>
77
+ </li>
78
+ <li class="toctree-l1"><a class="reference internal" href="news.html">News</a></li>
79
+ <li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
80
+ <li class="toctree-l1"><a class="reference internal" href="bugs.html">Reporting bugs and other problems</a></li>
81
+ <li class="toctree-l1"><a class="reference internal" href="todo.html">To Do List</a></li>
82
+ <li class="toctree-l1"><a class="reference internal" href="development.html">Development Basics</a></li>
83
+ </ul>
84
+
85
+ </div>
86
+ </div>
87
+ </nav>
88
+
89
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
90
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
91
+ <a href="index.html">SnapPy</a>
92
+ </nav>
93
+
94
+ <div class="wy-nav-content">
95
+ <div class="rst-content">
96
+ <div role="navigation" aria-label="Page navigation">
97
+ <ul class="wy-breadcrumbs">
98
+ <li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
99
+ <li class="breadcrumb-item"><a href="other.html">Other components</a></li>
100
+ <li class="breadcrumb-item"><a href="ptolemy.html">The ptolemy module</a></li>
101
+ <li class="breadcrumb-item active">Classes</li>
102
+ <li class="wy-breadcrumbs-aside">
103
+ </li>
104
+ </ul>
105
+ <hr/>
106
+ </div>
107
+ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
108
+ <div itemprop="articleBody">
109
+
110
+ <section id="classes">
111
+ <h1>Classes<a class="headerlink" href="#classes" title="Link to this heading"></a></h1>
112
+ <section id="ptolemyvariety">
113
+ <h2>PtolemyVariety<a class="headerlink" href="#ptolemyvariety" title="Link to this heading"></a></h2>
114
+ <dl class="py class">
115
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety">
116
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.ptolemyVariety.</span></span><span class="sig-name descname"><span class="pre">PtolemyVariety</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">N</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">obstruction_class</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simplify</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">eliminate_fixed_ptolemys</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety" title="Link to this definition"></a></dt>
117
+ <dd><p>Holds a reduced Ptolemy variety.</p>
118
+ <p>=== Examples ===</p>
119
+ <p>To generate such a variety, call:</p>
120
+ <div class="doctest 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>
121
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;4_1&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
122
+ </pre></div>
123
+ </div>
124
+ <p>Show the equations and variables:</p>
125
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">e</span> <span class="ow">in</span> <span class="n">p</span><span class="o">.</span><span class="n">equations</span><span class="p">:</span> <span class="nb">print</span><span class="p">(</span><span class="n">e</span><span class="p">)</span>
126
+ <span class="go">- c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2</span>
127
+ <span class="go">c_0011_0 * c_0101_0 - c_0011_0^2 - c_0101_0^2</span>
128
+ <span class="go">- 1 + c_0011_0</span>
129
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">variables</span>
130
+ <span class="go">[&#39;c_0011_0&#39;, &#39;c_0101_0&#39;]</span>
131
+ </pre></div>
132
+ </div>
133
+ <p>Show as an ideal (sage object):</p>
134
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">ideal</span>
135
+ <span class="go">Ideal (-c_0011_0^2 + c_0011_0*c_0101_0 + c_0101_0^2, -c_0011_0^2 - c_0011_0*c_0101_0 + c_0101_0^2, c_0011_0 - 1) of Multivariate Polynomial Ring in c_0011_0, c_0101_0 over Rational Field</span>
136
+ <span class="go">(skip doctest because example only works in sage and not plain python)</span>
137
+ </pre></div>
138
+ </div>
139
+ <p>Produce magma input:</p>
140
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">s</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">to_magma</span><span class="p">()</span>
141
+ <span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">s</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">&#39;ring and ideal&#39;</span><span class="p">)[</span><span class="mi">1</span><span class="p">]</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
142
+ <span class="go">R&lt;c_0011_0, c_0101_0&gt; := PolynomialRing(RationalField(), 2, &quot;grevlex&quot;);</span>
143
+ <span class="go">MyIdeal := ideal&lt;R |</span>
144
+ <span class="go"> - c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2,</span>
145
+ <span class="go"> ...</span>
146
+ </pre></div>
147
+ </div>
148
+ <p>Call <code class="docutils literal notranslate"><span class="pre">p.compute_solutions()</span></code> to automatically compute solutions!</p>
149
+ <p>Show canonical representatives:</p>
150
+ <p>(The Ptolemy coordinates c_0110_0 and c_0101_0 are identified, this
151
+ information is needed to recover all Ptolemy coordinates from the solutions
152
+ of a simplified Ptolemy variety. The information is also packaged into a
153
+ python section by py_eval_variable_dict().)</p>
154
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">canonical_representative</span><span class="p">[</span><span class="s2">&quot;c_0110_0&quot;</span><span class="p">]</span>
155
+ <span class="go">(1, 0, &#39;c_0101_0&#39;)</span>
156
+ </pre></div>
157
+ </div>
158
+ <dl class="py method">
159
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.compute_decomposition">
160
+ <span class="sig-name descname"><span class="pre">compute_decomposition</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</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">memory_limit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">750000000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</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">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.compute_decomposition" title="Link to this definition"></a></dt>
161
+ <dd><p>Starts an engine such as magma to compute the
162
+ radical decomposition of the Ptolemy variety.</p>
163
+ <p>If started in sage, uses sage, otherwise, uses magma.</p>
164
+ <p>=== Arguments ===</p>
165
+ <p>engine engine to use, currently, only support magma and sage
166
+ memory_limit maximal allowed memory in bytes
167
+ directory location for input and output files, temporary directory used if not specified
168
+ verboseprint extra information</p>
169
+ </dd></dl>
170
+
171
+ <dl class="py method">
172
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.compute_solutions">
173
+ <span class="sig-name descname"><span class="pre">compute_solutions</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">engine</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">numerical</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">memory_limit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">750000000</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">directory</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">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.ptolemy.ptolemyVariety.PtolemyVariety.compute_solutions" title="Link to this definition"></a></dt>
174
+ <dd><p>Starts an engine such as magma to compute the
175
+ radical decomposition of the ideal and computes exact solutions.</p>
176
+ <p>If started in sage, uses sage, otherwise, uses magma.</p>
177
+ <p>=== Arguments ===</p>
178
+ <p>engine engine to use, currently, only support magma and sage
179
+ numerical get numerical solutions from magma instead of exact ones
180
+ memory_limit maximal allowed memory in bytes
181
+ directorylocation for input and output files, temporary directory used if not specified
182
+ verboseprint extra information</p>
183
+ </dd></dl>
184
+
185
+ <dl class="py method">
186
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.degree_to_shapes">
187
+ <span class="sig-name descname"><span class="pre">degree_to_shapes</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.degree_to_shapes" title="Link to this definition"></a></dt>
188
+ <dd><p>In general, there can be d different solutions to the (reduced) Ptolemy
189
+ variety for each solution to the gluing equations (with peripheral
190
+ equations). This method computes d which is also the number of elements
191
+ in H^1(Mhat; Z/N) where Mhat is the non-manifold cell comples obtained
192
+ by gluing together the tetrahedra as non-ideal tetrahedra.</p>
193
+ <p>For example, the Ptolemy variety for m009 has 4 points but there are
194
+ only 2 distinct boundary-unipotent PSL(2,C) representations.
195
+ Thus the following call returns 2 = 4 / 2</p>
196
+ <div class="doctest 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>
197
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m009&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</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">degree_to_shapes</span><span class="p">()</span>
198
+ <span class="go">2</span>
199
+ </pre></div>
200
+ </div>
201
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m010&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</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">degree_to_shapes</span><span class="p">()</span>
202
+ <span class="go">2</span>
203
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m011&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</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">degree_to_shapes</span><span class="p">()</span>
204
+ <span class="go">1</span>
205
+ </pre></div>
206
+ </div>
207
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m009&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">degree_to_shapes</span><span class="p">()</span>
208
+ <span class="go">1</span>
209
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m010&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">degree_to_shapes</span><span class="p">()</span>
210
+ <span class="go">3</span>
211
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;m011&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">degree_to_shapes</span><span class="p">()</span>
212
+ <span class="go">1</span>
213
+ </pre></div>
214
+ </div>
215
+ </dd></dl>
216
+
217
+ <dl class="py method">
218
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.filename_base">
219
+ <span class="sig-name descname"><span class="pre">filename_base</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.filename_base" title="Link to this definition"></a></dt>
220
+ <dd><p>Preferred filename base for writing out this Ptolemy variety</p>
221
+ <div class="doctest 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="o">*</span>
222
+ <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="s1">&#39;4_1&#39;</span><span class="p">)</span>
223
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
224
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">filename_base</span><span class="p">()</span>
225
+ <span class="go">&#39;4_1__sl2_c1&#39;</span>
226
+ </pre></div>
227
+ </div>
228
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
229
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">filename_base</span><span class="p">()</span>
230
+ <span class="go">&#39;4_1__sl2_c0&#39;</span>
231
+ </pre></div>
232
+ </div>
233
+ </dd></dl>
234
+
235
+ <dl class="py method">
236
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.py_eval_section">
237
+ <span class="sig-name descname"><span class="pre">py_eval_section</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.py_eval_section" title="Link to this definition"></a></dt>
238
+ <dd><p>Returns a string that can be evaluated in python and contains extra
239
+ information needed to recover solutions from a simplified Ptolemy
240
+ variety.</p>
241
+ <div class="doctest 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><span class="p">,</span> <span class="n">pari</span>
242
+ <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="s1">&#39;4_1&#39;</span><span class="p">)</span>
243
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">M</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
244
+ </pre></div>
245
+ </div>
246
+ <p>Get extra information</p>
247
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">eval_section</span> <span class="o">=</span> <span class="n">p</span><span class="o">.</span><span class="n">py_eval_section</span><span class="p">()</span>
248
+ <span class="gp">&gt;&gt;&gt; </span><span class="nb">print</span><span class="p">(</span><span class="n">eval_section</span><span class="p">)</span>
249
+ <span class="go">{&#39;variable_dict&#39; :</span>
250
+ <span class="go"> (lambda d: {</span>
251
+ <span class="go"> ...</span>
252
+ </pre></div>
253
+ </div>
254
+ <p>Turn it into a python object by evaluation.</p>
255
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">obj</span> <span class="o">=</span> <span class="nb">eval</span><span class="p">(</span><span class="n">eval_section</span><span class="p">)</span>
256
+ </pre></div>
257
+ </div>
258
+ <p>Access the function that expands a solution to the simplified
259
+ Ptolemy variety to a full solution.</p>
260
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">variable_dict</span> <span class="o">=</span> <span class="n">obj</span><span class="p">[</span><span class="s1">&#39;variable_dict&#39;</span><span class="p">]</span>
261
+ </pre></div>
262
+ </div>
263
+ <p>Setup a solution and expand it to a full solution, ‘1’ must map to 1</p>
264
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">simplified_solution</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;c_0101_0&#39;</span> <span class="p">:</span> <span class="n">pari</span><span class="p">(</span><span class="s1">&#39;0.5 - 0.866025403784439*I&#39;</span><span class="p">),</span> <span class="s1">&#39;1&#39;</span> <span class="p">:</span> <span class="n">pari</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="s1">&#39;c_0011_0&#39;</span> <span class="p">:</span> <span class="n">pari</span><span class="p">(</span><span class="mi">1</span><span class="p">)}</span>
265
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">full_solution</span> <span class="o">=</span> <span class="n">variable_dict</span><span class="p">(</span><span class="n">simplified_solution</span><span class="p">)</span>
266
+ </pre></div>
267
+ </div>
268
+ <p>Full solution is a dictionary with a key for every Ptolemy coordinate</p>
269
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">full_solution</span><span class="p">[</span><span class="s1">&#39;c_1010_1&#39;</span><span class="p">]</span>
270
+ <span class="go">1</span>
271
+ <span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">tet</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">2</span><span class="p">):</span>
272
+ <span class="gp">... </span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">utilities</span><span class="o">.</span><span class="n">quadruples_with_fixed_sum_iterator</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">skipVertices</span> <span class="o">=</span> <span class="kc">True</span><span class="p">):</span>
273
+ <span class="gp">... </span> <span class="n">c</span> <span class="o">=</span> <span class="s2">&quot;c_</span><span class="si">%d%d%d%d</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">i</span> <span class="o">+</span> <span class="s2">&quot;_</span><span class="si">%d</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">tet</span>
274
+ <span class="gp">... </span> <span class="k">assert</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">full_solution</span>
275
+ </pre></div>
276
+ </div>
277
+ </dd></dl>
278
+
279
+ <dl class="py method">
280
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma">
281
+ <span class="sig-name descname"><span class="pre">to_magma</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma" title="Link to this definition"></a></dt>
282
+ <dd><p>Returns a string with the ideal that can be used as input for magma.</p>
283
+ <p>The advanced user can provide a template string to write own magma
284
+ code to process the equations.</p>
285
+ <div class="doctest 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="o">*</span>
286
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;4_1&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
287
+ </pre></div>
288
+ </div>
289
+ <p>Magma input to compute radical Decomposition
290
+ &gt;&gt;&gt; s = p.to_magma()
291
+ &gt;&gt;&gt; print(s.split(‘ring and ideal’)[1].strip()) #doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
292
+ R&lt;c_0011_0, c_0101_0&gt; := PolynomialRing(RationalField(), 2, “grevlex”);
293
+ MyIdeal := ideal&lt;R | - c_0011_0 * c_0101_0 + c_0011_0^2 + c_0101_0^2,
294
+
295
+ &gt;&gt;&gt; “RadicalDecomposition” in p.to_magma()
296
+ True</p>
297
+ </dd></dl>
298
+
299
+ <dl class="py method">
300
+ <dt class="sig sig-object py" id="snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma_file">
301
+ <span class="sig-name descname"><span class="pre">to_magma_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">template_path</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'magma/default.magma_template'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.ptolemyVariety.PtolemyVariety.to_magma_file" title="Link to this definition"></a></dt>
302
+ <dd><div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">tempfile</span>
303
+ <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>
304
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">handle</span><span class="p">,</span> <span class="n">name</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">mkstemp</span><span class="p">()</span>
305
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span> <span class="o">=</span> <span class="n">Manifold</span><span class="p">(</span><span class="s2">&quot;4_1&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">ptolemy_variety</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span> <span class="n">obstruction_class</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
306
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">p</span><span class="o">.</span><span class="n">to_magma_file</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
307
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">os</span><span class="o">.</span><span class="n">close</span><span class="p">(</span><span class="n">handle</span><span class="p">);</span> <span class="n">os</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
308
+ </pre></div>
309
+ </div>
310
+ </dd></dl>
311
+
312
+ </dd></dl>
313
+
314
+ </section>
315
+ <section id="ptolemycoordinates">
316
+ <h2>PtolemyCoordinates<a class="headerlink" href="#ptolemycoordinates" title="Link to this heading"></a></h2>
317
+ <dl class="py class">
318
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates">
319
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.coordinates.</span></span><span class="sig-name descname"><span class="pre">PtolemyCoordinates</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">is_numerical=True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">py_eval_section=None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">manifold_thunk=&lt;function</span> <span class="pre">PtolemyCoordinates.&lt;lambda&gt;&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">non_trivial_generalized_obstruction_class=False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates" title="Link to this definition"></a></dt>
320
+ <dd><p>Represents a solution of a Ptolemy variety as python dictionary.</p>
321
+ <p>=== Examples ===</p>
322
+ <p>Construct solution from magma output:</p>
323
+ <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
324
+ <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>
325
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
326
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
327
+ </pre></div>
328
+ </div>
329
+ <p>Access a Ptolemy coordinate:</p>
330
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="p">[</span><span class="s1">&#39;c_2100_0&#39;</span><span class="p">]</span>
331
+ <span class="go">1</span>
332
+ </pre></div>
333
+ </div>
334
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">number_field</span><span class="p">()</span>
335
+ <span class="go">x^2 + x + 1</span>
336
+ </pre></div>
337
+ </div>
338
+ <p>Solution is always 0 dimensional:</p>
339
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">dimension</span>
340
+ <span class="go">0</span>
341
+ </pre></div>
342
+ </div>
343
+ <p>Check that it is really a solution, exactly:</p>
344
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">()</span>
345
+ </pre></div>
346
+ </div>
347
+ <p>If the solution was not created through the ptolemy module
348
+ and thus not associated to a manifold, we need to explicitly
349
+ specify one:</p>
350
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">myDict</span> <span class="o">=</span> <span class="p">{}</span>
351
+ <span class="gp">&gt;&gt;&gt; </span><span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">solution</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
352
+ <span class="gp">... </span> <span class="n">myDict</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
353
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">mysolution</span> <span class="o">=</span> <span class="n">PtolemyCoordinates</span><span class="p">(</span><span class="n">myDict</span><span class="p">)</span>
354
+ <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;4_1&quot;</span><span class="p">)</span>
355
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">)</span>
356
+ </pre></div>
357
+ </div>
358
+ <p>Turn into (Galois conjugate) numerical solutions:</p>
359
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">old_precision</span> <span class="o">=</span> <span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># with high precision</span>
360
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solutions</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">numerical</span><span class="p">()</span>
361
+ </pre></div>
362
+ </div>
363
+ <p>Check that it is a solution, numerically:</p>
364
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solutions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">,</span> <span class="mf">1e-80</span><span class="p">)</span>
365
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="n">old_precision</span><span class="p">)</span> <span class="c1"># reset pari engine</span>
366
+ <span class="go">100</span>
367
+ </pre></div>
368
+ </div>
369
+ <p>Compute cross ratios from the Ptolemy coordinates (cross ratios
370
+ according to SnapPy convention, see help(solution.cross_ratios):</p>
371
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">cross</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">cross_ratios</span><span class="p">()</span>
372
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">cross</span><span class="p">[</span><span class="s1">&#39;z_0001_0&#39;</span><span class="p">]</span>
373
+ <span class="go">Mod(-x, x^2 + x + 1)</span>
374
+ </pre></div>
375
+ </div>
376
+ <p>Compute volumes:</p>
377
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">volumes</span> <span class="o">=</span> <span class="n">cross</span><span class="o">.</span><span class="n">volume_numerical</span><span class="p">()</span>
378
+ </pre></div>
379
+ </div>
380
+ <p>Check that volume is 4 times the geometric one:</p>
381
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">volume</span> <span class="o">=</span> <span class="n">volumes</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">abs</span><span class="p">()</span>
382
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">=</span> <span class="nb">abs</span><span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">M</span><span class="o">.</span><span class="n">volume</span><span class="p">()</span> <span class="o">-</span> <span class="n">volume</span><span class="p">)</span>
383
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">&lt;</span> <span class="mf">1e-9</span>
384
+ <span class="go">True</span>
385
+ </pre></div>
386
+ </div>
387
+ <p>Compute flattenings:</p>
388
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">flattenings_numerical</span><span class="p">()</span>
389
+ </pre></div>
390
+ </div>
391
+ <p>Compute complex volumes:</p>
392
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">cvols</span> <span class="o">=</span> <span class="p">[</span><span class="n">flattening</span><span class="o">.</span><span class="n">complex_volume</span><span class="p">()</span> <span class="k">for</span> <span class="n">flattening</span> <span class="ow">in</span> <span class="n">flattenings</span><span class="p">]</span>
393
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">volume</span> <span class="o">=</span> <span class="n">cvols</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">real</span><span class="p">()</span><span class="o">.</span><span class="n">abs</span><span class="p">()</span>
394
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">chernSimons</span> <span class="o">=</span> <span class="n">cvols</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">imag</span><span class="p">()</span>
395
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">=</span> <span class="nb">abs</span><span class="p">(</span><span class="mi">4</span> <span class="o">*</span> <span class="n">M</span><span class="o">.</span><span class="n">volume</span><span class="p">()</span> <span class="o">-</span> <span class="n">volume</span><span class="p">)</span>
396
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">diff</span> <span class="o">&lt;</span> <span class="mf">1e-9</span>
397
+ <span class="go">True</span>
398
+ </pre></div>
399
+ </div>
400
+ <div class="doctest 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">pari</span>
401
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">normalized</span> <span class="o">=</span> <span class="n">chernSimons</span> <span class="o">*</span> <span class="mi">6</span> <span class="o">/</span> <span class="p">(</span><span class="n">pari</span><span class="p">(</span><span class="s1">&#39;Pi&#39;</span><span class="p">)</span><span class="o">**</span><span class="mi">2</span><span class="p">)</span>
402
+ </pre></div>
403
+ </div>
404
+ <p>Check that Chern Simons is zero up to 6 torsion:</p>
405
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">normalized</span> <span class="o">-</span> <span class="n">normalized</span><span class="o">.</span><span class="n">round</span><span class="p">()</span> <span class="o">&lt;</span> <span class="mf">1e-9</span>
406
+ <span class="go">True</span>
407
+ </pre></div>
408
+ </div>
409
+ <dl class="py method">
410
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.N">
411
+ <span class="sig-name descname"><span class="pre">N</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.N" title="Link to this definition"></a></dt>
412
+ <dd><p>Get the <em>N</em> where these coordinates are for SL/PSL(<em>N</em>, <strong>C</strong>)-representations.</p>
413
+ </dd></dl>
414
+
415
+ <dl class="py method">
416
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.check_against_manifold">
417
+ <span class="sig-name descname"><span class="pre">check_against_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</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">epsilon</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.ptolemy.coordinates.PtolemyCoordinates.check_against_manifold" title="Link to this definition"></a></dt>
418
+ <dd><p>Checks that the given solution really is a solution to the Ptolemy
419
+ variety of a manifold. See help(ptolemy.PtolemyCoordinates) for
420
+ more example.</p>
421
+ <p>=== Arguments ===</p>
422
+ <ul class="simple">
423
+ <li><p>M — manifold to check this for</p></li>
424
+ <li><p>epsilon maximal allowed error when checking the relations, use
425
+ None for exact comparison.</p></li>
426
+ </ul>
427
+ </dd></dl>
428
+
429
+ <dl class="py method">
430
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.complex_volume_numerical">
431
+ <span class="sig-name descname"><span class="pre">complex_volume_numerical</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">drop_negative_vols</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">with_modulo</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.ptolemy.coordinates.PtolemyCoordinates.complex_volume_numerical" title="Link to this definition"></a></dt>
432
+ <dd><p>Turn into (Galois conjugate) numerical solutions and compute complex
433
+ volumes. If already numerical, return the volume.</p>
434
+ <p>Complex volume is defined up to i*pi**2/6.</p>
435
+ <p>See numerical(). If drop_negative_vols = True is given as optional
436
+ argument, only return complex volumes with non-negative real part.</p>
437
+ </dd></dl>
438
+
439
+ <dl class="py method">
440
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios">
441
+ <span class="sig-name descname"><span class="pre">cross_ratios</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios" title="Link to this definition"></a></dt>
442
+ <dd><p>Compute cross ratios from Ptolemy coordinates. The cross ratios are
443
+ according to the SnapPy convention, so we have:</p>
444
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zp</span><span class="p">,</span> <span class="n">zp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zpp</span><span class="p">,</span> <span class="n">zpp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">z</span>
445
+ </pre></div>
446
+ </div>
447
+ <p>where:</p>
448
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">01</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s1</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1010</span> <span class="o">*</span> <span class="n">c_0101</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span>
449
+ <span class="n">zp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">02</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="o">-</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s2</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span>
450
+ <span class="n">zpp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">03</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s3</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_0101</span> <span class="o">*</span> <span class="n">c_1010</span><span class="p">)</span><span class="o">.</span>
451
+ </pre></div>
452
+ </div>
453
+ <p>Note that this is different from the convention used in
454
+ Garoufalidis, Goerner, Zickert:
455
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
456
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
457
+ <p>Take an exact solution:</p>
458
+ <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
459
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
460
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
461
+ </pre></div>
462
+ </div>
463
+ <p>Turn into cross Ratios:</p>
464
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">cross_ratios</span><span class="p">()</span>
465
+ </pre></div>
466
+ </div>
467
+ <p>Get a cross ratio:</p>
468
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zp_0010_0&#39;</span><span class="p">]</span>
469
+ <span class="go">Mod(-x, x^2 + x + 1)</span>
470
+ </pre></div>
471
+ </div>
472
+ <p>Check the relationship between cross ratios:</p>
473
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;z_0010_0&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zp_0010_0&#39;</span><span class="p">]</span>
474
+ <span class="go">True</span>
475
+ </pre></div>
476
+ </div>
477
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zp_0010_0&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zpp_0010_0&#39;</span><span class="p">]</span>
478
+ <span class="go">True</span>
479
+ </pre></div>
480
+ </div>
481
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;zpp_0010_0&#39;</span><span class="p">]</span> <span class="o">==</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span> <span class="o">/</span> <span class="n">crossRatios</span><span class="p">[</span><span class="s1">&#39;z_0010_0&#39;</span><span class="p">]</span>
482
+ <span class="go">True</span>
483
+ </pre></div>
484
+ </div>
485
+ <p>Get information about what one can do with cross ratios</p>
486
+ </dd></dl>
487
+
488
+ <dl class="py method">
489
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios_numerical">
490
+ <span class="sig-name descname"><span class="pre">cross_ratios_numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.cross_ratios_numerical" title="Link to this definition"></a></dt>
491
+ <dd><p>Turn exact solutions into numerical and then compute cross ratios.
492
+ See numerical() and cross_ratios().</p>
493
+ </dd></dl>
494
+
495
+ <dl class="py method">
496
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.diamond_coordinate">
497
+ <span class="sig-name descname"><span class="pre">diamond_coordinate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.diamond_coordinate" title="Link to this definition"></a></dt>
498
+ <dd><p>Returns the diamond coordinate for tetrahedron with index tet
499
+ for the face with vertices v0, v1, v2 (integers between 0 and 3) and
500
+ integral point pt (quadruple adding up to N-2).</p>
501
+ <p>See Definition 10.1:
502
+ Garoufalidis, Goerner, Zickert:
503
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
504
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
505
+ </dd></dl>
506
+
507
+ <dl class="py method">
508
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.evaluate_word">
509
+ <span class="sig-name descname"><span class="pre">evaluate_word</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">word</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">G</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.ptolemy.coordinates.PtolemyCoordinates.evaluate_word" title="Link to this definition"></a></dt>
510
+ <dd><p>Given a word in the generators of the fundamental group,
511
+ compute the corresponding matrix. By default, these are the
512
+ generators of the unsimplified presentation of the fundamental
513
+ group. An optional SnapPy fundamental group can be given if the
514
+ words are in generators of a different presentation, e.g.,
515
+ c.evaluate_word(word, M.fundamental_group(True)) to
516
+ evaluate a word in the simplified presentation returned by
517
+ M.fundamental_group(True).</p>
518
+ <p>For now, the matrix is returned as list of lists.</p>
519
+ </dd></dl>
520
+
521
+ <dl class="py method">
522
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.flattenings_numerical">
523
+ <span class="sig-name descname"><span class="pre">flattenings_numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.flattenings_numerical" title="Link to this definition"></a></dt>
524
+ <dd><p>Turn into numerical solutions and compute flattenings, see
525
+ help(snappy.ptolemy.coordinates.Flattenings)
526
+ Also see numerical()</p>
527
+ <p>Get Ptolemy coordinates.</p>
528
+ <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
529
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
530
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
531
+ </pre></div>
532
+ </div>
533
+ <p>Compute a numerical solution</p>
534
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">flattenings_numerical</span><span class="p">()</span>
535
+ </pre></div>
536
+ </div>
537
+ <p>Get more information with help(flattenings[0])</p>
538
+ </dd></dl>
539
+
540
+ <dl class="py method">
541
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.get_manifold">
542
+ <span class="sig-name descname"><span class="pre">get_manifold</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.get_manifold" title="Link to this definition"></a></dt>
543
+ <dd><p>Get the manifold for which this structure represents a solution
544
+ to the Ptolemy variety.</p>
545
+ </dd></dl>
546
+
547
+ <dl class="py method">
548
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.has_obstruction">
549
+ <span class="sig-name descname"><span class="pre">has_obstruction</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.has_obstruction" title="Link to this definition"></a></dt>
550
+ <dd><p>Whether the Ptolemy variety has legacy obstruction class that
551
+ modifies the Ptolemy relation to</p>
552
+ </dd></dl>
553
+
554
+ <dl class="py method">
555
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.is_geometric">
556
+ <span class="sig-name descname"><span class="pre">is_geometric</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-06</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.is_geometric" title="Link to this definition"></a></dt>
557
+ <dd><p>Returns true if all shapes corresponding to this solution have positive
558
+ imaginary part.</p>
559
+ <p>If the solutions are exact, it returns true if one of the corresponding
560
+ numerical solutions is geometric.</p>
561
+ <p>An optional epsilon can be given. An imaginary part of a shape is
562
+ considered positive if it is larger than this epsilon.</p>
563
+ </dd></dl>
564
+
565
+ <dl class="py method">
566
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.long_edge">
567
+ <span class="sig-name descname"><span class="pre">long_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.long_edge" title="Link to this definition"></a></dt>
568
+ <dd><p>The matrix that labels a long edge from v0 to v1 (integers between 0
569
+ and 3) of a (doubly) truncated simplex corresponding to an ideal
570
+ tetrahedron with index tet.</p>
571
+ <p>This matrix was labeled alpha^{v0v1v2} (v2 does not matter for non
572
+ double-truncated simplex) in Figure 18 of
573
+ Garoufalidis, Goerner, Zickert:
574
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
575
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
576
+ <p>It is computed using equation 10.4. Note that the ratio coordinate
577
+ is different from the definition in the paper (see ratio_coordinate).</p>
578
+ <p>The resulting matrix is given as a python list of lists.</p>
579
+ </dd></dl>
580
+
581
+ <dl class="py method">
582
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.middle_edge">
583
+ <span class="sig-name descname"><span class="pre">middle_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.middle_edge" title="Link to this definition"></a></dt>
584
+ <dd><p>The matrix that labels a middle edge on the face v0, v1, v2 (integers
585
+ between 0 and 3) of a doubly truncated simplex (or a short edge of the
586
+ truncated simplex) corresponding to an ideal tetrahedron with index
587
+ tet.</p>
588
+ <p>This matrix was labeled beta^{v0v1v2} in Figure 18 of
589
+ Garoufalidis, Goerner, Zickert:
590
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
591
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
592
+ <p>It is computed using equation 10.4.</p>
593
+ <p>The resulting matrix is given as a python list of lists.</p>
594
+ </dd></dl>
595
+
596
+ <dl class="py method">
597
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_and_simplify_terms_in_RUR">
598
+ <span class="sig-name descname"><span class="pre">multiply_and_simplify_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_and_simplify_terms_in_RUR" title="Link to this definition"></a></dt>
599
+ <dd><p>If a Ptolemy coordinate is given as Rational Univariate Representation
600
+ with numerator and denominator being a product, multiply the terms,
601
+ reduce the fraction and return the result.</p>
602
+ <p>See multiply_and_simplify_terms of RUR.</p>
603
+ <p>This loses information about how the numerator and denominator are
604
+ factorised.</p>
605
+ </dd></dl>
606
+
607
+ <dl class="py method">
608
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_terms_in_RUR">
609
+ <span class="sig-name descname"><span class="pre">multiply_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.multiply_terms_in_RUR" title="Link to this definition"></a></dt>
610
+ <dd><p>If a Ptolemy coordinate is given as Rational Univariate Representation
611
+ with numerator and denominator being a product, multiply the terms and
612
+ return the result.</p>
613
+ <p>See multiply_terms of RUR.</p>
614
+ <p>This loses information about how the numerator and denominator are
615
+ factorised.</p>
616
+ </dd></dl>
617
+
618
+ <dl class="py method">
619
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.num_tetrahedra">
620
+ <span class="sig-name descname"><span class="pre">num_tetrahedra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.num_tetrahedra" title="Link to this definition"></a></dt>
621
+ <dd><p>The number of tetrahedra for which we have Ptolemy coordinates.</p>
622
+ </dd></dl>
623
+
624
+ <dl class="py method">
625
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.number_field">
626
+ <span class="sig-name descname"><span class="pre">number_field</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.number_field" title="Link to this definition"></a></dt>
627
+ <dd><p>For an exact solution, return the number_field spanned by the
628
+ Ptolemy coordinates. If number_field is Q, return None.</p>
629
+ </dd></dl>
630
+
631
+ <dl class="py method">
632
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.numerical">
633
+ <span class="sig-name descname"><span class="pre">numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.numerical" title="Link to this definition"></a></dt>
634
+ <dd><p>Turn exact solutions into numerical solutions using pari.</p>
635
+ <p>Take an exact solution:</p>
636
+ <div class="doctest 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.ptolemy.processMagmaFile</span> <span class="kn">import</span> <span class="n">_magma_output_for_4_1__sl3</span><span class="p">,</span> <span class="n">solutions_from_magma</span>
637
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solutions</span> <span class="o">=</span> <span class="n">solutions_from_magma</span><span class="p">(</span><span class="n">_magma_output_for_4_1__sl3</span><span class="p">)</span>
638
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">solution</span> <span class="o">=</span> <span class="n">solutions</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
639
+ </pre></div>
640
+ </div>
641
+ <p>Turn into a numerical solution:</p>
642
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">old_precision</span> <span class="o">=</span> <span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="mi">100</span><span class="p">)</span> <span class="c1"># with high precision</span>
643
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solutions</span> <span class="o">=</span> <span class="n">solution</span><span class="o">.</span><span class="n">numerical</span><span class="p">()</span>
644
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">pari</span><span class="o">.</span><span class="n">set_real_precision</span><span class="p">(</span><span class="n">old_precision</span><span class="p">)</span> <span class="c1"># reset pari engine</span>
645
+ <span class="go">100</span>
646
+ </pre></div>
647
+ </div>
648
+ <p>Pick one of the Galois conjugates:</p>
649
+ <div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">numerical_solution</span> <span class="o">=</span> <span class="n">numerical_solutions</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
650
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">value</span> <span class="o">=</span> <span class="n">numerical_solution</span><span class="p">[</span><span class="s1">&#39;c_1110_0&#39;</span><span class="p">]</span>
651
+ </pre></div>
652
+ </div>
653
+ </dd></dl>
654
+
655
+ <dl class="py method">
656
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.ratio_coordinate">
657
+ <span class="sig-name descname"><span class="pre">ratio_coordinate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.ratio_coordinate" title="Link to this definition"></a></dt>
658
+ <dd><p>Returns the ratio coordinate for tetrahedron with index tet
659
+ for the edge from v0 to v1 (integers between 0 and 3) and integral
660
+ point pt (quadruple adding up N-1) on the edge.</p>
661
+ <p>See Definition 10.2:
662
+ Garoufalidis, Goerner, Zickert:
663
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
664
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
665
+ <p>Note that this definition turned out to have the wrong sign. Multiply
666
+ the result by -1 if v1 &lt; v0 and N is even.</p>
667
+ </dd></dl>
668
+
669
+ <dl class="py method">
670
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.short_edge">
671
+ <span class="sig-name descname"><span class="pre">short_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.short_edge" title="Link to this definition"></a></dt>
672
+ <dd><p>Returns the identity. This is because we can think of the matrices
673
+ given by Ptolemy coordinates of living on truncated simplices which
674
+ can be though of as doubly truncated simplices where all short edges
675
+ are collapsed, hence labeled by the identity.</p>
676
+ <p>See equation 10.4 in
677
+ Garoufalidis, Goerner, Zickert:
678
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
679
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
680
+ </dd></dl>
681
+
682
+ <dl class="py method">
683
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.to_PUR">
684
+ <span class="sig-name descname"><span class="pre">to_PUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.PtolemyCoordinates.to_PUR" title="Link to this definition"></a></dt>
685
+ <dd><p>If any Ptolemy coordinates are given as Rational Univariate
686
+ Representation, convert them to Polynomial Univariate Representation and
687
+ return the result.</p>
688
+ <p>See to_PUR of RUR.</p>
689
+ <p>This conversion might lead to very large coefficients.</p>
690
+ </dd></dl>
691
+
692
+ <dl class="py method">
693
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.PtolemyCoordinates.volume_numerical">
694
+ <span class="sig-name descname"><span class="pre">volume_numerical</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">drop_negative_vols</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.ptolemy.coordinates.PtolemyCoordinates.volume_numerical" title="Link to this definition"></a></dt>
695
+ <dd><p>Turn into (Galois conjugate) numerical solutions and compute volumes.
696
+ If already numerical, only return the one volume.
697
+ See numerical().</p>
698
+ <p>If drop_negative_vols = True is given as optional argument,
699
+ only return non-negative volumes.</p>
700
+ </dd></dl>
701
+
702
+ </dd></dl>
703
+
704
+ </section>
705
+ <section id="crossratios">
706
+ <h2>CrossRatios<a class="headerlink" href="#crossratios" title="Link to this heading"></a></h2>
707
+ <dl class="py class">
708
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios">
709
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.coordinates.</span></span><span class="sig-name descname"><span class="pre">CrossRatios</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">is_numerical</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">manifold_thunk</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.ptolemy.coordinates.CrossRatios" title="Link to this definition"></a></dt>
710
+ <dd><p>Represents assigned shape parameters/cross ratios as
711
+ dictionary. The cross ratios are according to SnapPy convention, so we
712
+ have:</p>
713
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zp</span><span class="p">,</span> <span class="n">zp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">zpp</span><span class="p">,</span> <span class="n">zpp</span> <span class="o">=</span> <span class="mi">1</span> <span class="o">-</span> <span class="mi">1</span><span class="o">/</span><span class="n">z</span>
714
+ </pre></div>
715
+ </div>
716
+ <p>where:</p>
717
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">z</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">01</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s1</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1010</span> <span class="o">*</span> <span class="n">c_0101</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span>
718
+ <span class="n">zp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">02</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s2</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1001</span> <span class="o">*</span> <span class="n">c_0110</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span>
719
+ <span class="n">zpp</span> <span class="ow">is</span> <span class="n">at</span> <span class="n">the</span> <span class="n">edge</span> <span class="mi">03</span> <span class="ow">and</span> <span class="n">equal</span> <span class="n">to</span> <span class="n">s0</span> <span class="o">*</span> <span class="n">s3</span> <span class="o">*</span> <span class="p">(</span><span class="n">c_1100</span> <span class="o">*</span> <span class="n">c_0011</span><span class="p">)</span> <span class="o">/</span> <span class="p">(</span><span class="n">c_0101</span> <span class="o">*</span> <span class="n">c_1010</span><span class="p">)</span><span class="o">.</span>
720
+ </pre></div>
721
+ </div>
722
+ <p>Note that this is different from the convention used in
723
+ Garoufalidis, Goerner, Zickert:
724
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
725
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
726
+ <dl class="py method">
727
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.N">
728
+ <span class="sig-name descname"><span class="pre">N</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.N" title="Link to this definition"></a></dt>
729
+ <dd><p>Get the N such that these cross ratios are for
730
+ SL/PSL(N,C)-representations.</p>
731
+ </dd></dl>
732
+
733
+ <dl class="py method">
734
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.check_against_manifold">
735
+ <span class="sig-name descname"><span class="pre">check_against_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</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">epsilon</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.ptolemy.coordinates.CrossRatios.check_against_manifold" title="Link to this definition"></a></dt>
736
+ <dd><p>Checks that the given solution really is a solution to the PGL(N,C) gluing
737
+ equations of a manifold. Usage similar to check_against_manifold of
738
+ PtolemyCoordinates. See help(ptolemy.PtolemtyCoordinates) for example.</p>
739
+ <p>=== Arguments ===</p>
740
+ <p>M manifold to check this for
741
+ epsilon maximal allowed error when checking the relations, use
742
+ None for exact comparison.</p>
743
+ </dd></dl>
744
+
745
+ <dl class="py method">
746
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.evaluate_word">
747
+ <span class="sig-name descname"><span class="pre">evaluate_word</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">word</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">G</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.ptolemy.coordinates.CrossRatios.evaluate_word" title="Link to this definition"></a></dt>
748
+ <dd><p>Given a word in the generators of the fundamental group,
749
+ compute the corresponding matrix. By default, these are the
750
+ generators of the unsimplified presentation of the fundamental
751
+ group. An optional SnapPy fundamental group can be given if the
752
+ words are in generators of a different presentation, e.g.,
753
+ c.evaluate_word(word, M.fundamental_group(True)) to
754
+ evaluate a word in the simplified presentation returned by
755
+ M.fundamental_group(True).</p>
756
+ <p>For now, the matrix is returned as list of lists.</p>
757
+ </dd></dl>
758
+
759
+ <dl class="py method">
760
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.from_snappy_manifold">
761
+ <em class="property"><span class="pre">static</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_snappy_manifold</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">dec_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">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">intervals</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.ptolemy.coordinates.CrossRatios.from_snappy_manifold" title="Link to this definition"></a></dt>
762
+ <dd><p>Constructs an assignment of shape parameters/cross ratios using
763
+ the tetrahehdra_shapes method of a given SnapPy manifold. The optional
764
+ parameters are the same as that of tetrahedra_shapes.</p>
765
+ </dd></dl>
766
+
767
+ <dl class="py method">
768
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.get_manifold">
769
+ <span class="sig-name descname"><span class="pre">get_manifold</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.get_manifold" title="Link to this definition"></a></dt>
770
+ <dd><p>Get the manifold for which this structure represents a solution
771
+ to the gluing equations.</p>
772
+ </dd></dl>
773
+
774
+ <dl class="py method">
775
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.induced_representation">
776
+ <span class="sig-name descname"><span class="pre">induced_representation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">N</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.induced_representation" title="Link to this definition"></a></dt>
777
+ <dd><p>Given a PSL(2,C) representation constructs the induced representation
778
+ for the given N.
779
+ The induced representation is in SL(N,C) if N is odd and
780
+ SL(N,C) / {+1,-1} if N is even and is described in the Introduction of
781
+ Garoufalidis, Thurston, Zickert
782
+ The Complex Volume of SL(n,C)-Representations of 3-Manifolds
783
+ <a class="reference external" href="https://arxiv.org/abs/1111.2828">https://arxiv.org/abs/1111.2828</a></p>
784
+ <p>There is a canonical group homomorphism SL(2,C)-&gt;SL(N,C) coming from
785
+ the the natural SL(2,C)-action on the vector space Sym^{N-1}(C^2).
786
+ This homomorphisms decends to a homomorphism from PSL(2,C) if one
787
+ divides the right side by {+1,-1} when N is even.
788
+ Composing a representation with this homomorphism gives the induced
789
+ representation.</p>
790
+ </dd></dl>
791
+
792
+ <dl class="py method">
793
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_geometric">
794
+ <span class="sig-name descname"><span class="pre">is_geometric</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-06</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.is_geometric" title="Link to this definition"></a></dt>
795
+ <dd><p>Returns true if all shapes corresponding to this solution have positive
796
+ imaginary part.</p>
797
+ <p>If the solutions are exact, it returns true if one of the corresponding
798
+ numerical solutions is geometric.</p>
799
+ <p>An optional epsilon can be given. An imaginary part of a shape is
800
+ considered positive if it is larger than this epsilon.</p>
801
+ </dd></dl>
802
+
803
+ <dl class="py method">
804
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_induced_from_psl2">
805
+ <span class="sig-name descname"><span class="pre">is_induced_from_psl2</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</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.ptolemy.coordinates.CrossRatios.is_induced_from_psl2" title="Link to this definition"></a></dt>
806
+ <dd><p>For each simplex and each edges, checks that all cross ratios of that
807
+ simplex that are parallel to that each are the same (maximal absolute
808
+ difference is the epsilon given as argument).
809
+ This means that the corresponding representation is induced by a
810
+ PSL(2,C) representation.</p>
811
+ </dd></dl>
812
+
813
+ <dl class="py method">
814
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_pu_2_1_representation">
815
+ <span class="sig-name descname"><span class="pre">is_pu_2_1_representation</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">epsilon2</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.ptolemy.coordinates.CrossRatios.is_pu_2_1_representation" title="Link to this definition"></a></dt>
816
+ <dd><p>Returns True if the representation is also a
817
+ PU(2,1)-representation. This uses Proposition 3.5 and the
818
+ remark following that proposition in <a class="reference internal" href="#fkr2013" id="id1"><span>[FKR2013]</span></a>.</p>
819
+ <p>If a condition given in that Proposition is violated, the method returns
820
+ an object whose Boolean value is still False and that indicates which condition
821
+ was violated. Thus, this method can still be used in <code class="docutils literal notranslate"><span class="pre">if</span></code> statements.</p>
822
+ <p>The method tests the following complex equalities and inequalities:</p>
823
+ <ul class="simple">
824
+ <li><p>the three complex equations given in (3.5.1) of <a class="reference internal" href="#fkr2013" id="id2"><span>[FKR2013]</span></a>.</p></li>
825
+ <li><p>the inequality z<sub>ijl</sub> <span class="math notranslate nohighlight">\(\\not=\)</span> -1.</p></li>
826
+ </ul>
827
+ <p><strong>Remark:</strong> It does not check whether all z<sub>ij</sub> * z<sub>ji</sub> are real or
828
+ not as these are still valid CR configurations, see the remark following
829
+ Proposition 3.5.</p>
830
+ <p>The user has to supply an epsilon: an equality/inequality is considered
831
+ to be true if and only if the absolute value | LHS - RHS | of difference between the
832
+ left and right hand side is less/greater than epsilon.</p>
833
+ <p>The user can supply another parameter, epsilon2. If any | LHS - RHS | is in
834
+ the interval [epsilon, epsilon2], this method fails with an exception
835
+ as the value of | LHS - RHS | is an ambiguous interval where
836
+ it is unclear whether inequality fails to hold because it truly does
837
+ hold or just because of numerical noise.</p>
838
+ </dd></dl>
839
+
840
+ <dl class="py method">
841
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.is_real">
842
+ <span class="sig-name descname"><span class="pre">is_real</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">epsilon</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.is_real" title="Link to this definition"></a></dt>
843
+ <dd><p>Returns True if all cross ratios are real (have absolute imaginary
844
+ part &lt; epsilon where epsilon is given as argument).
845
+ This means that the corresponding representation is in PSL(N,R).</p>
846
+ </dd></dl>
847
+
848
+ <dl class="py method">
849
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.long_edge">
850
+ <span class="sig-name descname"><span class="pre">long_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.long_edge" title="Link to this definition"></a></dt>
851
+ <dd><p>The matrix that labels a long edge starting at vertex (v0, v1, v2)
852
+ of a doubly truncated simplex corresponding to the ideal tetrahedron
853
+ with index tet.</p>
854
+ <p>This matrix was labeled alpha^{v0v1v2} in Figure 18 of
855
+ Garoufalidis, Goerner, Zickert:
856
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
857
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
858
+ <p>It is computed using equation 10.22.</p>
859
+ <p>The resulting matrix is given as a python list of lists.</p>
860
+ </dd></dl>
861
+
862
+ <dl class="py method">
863
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.middle_edge">
864
+ <span class="sig-name descname"><span class="pre">middle_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.middle_edge" title="Link to this definition"></a></dt>
865
+ <dd><p>The matrix that labels a middle edge starting at vertex (v0, v1, v2)
866
+ of a doubly truncated simplex corresponding to the ideal tetrahedron
867
+ with index tet.</p>
868
+ <p>This matrix was labeled beta^{v0v1v2} in Figure 18 of
869
+ Garoufalidis, Goerner, Zickert:
870
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
871
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
872
+ <p>It is computed using equation 10.22.</p>
873
+ <p>The resulting matrix is given as a python list of lists.</p>
874
+ </dd></dl>
875
+
876
+ <dl class="py method">
877
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.multiply_and_simplify_terms_in_RUR">
878
+ <span class="sig-name descname"><span class="pre">multiply_and_simplify_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.multiply_and_simplify_terms_in_RUR" title="Link to this definition"></a></dt>
879
+ <dd><p>If a cross ratio is given as Rational Univariate Representation
880
+ with numerator and denominator being a product, multiply the terms,
881
+ reduce the fraction and return the result.</p>
882
+ <p>See multiply_and_simplify_terms of RUR.</p>
883
+ <p>This loses information about how the numerator and denominator are
884
+ factorised.</p>
885
+ </dd></dl>
886
+
887
+ <dl class="py method">
888
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.multiply_terms_in_RUR">
889
+ <span class="sig-name descname"><span class="pre">multiply_terms_in_RUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.multiply_terms_in_RUR" title="Link to this definition"></a></dt>
890
+ <dd><p>If a cross ratio is given as Rational Univariate Representation
891
+ with numerator and denominator being a product, multiply the terms and
892
+ return the result.</p>
893
+ <p>See multiply_terms of RUR.</p>
894
+ <p>This loses information about how the numerator and denominator are
895
+ factorised.</p>
896
+ </dd></dl>
897
+
898
+ <dl class="py method">
899
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.num_tetrahedra">
900
+ <span class="sig-name descname"><span class="pre">num_tetrahedra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.num_tetrahedra" title="Link to this definition"></a></dt>
901
+ <dd><p>The number of tetrahedra for which we have cross ratios.</p>
902
+ </dd></dl>
903
+
904
+ <dl class="py method">
905
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.numerical">
906
+ <span class="sig-name descname"><span class="pre">numerical</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.numerical" title="Link to this definition"></a></dt>
907
+ <dd><p>Turn exact solutions into numerical solutions using pari. Similar to
908
+ numerical() of PtolemyCoordinates. See help(ptolemy.PtolemyCoordinates)
909
+ for example.</p>
910
+ </dd></dl>
911
+
912
+ <dl class="py method">
913
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.short_edge">
914
+ <span class="sig-name descname"><span class="pre">short_edge</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.short_edge" title="Link to this definition"></a></dt>
915
+ <dd><p>The matrix that labels a long edge starting at vertex (v0, v1, v2)
916
+ of a doubly truncated simplex corresponding to the ideal tetrahedron
917
+ with index tet.</p>
918
+ <p>This matrix was labeled gamma^{v0v1v2} in Figure 18 of
919
+ Garoufalidis, Goerner, Zickert:
920
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
921
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
922
+ <p>It is computed using equation 10.22.</p>
923
+ <p>The resulting matrix is given as a python list of lists.</p>
924
+ </dd></dl>
925
+
926
+ <dl class="py method">
927
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.to_PUR">
928
+ <span class="sig-name descname"><span class="pre">to_PUR</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.to_PUR" title="Link to this definition"></a></dt>
929
+ <dd><p>If any Ptolemy coordinates are given as Rational Univariate
930
+ Representation, convert them to Polynomial Univariate Representation and
931
+ return the result.</p>
932
+ <p>See to_PUR of RUR.</p>
933
+ <p>This conversion might lead to very large coefficients.</p>
934
+ </dd></dl>
935
+
936
+ <dl class="py method">
937
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.volume_numerical">
938
+ <span class="sig-name descname"><span class="pre">volume_numerical</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">drop_negative_vols</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.ptolemy.coordinates.CrossRatios.volume_numerical" title="Link to this definition"></a></dt>
939
+ <dd><p>Turn into (Galois conjugate) numerical solutions and compute volumes.
940
+ If already numerical, only compute the one volume.
941
+ See numerical().</p>
942
+ <p>If drop_negative_vols = True is given as optional argument,
943
+ only return non-negative volumes.</p>
944
+ </dd></dl>
945
+
946
+ <dl class="py method">
947
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.CrossRatios.x_coordinate">
948
+ <span class="sig-name descname"><span class="pre">x_coordinate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">tet</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pt</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.CrossRatios.x_coordinate" title="Link to this definition"></a></dt>
949
+ <dd><p>Returns the X-coordinate for the tetrahedron with index tet
950
+ at the point pt (quadruple of integers adding up to N).</p>
951
+ <p>See Definition 10.9:
952
+ Garoufalidis, Goerner, Zickert:
953
+ Gluing Equations for PGL(n,C)-Representations of 3-Manifolds
954
+ <a class="reference external" href="https://arxiv.org/abs/1207.6711">https://arxiv.org/abs/1207.6711</a></p>
955
+ </dd></dl>
956
+
957
+ </dd></dl>
958
+
959
+ </section>
960
+ <section id="flattenings">
961
+ <h2>Flattenings<a class="headerlink" href="#flattenings" title="Link to this heading"></a></h2>
962
+ <dl class="py class">
963
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings">
964
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.coordinates.</span></span><span class="sig-name descname"><span class="pre">Flattenings</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">d</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">manifold_thunk=&lt;function</span> <span class="pre">Flattenings.&lt;lambda&gt;&gt;</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">evenN=2</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings" title="Link to this definition"></a></dt>
965
+ <dd><p>Represents a flattening assigned to each edge of a simplex as dictionary.</p>
966
+ <p>We assign to each pair of parallel edges of each simplex a triple (w, z, p)
967
+ such that:</p>
968
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">w</span> <span class="o">=</span> <span class="n">log</span><span class="p">(</span><span class="n">z</span><span class="p">)</span> <span class="o">+</span> <span class="n">p</span> <span class="o">*</span> <span class="p">(</span><span class="mi">2</span> <span class="o">*</span> <span class="n">pi</span> <span class="o">*</span> <span class="n">i</span> <span class="o">/</span> <span class="n">N</span><span class="p">)</span> <span class="n">where</span> <span class="n">N</span> <span class="ow">is</span> <span class="n">fixed</span> <span class="ow">and</span> <span class="n">even</span><span class="o">.</span>
969
+ </pre></div>
970
+ </div>
971
+ <p>For N = 2, the three triples belonging to a simplex form a combinatorial
972
+ flattening (w0, w1, w2) as defined in Definition 3.1 in
973
+ Walter D. Neumann, Extended Bloch group and the Cheeger-Chern-Simons class
974
+ <a class="reference external" href="https://arxiv.org/abs/math.GT/0307092">https://arxiv.org/abs/math.GT/0307092</a></p>
975
+ <p>For N &gt; 2, the three triples form a generalized combinatorial flattening
976
+ (w0, w1, w2) that gives an element in the generalized Extended Bloch group
977
+ which is the Extended Bloch group corresponding to the Riemann surface
978
+ given by:</p>
979
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">u1</span> <span class="o">*</span> <span class="n">e</span><span class="o">^</span><span class="n">w0</span> <span class="o">+</span> <span class="n">u2</span> <span class="o">*</span> <span class="n">e</span><span class="o">^</span><span class="n">w1</span> <span class="o">=</span> <span class="mi">1</span>
980
+ </pre></div>
981
+ </div>
982
+ <p>where u1^N = u2^N = 1.</p>
983
+ <p>A representation in SL(n,C) and SL(n,C)/{+1,-1} with n even gives an element
984
+ in the generalized Extended Bloch group for N = 2.
985
+ A representation in PSL(n,C) with n even in the group for N = n.
986
+ A representation in PSL(n,C) with n odd in the group for N = 2 * n.</p>
987
+ <p>This work has not been published yet.</p>
988
+ <p>If f is a flattening, then in the notation of Neumann, the value of:</p>
989
+ <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">f</span><span class="p">[</span><span class="s1">&#39;z_xxxx_y&#39;</span><span class="p">]</span> <span class="ow">is</span> <span class="p">(</span><span class="n">w0</span><span class="p">,</span> <span class="n">z</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
990
+ <span class="n">f</span><span class="p">[</span><span class="s1">&#39;zp_xxxx_y&#39;</span><span class="p">]</span> <span class="ow">is</span> <span class="p">(</span><span class="n">w1</span><span class="p">,</span> <span class="n">z</span><span class="s1">&#39;, q)</span>
991
+ <span class="n">f</span><span class="p">[</span><span class="s1">&#39;zpp_xxxx_y&#39;</span><span class="p">]</span> <span class="ow">is</span> <span class="p">(</span><span class="n">w2</span><span class="p">,</span> <span class="n">z</span><span class="s1">&#39;&#39;</span><span class="p">,</span> <span class="n">r</span><span class="p">)</span><span class="o">.</span>
992
+ </pre></div>
993
+ </div>
994
+ <dl class="py method">
995
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.N">
996
+ <span class="sig-name descname"><span class="pre">N</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.N" title="Link to this definition"></a></dt>
997
+ <dd><p>Get the N such that these cross ratios are for
998
+ SL/PSL(N,C)-representations.</p>
999
+ </dd></dl>
1000
+
1001
+ <dl class="py method">
1002
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.check_against_manifold">
1003
+ <span class="sig-name descname"><span class="pre">check_against_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</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">epsilon</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">1e-10</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.check_against_manifold" title="Link to this definition"></a></dt>
1004
+ <dd><p>Checks that the flattening really is a solution to the logarithmic
1005
+ PGL(N,C) gluing equations of a manifold. Usage similar to
1006
+ check_against_manifold of Ptolemy Coordinates, see
1007
+ help(ptolemy.Coordinates) for similar examples.</p>
1008
+ <p>=== Arguments ===</p>
1009
+ <p>M manifold to check this for
1010
+ epsilon maximal allowed error when checking the equations</p>
1011
+ </dd></dl>
1012
+
1013
+ <dl class="py method">
1014
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.complex_volume">
1015
+ <span class="sig-name descname"><span class="pre">complex_volume</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">with_modulo</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.ptolemy.coordinates.Flattenings.complex_volume" title="Link to this definition"></a></dt>
1016
+ <dd><p>Compute complex volume. The complex volume is defined only up to
1017
+ some multiple of m where m = i * pi**2/6 for PSL(2,C) and SL(N,C)
1018
+ and m = i * pi**2/18 for PSL(3,C).</p>
1019
+ <p>When called with with_modulo = True, gives a pair
1020
+ (volume, m)</p>
1021
+ </dd></dl>
1022
+
1023
+ <dl class="py method">
1024
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.from_tetrahedra_shapes_of_manifold">
1025
+ <em class="property"><span class="pre">classmethod</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">from_tetrahedra_shapes_of_manifold</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">M</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.from_tetrahedra_shapes_of_manifold" title="Link to this definition"></a></dt>
1026
+ <dd><p>Takes as argument a manifold and produces (weak) flattenings using
1027
+ the tetrahedra_shapes of the manifold M.</p>
1028
+ <div class="doctest 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>
1029
+ <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;5_2&quot;</span><span class="p">)</span>
1030
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span> <span class="o">=</span> <span class="n">Flattenings</span><span class="o">.</span><span class="n">from_tetrahedra_shapes_of_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">)</span>
1031
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">(</span><span class="n">M</span><span class="p">)</span>
1032
+ <span class="gp">&gt;&gt;&gt; </span><span class="n">flattenings</span><span class="o">.</span><span class="n">check_against_manifold</span><span class="p">()</span>
1033
+ </pre></div>
1034
+ </div>
1035
+ </dd></dl>
1036
+
1037
+ <dl class="py method">
1038
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.get_manifold">
1039
+ <span class="sig-name descname"><span class="pre">get_manifold</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.get_manifold" title="Link to this definition"></a></dt>
1040
+ <dd><p>Get the manifold for which this structure represents a flattening.</p>
1041
+ </dd></dl>
1042
+
1043
+ <dl class="py method">
1044
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.get_order">
1045
+ <span class="sig-name descname"><span class="pre">get_order</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.get_order" title="Link to this definition"></a></dt>
1046
+ <dd><p>Returns the number N. This flattening represents an element in the
1047
+ generalized Extended Bloch group for the Riemann surface given by
1048
+ u1 * e^w0 + u2 * e^w1 = 1 where u1^N = u2^N = 1.</p>
1049
+ </dd></dl>
1050
+
1051
+ <dl class="py method">
1052
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.get_zpq_triple">
1053
+ <span class="sig-name descname"><span class="pre">get_zpq_triple</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">key_z</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.get_zpq_triple" title="Link to this definition"></a></dt>
1054
+ <dd><p>Gives a flattening as triple [z;p,q] representing an element
1055
+ in the generalized Extended Bloch group similar to the way the
1056
+ triple [z;p,q] is used in Lemma 3.2 in
1057
+ Walter D. Neumann, Extended Bloch group and the Cheeger-Chern-Simons class
1058
+ <a class="reference external" href="https://arxiv.org/abs/math.GT/0307092">https://arxiv.org/abs/math.GT/0307092</a></p>
1059
+ </dd></dl>
1060
+
1061
+ <dl class="py method">
1062
+ <dt class="sig sig-object py" id="snappy.ptolemy.coordinates.Flattenings.num_tetrahedra">
1063
+ <span class="sig-name descname"><span class="pre">num_tetrahedra</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#snappy.ptolemy.coordinates.Flattenings.num_tetrahedra" title="Link to this definition"></a></dt>
1064
+ <dd><p>The number of tetrahedra for which we have cross ratios.</p>
1065
+ </dd></dl>
1066
+
1067
+ </dd></dl>
1068
+
1069
+ </section>
1070
+ <section id="nonzerodimensionalcomponent">
1071
+ <h2>NonZeroDimensionalComponent<a class="headerlink" href="#nonzerodimensionalcomponent" title="Link to this heading"></a></h2>
1072
+ <dl class="py class">
1073
+ <dt class="sig sig-object py" id="snappy.ptolemy.component.NonZeroDimensionalComponent">
1074
+ <em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.component.</span></span><span class="sig-name descname"><span class="pre">NonZeroDimensionalComponent</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">witnesses</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">dimension</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'unknown'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">free_variables</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">genus</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">p</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.ptolemy.component.NonZeroDimensionalComponent" title="Link to this definition"></a></dt>
1075
+ <dd><p>Represents a non-zero dimensional component in the
1076
+ Ptolemy variety. It is a list that can hold points sampled from that
1077
+ component (witnesses).</p>
1078
+ </dd></dl>
1079
+
1080
+ </section>
1081
+ <section id="other-functions">
1082
+ <h2>Other functions<a class="headerlink" href="#other-functions" title="Link to this heading"></a></h2>
1083
+ <dl class="py function">
1084
+ <dt class="sig sig-object py" id="snappy.ptolemy.solutions_from_magma">
1085
+ <span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.</span></span><span class="sig-name descname"><span class="pre">solutions_from_magma</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">output</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">numerical</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.ptolemy.solutions_from_magma" title="Link to this definition"></a></dt>
1086
+ <dd><p>Obsolete, use processFileDispatch.parse_solutions instead.</p>
1087
+ <p>Assumes the given string is the output of a magma computation, parses
1088
+ it and returns a list of solutions.
1089
+ A non-zero dimensional component of the variety is reported as
1090
+ NonZeroDimensionalComponent.</p>
1091
+ </dd></dl>
1092
+
1093
+ <dl class="py function">
1094
+ <dt class="sig sig-object py" id="snappy.ptolemy.solutions_from_magma_file">
1095
+ <span class="sig-prename descclassname"><span class="pre">snappy.ptolemy.</span></span><span class="sig-name descname"><span class="pre">solutions_from_magma_file</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">filename</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">numerical</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.ptolemy.solutions_from_magma_file" title="Link to this definition"></a></dt>
1096
+ <dd><p>Obsolete, use processFileDispatch.parse_solutions_from_file instead.</p>
1097
+ <p>Reads the output from a magma computation from the file with the given
1098
+ filename and returns a list of solutions. Also see solutions_from_magma.
1099
+ A non-zero dimensional component of the variety is reported as
1100
+ NonZeroDimensionalComponent.</p>
1101
+ </dd></dl>
1102
+
1103
+ <div role="list" class="citation-list">
1104
+ <div class="citation" id="fkr2013" role="doc-biblioentry">
1105
+ <span class="label"><span class="fn-bracket">[</span>FKR2013<span class="fn-bracket">]</span></span>
1106
+ <span class="backrefs">(<a role="doc-backlink" href="#id1">1</a>,<a role="doc-backlink" href="#id2">2</a>)</span>
1107
+ <p>Falbel, Koseleff, Rouillier: Representations of Fundamental Groups of 3-Manifolds into PGL(3,C): Exact Computations in Low Complexity, <a class="reference external" href="http://arxiv.org/abs/1307.6697">http://arxiv.org/abs/1307.6697</a></p>
1108
+ </div>
1109
+ </div>
1110
+ </section>
1111
+ </section>
1112
+
1113
+
1114
+ </div>
1115
+ </div>
1116
+ <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
1117
+ <a href="ptolemy_examples4.html" class="btn btn-neutral float-left" title="Step-by-step examples: Part 4" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
1118
+ <a href="news.html" class="btn btn-neutral float-right" title="News" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
1119
+ </div>
1120
+
1121
+ <hr/>
1122
+
1123
+ <div role="contentinfo">
1124
+ <p>&#169; Copyright 2009-2025, by Marc Culler, Nathan Dunfield, Matthias Goerner, Jeffrey Weeks and others.</p>
1125
+ </div>
1126
+
1127
+ Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
1128
+ <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
1129
+ provided by <a href="https://readthedocs.org">Read the Docs</a>.
1130
+
1131
+
1132
+ </footer>
1133
+ </div>
1134
+ </div>
1135
+ </section>
1136
+ </div>
1137
+ <script>
1138
+ jQuery(function () {
1139
+ SphinxRtdTheme.Navigation.enable(true);
1140
+ });
1141
+ </script>
1142
+
1143
+ </body>
1147
1144
  </html>