passagemath-modules 10.6.31__cp314-cp314-macosx_13_0_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-modules might be problematic. Click here for more details.

Files changed (807) hide show
  1. passagemath_modules-10.6.31.dist-info/METADATA +281 -0
  2. passagemath_modules-10.6.31.dist-info/RECORD +807 -0
  3. passagemath_modules-10.6.31.dist-info/WHEEL +6 -0
  4. passagemath_modules-10.6.31.dist-info/top_level.txt +2 -0
  5. passagemath_modules.dylibs/libgfortran.5.dylib +0 -0
  6. passagemath_modules.dylibs/libgmp.10.dylib +0 -0
  7. passagemath_modules.dylibs/libgsl.28.dylib +0 -0
  8. passagemath_modules.dylibs/libmpc.3.dylib +0 -0
  9. passagemath_modules.dylibs/libmpfr.6.dylib +0 -0
  10. passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
  11. passagemath_modules.dylibs/libquadmath.0.dylib +0 -0
  12. sage/algebras/all__sagemath_modules.py +20 -0
  13. sage/algebras/catalog.py +148 -0
  14. sage/algebras/clifford_algebra.py +3107 -0
  15. sage/algebras/clifford_algebra_element.cpython-314-darwin.so +0 -0
  16. sage/algebras/clifford_algebra_element.pxd +16 -0
  17. sage/algebras/clifford_algebra_element.pyx +997 -0
  18. sage/algebras/commutative_dga.py +4252 -0
  19. sage/algebras/exterior_algebra_groebner.cpython-314-darwin.so +0 -0
  20. sage/algebras/exterior_algebra_groebner.pxd +55 -0
  21. sage/algebras/exterior_algebra_groebner.pyx +727 -0
  22. sage/algebras/finite_dimensional_algebras/all.py +2 -0
  23. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +1029 -0
  24. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-314-darwin.so +0 -0
  25. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +12 -0
  26. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +706 -0
  27. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py +196 -0
  28. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py +255 -0
  29. sage/algebras/finite_gca.py +528 -0
  30. sage/algebras/group_algebra.py +232 -0
  31. sage/algebras/lie_algebras/abelian.py +197 -0
  32. sage/algebras/lie_algebras/affine_lie_algebra.py +1213 -0
  33. sage/algebras/lie_algebras/all.py +25 -0
  34. sage/algebras/lie_algebras/all__sagemath_modules.py +1 -0
  35. sage/algebras/lie_algebras/bch.py +177 -0
  36. sage/algebras/lie_algebras/bgg_dual_module.py +1184 -0
  37. sage/algebras/lie_algebras/bgg_resolution.py +232 -0
  38. sage/algebras/lie_algebras/center_uea.py +767 -0
  39. sage/algebras/lie_algebras/classical_lie_algebra.py +2516 -0
  40. sage/algebras/lie_algebras/examples.py +683 -0
  41. sage/algebras/lie_algebras/free_lie_algebra.py +973 -0
  42. sage/algebras/lie_algebras/heisenberg.py +820 -0
  43. sage/algebras/lie_algebras/lie_algebra.py +1562 -0
  44. sage/algebras/lie_algebras/lie_algebra_element.cpython-314-darwin.so +0 -0
  45. sage/algebras/lie_algebras/lie_algebra_element.pxd +68 -0
  46. sage/algebras/lie_algebras/lie_algebra_element.pyx +2122 -0
  47. sage/algebras/lie_algebras/morphism.py +661 -0
  48. sage/algebras/lie_algebras/nilpotent_lie_algebra.py +457 -0
  49. sage/algebras/lie_algebras/onsager.py +1324 -0
  50. sage/algebras/lie_algebras/poincare_birkhoff_witt.py +816 -0
  51. sage/algebras/lie_algebras/quotient.py +462 -0
  52. sage/algebras/lie_algebras/rank_two_heisenberg_virasoro.py +355 -0
  53. sage/algebras/lie_algebras/representation.py +1040 -0
  54. sage/algebras/lie_algebras/structure_coefficients.py +459 -0
  55. sage/algebras/lie_algebras/subalgebra.py +967 -0
  56. sage/algebras/lie_algebras/symplectic_derivation.py +289 -0
  57. sage/algebras/lie_algebras/verma_module.py +1630 -0
  58. sage/algebras/lie_algebras/virasoro.py +1186 -0
  59. sage/algebras/octonion_algebra.cpython-314-darwin.so +0 -0
  60. sage/algebras/octonion_algebra.pxd +20 -0
  61. sage/algebras/octonion_algebra.pyx +987 -0
  62. sage/algebras/orlik_solomon.py +907 -0
  63. sage/algebras/orlik_terao.py +779 -0
  64. sage/algebras/steenrod/all.py +7 -0
  65. sage/algebras/steenrod/steenrod_algebra.py +4258 -0
  66. sage/algebras/steenrod/steenrod_algebra_bases.py +1179 -0
  67. sage/algebras/steenrod/steenrod_algebra_misc.py +1167 -0
  68. sage/algebras/steenrod/steenrod_algebra_mult.py +954 -0
  69. sage/algebras/weyl_algebra.py +1126 -0
  70. sage/all__sagemath_modules.py +62 -0
  71. sage/calculus/all__sagemath_modules.py +19 -0
  72. sage/calculus/expr.py +205 -0
  73. sage/calculus/integration.cpython-314-darwin.so +0 -0
  74. sage/calculus/integration.pyx +698 -0
  75. sage/calculus/interpolation.cpython-314-darwin.so +0 -0
  76. sage/calculus/interpolation.pxd +13 -0
  77. sage/calculus/interpolation.pyx +387 -0
  78. sage/calculus/interpolators.cpython-314-darwin.so +0 -0
  79. sage/calculus/interpolators.pyx +326 -0
  80. sage/calculus/ode.cpython-314-darwin.so +0 -0
  81. sage/calculus/ode.pxd +5 -0
  82. sage/calculus/ode.pyx +610 -0
  83. sage/calculus/riemann.cpython-314-darwin.so +0 -0
  84. sage/calculus/riemann.pyx +1521 -0
  85. sage/calculus/test_sympy.py +201 -0
  86. sage/calculus/transforms/all.py +7 -0
  87. sage/calculus/transforms/dft.py +844 -0
  88. sage/calculus/transforms/dwt.cpython-314-darwin.so +0 -0
  89. sage/calculus/transforms/dwt.pxd +7 -0
  90. sage/calculus/transforms/dwt.pyx +160 -0
  91. sage/calculus/transforms/fft.cpython-314-darwin.so +0 -0
  92. sage/calculus/transforms/fft.pxd +12 -0
  93. sage/calculus/transforms/fft.pyx +487 -0
  94. sage/calculus/wester.py +662 -0
  95. sage/coding/abstract_code.py +1108 -0
  96. sage/coding/ag_code.py +868 -0
  97. sage/coding/ag_code_decoders.cpython-314-darwin.so +0 -0
  98. sage/coding/ag_code_decoders.pyx +2639 -0
  99. sage/coding/all.py +15 -0
  100. sage/coding/bch_code.py +494 -0
  101. sage/coding/binary_code.cpython-314-darwin.so +0 -0
  102. sage/coding/binary_code.pxd +124 -0
  103. sage/coding/binary_code.pyx +4139 -0
  104. sage/coding/bounds_catalog.py +43 -0
  105. sage/coding/channel.py +819 -0
  106. sage/coding/channels_catalog.py +29 -0
  107. sage/coding/code_bounds.py +755 -0
  108. sage/coding/code_constructions.py +804 -0
  109. sage/coding/codes_catalog.py +111 -0
  110. sage/coding/cyclic_code.py +1329 -0
  111. sage/coding/databases.py +316 -0
  112. sage/coding/decoder.py +373 -0
  113. sage/coding/decoders_catalog.py +88 -0
  114. sage/coding/delsarte_bounds.py +709 -0
  115. sage/coding/encoder.py +390 -0
  116. sage/coding/encoders_catalog.py +64 -0
  117. sage/coding/extended_code.py +468 -0
  118. sage/coding/gabidulin_code.py +1058 -0
  119. sage/coding/golay_code.py +404 -0
  120. sage/coding/goppa_code.py +441 -0
  121. sage/coding/grs_code.py +2371 -0
  122. sage/coding/guava.py +107 -0
  123. sage/coding/guruswami_sudan/all.py +1 -0
  124. sage/coding/guruswami_sudan/gs_decoder.py +897 -0
  125. sage/coding/guruswami_sudan/interpolation.py +409 -0
  126. sage/coding/guruswami_sudan/utils.py +176 -0
  127. sage/coding/hamming_code.py +176 -0
  128. sage/coding/information_set_decoder.py +1032 -0
  129. sage/coding/kasami_codes.cpython-314-darwin.so +0 -0
  130. sage/coding/kasami_codes.pyx +351 -0
  131. sage/coding/linear_code.py +3067 -0
  132. sage/coding/linear_code_no_metric.py +1354 -0
  133. sage/coding/linear_rank_metric.py +961 -0
  134. sage/coding/parity_check_code.py +353 -0
  135. sage/coding/punctured_code.py +719 -0
  136. sage/coding/reed_muller_code.py +999 -0
  137. sage/coding/self_dual_codes.py +942 -0
  138. sage/coding/source_coding/all.py +2 -0
  139. sage/coding/source_coding/huffman.py +553 -0
  140. sage/coding/subfield_subcode.py +423 -0
  141. sage/coding/two_weight_db.py +399 -0
  142. sage/combinat/all__sagemath_modules.py +7 -0
  143. sage/combinat/cartesian_product.py +347 -0
  144. sage/combinat/family.py +11 -0
  145. sage/combinat/free_module.py +1977 -0
  146. sage/combinat/root_system/all.py +147 -0
  147. sage/combinat/root_system/ambient_space.py +527 -0
  148. sage/combinat/root_system/associahedron.py +471 -0
  149. sage/combinat/root_system/braid_move_calculator.py +143 -0
  150. sage/combinat/root_system/braid_orbit.cpython-314-darwin.so +0 -0
  151. sage/combinat/root_system/braid_orbit.pyx +144 -0
  152. sage/combinat/root_system/branching_rules.py +2301 -0
  153. sage/combinat/root_system/cartan_matrix.py +1245 -0
  154. sage/combinat/root_system/cartan_type.py +3069 -0
  155. sage/combinat/root_system/coxeter_group.py +162 -0
  156. sage/combinat/root_system/coxeter_matrix.py +1261 -0
  157. sage/combinat/root_system/coxeter_type.py +681 -0
  158. sage/combinat/root_system/dynkin_diagram.py +900 -0
  159. sage/combinat/root_system/extended_affine_weyl_group.py +2993 -0
  160. sage/combinat/root_system/fundamental_group.py +795 -0
  161. sage/combinat/root_system/hecke_algebra_representation.py +1203 -0
  162. sage/combinat/root_system/integrable_representations.py +1227 -0
  163. sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +1965 -0
  164. sage/combinat/root_system/pieri_factors.py +1147 -0
  165. sage/combinat/root_system/plot.py +1615 -0
  166. sage/combinat/root_system/root_lattice_realization_algebras.py +1214 -0
  167. sage/combinat/root_system/root_lattice_realizations.py +4628 -0
  168. sage/combinat/root_system/root_space.py +487 -0
  169. sage/combinat/root_system/root_system.py +882 -0
  170. sage/combinat/root_system/type_A.py +348 -0
  171. sage/combinat/root_system/type_A_affine.py +227 -0
  172. sage/combinat/root_system/type_A_infinity.py +241 -0
  173. sage/combinat/root_system/type_B.py +347 -0
  174. sage/combinat/root_system/type_BC_affine.py +287 -0
  175. sage/combinat/root_system/type_B_affine.py +216 -0
  176. sage/combinat/root_system/type_C.py +317 -0
  177. sage/combinat/root_system/type_C_affine.py +188 -0
  178. sage/combinat/root_system/type_D.py +357 -0
  179. sage/combinat/root_system/type_D_affine.py +208 -0
  180. sage/combinat/root_system/type_E.py +641 -0
  181. sage/combinat/root_system/type_E_affine.py +231 -0
  182. sage/combinat/root_system/type_F.py +387 -0
  183. sage/combinat/root_system/type_F_affine.py +137 -0
  184. sage/combinat/root_system/type_G.py +293 -0
  185. sage/combinat/root_system/type_G_affine.py +132 -0
  186. sage/combinat/root_system/type_H.py +105 -0
  187. sage/combinat/root_system/type_I.py +110 -0
  188. sage/combinat/root_system/type_Q.py +150 -0
  189. sage/combinat/root_system/type_affine.py +509 -0
  190. sage/combinat/root_system/type_dual.py +704 -0
  191. sage/combinat/root_system/type_folded.py +301 -0
  192. sage/combinat/root_system/type_marked.py +748 -0
  193. sage/combinat/root_system/type_reducible.py +601 -0
  194. sage/combinat/root_system/type_relabel.py +730 -0
  195. sage/combinat/root_system/type_super_A.py +837 -0
  196. sage/combinat/root_system/weight_lattice_realizations.py +1188 -0
  197. sage/combinat/root_system/weight_space.py +639 -0
  198. sage/combinat/root_system/weyl_characters.py +2238 -0
  199. sage/crypto/__init__.py +4 -0
  200. sage/crypto/all.py +28 -0
  201. sage/crypto/block_cipher/all.py +7 -0
  202. sage/crypto/block_cipher/des.py +1065 -0
  203. sage/crypto/block_cipher/miniaes.py +2171 -0
  204. sage/crypto/block_cipher/present.py +909 -0
  205. sage/crypto/block_cipher/sdes.py +1527 -0
  206. sage/crypto/boolean_function.cpython-314-darwin.so +0 -0
  207. sage/crypto/boolean_function.pxd +10 -0
  208. sage/crypto/boolean_function.pyx +1487 -0
  209. sage/crypto/cipher.py +78 -0
  210. sage/crypto/classical.py +3668 -0
  211. sage/crypto/classical_cipher.py +569 -0
  212. sage/crypto/cryptosystem.py +387 -0
  213. sage/crypto/key_exchange/all.py +7 -0
  214. sage/crypto/key_exchange/catalog.py +24 -0
  215. sage/crypto/key_exchange/diffie_hellman.py +323 -0
  216. sage/crypto/key_exchange/key_exchange_scheme.py +107 -0
  217. sage/crypto/lattice.py +312 -0
  218. sage/crypto/lfsr.py +295 -0
  219. sage/crypto/lwe.py +840 -0
  220. sage/crypto/mq/__init__.py +4 -0
  221. sage/crypto/mq/mpolynomialsystemgenerator.py +204 -0
  222. sage/crypto/mq/rijndael_gf.py +2345 -0
  223. sage/crypto/mq/sbox.py +7 -0
  224. sage/crypto/mq/sr.py +3344 -0
  225. sage/crypto/public_key/all.py +5 -0
  226. sage/crypto/public_key/blum_goldwasser.py +776 -0
  227. sage/crypto/sbox.cpython-314-darwin.so +0 -0
  228. sage/crypto/sbox.pyx +2090 -0
  229. sage/crypto/sboxes.py +2090 -0
  230. sage/crypto/stream.py +390 -0
  231. sage/crypto/stream_cipher.py +297 -0
  232. sage/crypto/util.py +519 -0
  233. sage/ext/all__sagemath_modules.py +1 -0
  234. sage/ext/interpreters/__init__.py +1 -0
  235. sage/ext/interpreters/all__sagemath_modules.py +2 -0
  236. sage/ext/interpreters/wrapper_cc.cpython-314-darwin.so +0 -0
  237. sage/ext/interpreters/wrapper_cc.pxd +30 -0
  238. sage/ext/interpreters/wrapper_cc.pyx +252 -0
  239. sage/ext/interpreters/wrapper_cdf.cpython-314-darwin.so +0 -0
  240. sage/ext/interpreters/wrapper_cdf.pxd +26 -0
  241. sage/ext/interpreters/wrapper_cdf.pyx +245 -0
  242. sage/ext/interpreters/wrapper_rdf.cpython-314-darwin.so +0 -0
  243. sage/ext/interpreters/wrapper_rdf.pxd +23 -0
  244. sage/ext/interpreters/wrapper_rdf.pyx +221 -0
  245. sage/ext/interpreters/wrapper_rr.cpython-314-darwin.so +0 -0
  246. sage/ext/interpreters/wrapper_rr.pxd +28 -0
  247. sage/ext/interpreters/wrapper_rr.pyx +335 -0
  248. sage/geometry/all__sagemath_modules.py +5 -0
  249. sage/geometry/toric_lattice.py +1745 -0
  250. sage/geometry/toric_lattice_element.cpython-314-darwin.so +0 -0
  251. sage/geometry/toric_lattice_element.pyx +432 -0
  252. sage/groups/abelian_gps/abelian_group.py +1925 -0
  253. sage/groups/abelian_gps/abelian_group_element.py +164 -0
  254. sage/groups/abelian_gps/all__sagemath_modules.py +5 -0
  255. sage/groups/abelian_gps/dual_abelian_group.py +421 -0
  256. sage/groups/abelian_gps/dual_abelian_group_element.py +179 -0
  257. sage/groups/abelian_gps/element_base.py +341 -0
  258. sage/groups/abelian_gps/values.py +488 -0
  259. sage/groups/additive_abelian/additive_abelian_group.py +476 -0
  260. sage/groups/additive_abelian/additive_abelian_wrapper.py +857 -0
  261. sage/groups/additive_abelian/all.py +4 -0
  262. sage/groups/additive_abelian/qmodnz.py +231 -0
  263. sage/groups/additive_abelian/qmodnz_element.py +349 -0
  264. sage/groups/affine_gps/affine_group.py +535 -0
  265. sage/groups/affine_gps/all.py +1 -0
  266. sage/groups/affine_gps/catalog.py +17 -0
  267. sage/groups/affine_gps/euclidean_group.py +246 -0
  268. sage/groups/affine_gps/group_element.py +562 -0
  269. sage/groups/all__sagemath_modules.py +12 -0
  270. sage/groups/galois_group.py +479 -0
  271. sage/groups/matrix_gps/all.py +4 -0
  272. sage/groups/matrix_gps/all__sagemath_modules.py +13 -0
  273. sage/groups/matrix_gps/catalog.py +26 -0
  274. sage/groups/matrix_gps/coxeter_group.py +927 -0
  275. sage/groups/matrix_gps/finitely_generated.py +487 -0
  276. sage/groups/matrix_gps/group_element.cpython-314-darwin.so +0 -0
  277. sage/groups/matrix_gps/group_element.pxd +11 -0
  278. sage/groups/matrix_gps/group_element.pyx +431 -0
  279. sage/groups/matrix_gps/linear.py +440 -0
  280. sage/groups/matrix_gps/matrix_group.py +617 -0
  281. sage/groups/matrix_gps/named_group.py +296 -0
  282. sage/groups/matrix_gps/orthogonal.py +544 -0
  283. sage/groups/matrix_gps/symplectic.py +251 -0
  284. sage/groups/matrix_gps/unitary.py +436 -0
  285. sage/groups/misc_gps/all__sagemath_modules.py +1 -0
  286. sage/groups/misc_gps/argument_groups.py +1905 -0
  287. sage/groups/misc_gps/imaginary_groups.py +479 -0
  288. sage/groups/perm_gps/all__sagemath_modules.py +1 -0
  289. sage/groups/perm_gps/partn_ref/all__sagemath_modules.py +1 -0
  290. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-314-darwin.so +0 -0
  291. sage/groups/perm_gps/partn_ref/refinement_binary.pxd +41 -0
  292. sage/groups/perm_gps/partn_ref/refinement_binary.pyx +1167 -0
  293. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-314-darwin.so +0 -0
  294. sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +31 -0
  295. sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +385 -0
  296. sage/homology/algebraic_topological_model.py +595 -0
  297. sage/homology/all.py +2 -0
  298. sage/homology/all__sagemath_modules.py +8 -0
  299. sage/homology/chain_complex.py +2148 -0
  300. sage/homology/chain_complex_homspace.py +165 -0
  301. sage/homology/chain_complex_morphism.py +629 -0
  302. sage/homology/chain_homotopy.py +604 -0
  303. sage/homology/chains.py +653 -0
  304. sage/homology/free_resolution.py +923 -0
  305. sage/homology/graded_resolution.py +567 -0
  306. sage/homology/hochschild_complex.py +756 -0
  307. sage/homology/homology_group.py +188 -0
  308. sage/homology/homology_morphism.py +422 -0
  309. sage/homology/homology_vector_space_with_basis.py +1454 -0
  310. sage/homology/koszul_complex.py +169 -0
  311. sage/homology/matrix_utils.py +205 -0
  312. sage/libs/all__sagemath_modules.py +1 -0
  313. sage/libs/gsl/__init__.py +1 -0
  314. sage/libs/gsl/airy.pxd +56 -0
  315. sage/libs/gsl/all.pxd +66 -0
  316. sage/libs/gsl/array.cpython-314-darwin.so +0 -0
  317. sage/libs/gsl/array.pxd +5 -0
  318. sage/libs/gsl/array.pyx +102 -0
  319. sage/libs/gsl/bessel.pxd +208 -0
  320. sage/libs/gsl/blas.pxd +116 -0
  321. sage/libs/gsl/blas_types.pxd +34 -0
  322. sage/libs/gsl/block.pxd +52 -0
  323. sage/libs/gsl/chebyshev.pxd +37 -0
  324. sage/libs/gsl/clausen.pxd +12 -0
  325. sage/libs/gsl/combination.pxd +47 -0
  326. sage/libs/gsl/complex.pxd +151 -0
  327. sage/libs/gsl/coulomb.pxd +30 -0
  328. sage/libs/gsl/coupling.pxd +21 -0
  329. sage/libs/gsl/dawson.pxd +12 -0
  330. sage/libs/gsl/debye.pxd +24 -0
  331. sage/libs/gsl/dilog.pxd +14 -0
  332. sage/libs/gsl/eigen.pxd +46 -0
  333. sage/libs/gsl/elementary.pxd +12 -0
  334. sage/libs/gsl/ellint.pxd +48 -0
  335. sage/libs/gsl/elljac.pxd +8 -0
  336. sage/libs/gsl/erf.pxd +32 -0
  337. sage/libs/gsl/errno.pxd +26 -0
  338. sage/libs/gsl/exp.pxd +44 -0
  339. sage/libs/gsl/expint.pxd +44 -0
  340. sage/libs/gsl/fermi_dirac.pxd +44 -0
  341. sage/libs/gsl/fft.pxd +121 -0
  342. sage/libs/gsl/fit.pxd +50 -0
  343. sage/libs/gsl/gamma.pxd +94 -0
  344. sage/libs/gsl/gegenbauer.pxd +26 -0
  345. sage/libs/gsl/histogram.pxd +176 -0
  346. sage/libs/gsl/hyperg.pxd +52 -0
  347. sage/libs/gsl/integration.pxd +69 -0
  348. sage/libs/gsl/interp.pxd +109 -0
  349. sage/libs/gsl/laguerre.pxd +24 -0
  350. sage/libs/gsl/lambert.pxd +16 -0
  351. sage/libs/gsl/legendre.pxd +90 -0
  352. sage/libs/gsl/linalg.pxd +185 -0
  353. sage/libs/gsl/log.pxd +26 -0
  354. sage/libs/gsl/math.pxd +43 -0
  355. sage/libs/gsl/matrix.pxd +143 -0
  356. sage/libs/gsl/matrix_complex.pxd +130 -0
  357. sage/libs/gsl/min.pxd +67 -0
  358. sage/libs/gsl/monte.pxd +56 -0
  359. sage/libs/gsl/ntuple.pxd +32 -0
  360. sage/libs/gsl/odeiv.pxd +70 -0
  361. sage/libs/gsl/permutation.pxd +78 -0
  362. sage/libs/gsl/poly.pxd +40 -0
  363. sage/libs/gsl/pow_int.pxd +12 -0
  364. sage/libs/gsl/psi.pxd +28 -0
  365. sage/libs/gsl/qrng.pxd +29 -0
  366. sage/libs/gsl/random.pxd +257 -0
  367. sage/libs/gsl/rng.pxd +100 -0
  368. sage/libs/gsl/roots.pxd +72 -0
  369. sage/libs/gsl/sort.pxd +36 -0
  370. sage/libs/gsl/statistics.pxd +59 -0
  371. sage/libs/gsl/sum.pxd +55 -0
  372. sage/libs/gsl/synchrotron.pxd +16 -0
  373. sage/libs/gsl/transport.pxd +24 -0
  374. sage/libs/gsl/trig.pxd +58 -0
  375. sage/libs/gsl/types.pxd +137 -0
  376. sage/libs/gsl/vector.pxd +101 -0
  377. sage/libs/gsl/vector_complex.pxd +83 -0
  378. sage/libs/gsl/wavelet.pxd +49 -0
  379. sage/libs/gsl/zeta.pxd +28 -0
  380. sage/libs/mpc/__init__.pxd +114 -0
  381. sage/libs/mpc/types.pxd +28 -0
  382. sage/libs/mpfr/__init__.pxd +299 -0
  383. sage/libs/mpfr/types.pxd +26 -0
  384. sage/libs/mpmath/__init__.py +1 -0
  385. sage/libs/mpmath/all.py +27 -0
  386. sage/libs/mpmath/all__sagemath_modules.py +1 -0
  387. sage/libs/mpmath/utils.cpython-314-darwin.so +0 -0
  388. sage/libs/mpmath/utils.pxd +4 -0
  389. sage/libs/mpmath/utils.pyx +319 -0
  390. sage/matrix/action.cpython-314-darwin.so +0 -0
  391. sage/matrix/action.pxd +26 -0
  392. sage/matrix/action.pyx +596 -0
  393. sage/matrix/all.py +9 -0
  394. sage/matrix/args.cpython-314-darwin.so +0 -0
  395. sage/matrix/args.pxd +144 -0
  396. sage/matrix/args.pyx +1668 -0
  397. sage/matrix/benchmark.py +1258 -0
  398. sage/matrix/berlekamp_massey.py +95 -0
  399. sage/matrix/compute_J_ideal.py +926 -0
  400. sage/matrix/constructor.cpython-314-darwin.so +0 -0
  401. sage/matrix/constructor.pyx +750 -0
  402. sage/matrix/docs.py +430 -0
  403. sage/matrix/echelon_matrix.cpython-314-darwin.so +0 -0
  404. sage/matrix/echelon_matrix.pyx +155 -0
  405. sage/matrix/matrix.pxd +2 -0
  406. sage/matrix/matrix0.cpython-314-darwin.so +0 -0
  407. sage/matrix/matrix0.pxd +68 -0
  408. sage/matrix/matrix0.pyx +6324 -0
  409. sage/matrix/matrix1.cpython-314-darwin.so +0 -0
  410. sage/matrix/matrix1.pxd +8 -0
  411. sage/matrix/matrix1.pyx +2851 -0
  412. sage/matrix/matrix2.cpython-314-darwin.so +0 -0
  413. sage/matrix/matrix2.pxd +25 -0
  414. sage/matrix/matrix2.pyx +20181 -0
  415. sage/matrix/matrix_cdv.cpython-314-darwin.so +0 -0
  416. sage/matrix/matrix_cdv.pxd +4 -0
  417. sage/matrix/matrix_cdv.pyx +93 -0
  418. sage/matrix/matrix_complex_double_dense.cpython-314-darwin.so +0 -0
  419. sage/matrix/matrix_complex_double_dense.pxd +5 -0
  420. sage/matrix/matrix_complex_double_dense.pyx +98 -0
  421. sage/matrix/matrix_dense.cpython-314-darwin.so +0 -0
  422. sage/matrix/matrix_dense.pxd +5 -0
  423. sage/matrix/matrix_dense.pyx +343 -0
  424. sage/matrix/matrix_domain_dense.pxd +5 -0
  425. sage/matrix/matrix_domain_sparse.pxd +5 -0
  426. sage/matrix/matrix_double_dense.cpython-314-darwin.so +0 -0
  427. sage/matrix/matrix_double_dense.pxd +7 -0
  428. sage/matrix/matrix_double_dense.pyx +3906 -0
  429. sage/matrix/matrix_double_sparse.cpython-314-darwin.so +0 -0
  430. sage/matrix/matrix_double_sparse.pxd +6 -0
  431. sage/matrix/matrix_double_sparse.pyx +248 -0
  432. sage/matrix/matrix_generic_dense.cpython-314-darwin.so +0 -0
  433. sage/matrix/matrix_generic_dense.pxd +7 -0
  434. sage/matrix/matrix_generic_dense.pyx +354 -0
  435. sage/matrix/matrix_generic_sparse.cpython-314-darwin.so +0 -0
  436. sage/matrix/matrix_generic_sparse.pxd +7 -0
  437. sage/matrix/matrix_generic_sparse.pyx +461 -0
  438. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-314-darwin.so +0 -0
  439. sage/matrix/matrix_laurent_mpolynomial_dense.pxd +5 -0
  440. sage/matrix/matrix_laurent_mpolynomial_dense.pyx +115 -0
  441. sage/matrix/matrix_misc.py +313 -0
  442. sage/matrix/matrix_numpy_dense.cpython-314-darwin.so +0 -0
  443. sage/matrix/matrix_numpy_dense.pxd +14 -0
  444. sage/matrix/matrix_numpy_dense.pyx +450 -0
  445. sage/matrix/matrix_numpy_integer_dense.cpython-314-darwin.so +0 -0
  446. sage/matrix/matrix_numpy_integer_dense.pxd +7 -0
  447. sage/matrix/matrix_numpy_integer_dense.pyx +59 -0
  448. sage/matrix/matrix_polynomial_dense.cpython-314-darwin.so +0 -0
  449. sage/matrix/matrix_polynomial_dense.pxd +5 -0
  450. sage/matrix/matrix_polynomial_dense.pyx +5341 -0
  451. sage/matrix/matrix_real_double_dense.cpython-314-darwin.so +0 -0
  452. sage/matrix/matrix_real_double_dense.pxd +7 -0
  453. sage/matrix/matrix_real_double_dense.pyx +122 -0
  454. sage/matrix/matrix_space.py +2848 -0
  455. sage/matrix/matrix_sparse.cpython-314-darwin.so +0 -0
  456. sage/matrix/matrix_sparse.pxd +5 -0
  457. sage/matrix/matrix_sparse.pyx +1222 -0
  458. sage/matrix/matrix_window.cpython-314-darwin.so +0 -0
  459. sage/matrix/matrix_window.pxd +37 -0
  460. sage/matrix/matrix_window.pyx +242 -0
  461. sage/matrix/misc_mpfr.cpython-314-darwin.so +0 -0
  462. sage/matrix/misc_mpfr.pyx +80 -0
  463. sage/matrix/operation_table.py +1182 -0
  464. sage/matrix/special.py +3666 -0
  465. sage/matrix/strassen.cpython-314-darwin.so +0 -0
  466. sage/matrix/strassen.pyx +851 -0
  467. sage/matrix/symplectic_basis.py +541 -0
  468. sage/matrix/template.pxd +6 -0
  469. sage/matrix/tests.py +71 -0
  470. sage/matroids/advanced.py +77 -0
  471. sage/matroids/all.py +13 -0
  472. sage/matroids/basis_exchange_matroid.cpython-314-darwin.so +0 -0
  473. sage/matroids/basis_exchange_matroid.pxd +96 -0
  474. sage/matroids/basis_exchange_matroid.pyx +2344 -0
  475. sage/matroids/basis_matroid.cpython-314-darwin.so +0 -0
  476. sage/matroids/basis_matroid.pxd +45 -0
  477. sage/matroids/basis_matroid.pyx +1217 -0
  478. sage/matroids/catalog.py +44 -0
  479. sage/matroids/chow_ring.py +473 -0
  480. sage/matroids/chow_ring_ideal.py +849 -0
  481. sage/matroids/circuit_closures_matroid.cpython-314-darwin.so +0 -0
  482. sage/matroids/circuit_closures_matroid.pxd +16 -0
  483. sage/matroids/circuit_closures_matroid.pyx +559 -0
  484. sage/matroids/circuits_matroid.cpython-314-darwin.so +0 -0
  485. sage/matroids/circuits_matroid.pxd +38 -0
  486. sage/matroids/circuits_matroid.pyx +947 -0
  487. sage/matroids/constructor.py +1086 -0
  488. sage/matroids/database_collections.py +365 -0
  489. sage/matroids/database_matroids.py +5338 -0
  490. sage/matroids/dual_matroid.py +583 -0
  491. sage/matroids/extension.cpython-314-darwin.so +0 -0
  492. sage/matroids/extension.pxd +34 -0
  493. sage/matroids/extension.pyx +519 -0
  494. sage/matroids/flats_matroid.cpython-314-darwin.so +0 -0
  495. sage/matroids/flats_matroid.pxd +28 -0
  496. sage/matroids/flats_matroid.pyx +715 -0
  497. sage/matroids/gammoid.py +600 -0
  498. sage/matroids/graphic_matroid.cpython-314-darwin.so +0 -0
  499. sage/matroids/graphic_matroid.pxd +39 -0
  500. sage/matroids/graphic_matroid.pyx +2024 -0
  501. sage/matroids/lean_matrix.cpython-314-darwin.so +0 -0
  502. sage/matroids/lean_matrix.pxd +126 -0
  503. sage/matroids/lean_matrix.pyx +3667 -0
  504. sage/matroids/linear_matroid.cpython-314-darwin.so +0 -0
  505. sage/matroids/linear_matroid.pxd +180 -0
  506. sage/matroids/linear_matroid.pyx +6649 -0
  507. sage/matroids/matroid.cpython-314-darwin.so +0 -0
  508. sage/matroids/matroid.pxd +243 -0
  509. sage/matroids/matroid.pyx +8759 -0
  510. sage/matroids/matroids_catalog.py +190 -0
  511. sage/matroids/matroids_plot_helpers.py +890 -0
  512. sage/matroids/minor_matroid.py +480 -0
  513. sage/matroids/minorfix.h +9 -0
  514. sage/matroids/named_matroids.py +5 -0
  515. sage/matroids/rank_matroid.py +268 -0
  516. sage/matroids/set_system.cpython-314-darwin.so +0 -0
  517. sage/matroids/set_system.pxd +38 -0
  518. sage/matroids/set_system.pyx +800 -0
  519. sage/matroids/transversal_matroid.cpython-314-darwin.so +0 -0
  520. sage/matroids/transversal_matroid.pxd +14 -0
  521. sage/matroids/transversal_matroid.pyx +893 -0
  522. sage/matroids/union_matroid.cpython-314-darwin.so +0 -0
  523. sage/matroids/union_matroid.pxd +20 -0
  524. sage/matroids/union_matroid.pyx +331 -0
  525. sage/matroids/unpickling.cpython-314-darwin.so +0 -0
  526. sage/matroids/unpickling.pyx +843 -0
  527. sage/matroids/utilities.py +809 -0
  528. sage/misc/all__sagemath_modules.py +20 -0
  529. sage/misc/c3.cpython-314-darwin.so +0 -0
  530. sage/misc/c3.pyx +238 -0
  531. sage/misc/compat.py +87 -0
  532. sage/misc/element_with_label.py +173 -0
  533. sage/misc/func_persist.py +79 -0
  534. sage/misc/pickle_old.cpython-314-darwin.so +0 -0
  535. sage/misc/pickle_old.pyx +19 -0
  536. sage/misc/proof.py +7 -0
  537. sage/misc/replace_dot_all.py +472 -0
  538. sage/misc/sagedoc_conf.py +168 -0
  539. sage/misc/sphinxify.py +167 -0
  540. sage/misc/test_class_pickling.py +85 -0
  541. sage/modules/all.py +42 -0
  542. sage/modules/complex_double_vector.py +25 -0
  543. sage/modules/diamond_cutting.py +380 -0
  544. sage/modules/fg_pid/all.py +1 -0
  545. sage/modules/fg_pid/fgp_element.py +456 -0
  546. sage/modules/fg_pid/fgp_module.py +2091 -0
  547. sage/modules/fg_pid/fgp_morphism.py +550 -0
  548. sage/modules/filtered_vector_space.py +1271 -0
  549. sage/modules/finite_submodule_iter.cpython-314-darwin.so +0 -0
  550. sage/modules/finite_submodule_iter.pxd +27 -0
  551. sage/modules/finite_submodule_iter.pyx +452 -0
  552. sage/modules/fp_graded/all.py +1 -0
  553. sage/modules/fp_graded/element.py +346 -0
  554. sage/modules/fp_graded/free_element.py +298 -0
  555. sage/modules/fp_graded/free_homspace.py +53 -0
  556. sage/modules/fp_graded/free_module.py +1060 -0
  557. sage/modules/fp_graded/free_morphism.py +217 -0
  558. sage/modules/fp_graded/homspace.py +563 -0
  559. sage/modules/fp_graded/module.py +1340 -0
  560. sage/modules/fp_graded/morphism.py +1990 -0
  561. sage/modules/fp_graded/steenrod/all.py +1 -0
  562. sage/modules/fp_graded/steenrod/homspace.py +65 -0
  563. sage/modules/fp_graded/steenrod/module.py +477 -0
  564. sage/modules/fp_graded/steenrod/morphism.py +404 -0
  565. sage/modules/fp_graded/steenrod/profile.py +241 -0
  566. sage/modules/free_module.py +8447 -0
  567. sage/modules/free_module_element.cpython-314-darwin.so +0 -0
  568. sage/modules/free_module_element.pxd +22 -0
  569. sage/modules/free_module_element.pyx +5445 -0
  570. sage/modules/free_module_homspace.py +369 -0
  571. sage/modules/free_module_integer.py +896 -0
  572. sage/modules/free_module_morphism.py +823 -0
  573. sage/modules/free_module_pseudohomspace.py +352 -0
  574. sage/modules/free_module_pseudomorphism.py +578 -0
  575. sage/modules/free_quadratic_module.py +1706 -0
  576. sage/modules/free_quadratic_module_integer_symmetric.py +1790 -0
  577. sage/modules/matrix_morphism.py +1745 -0
  578. sage/modules/misc.py +103 -0
  579. sage/modules/module_functors.py +192 -0
  580. sage/modules/multi_filtered_vector_space.py +719 -0
  581. sage/modules/ore_module.py +2208 -0
  582. sage/modules/ore_module_element.py +178 -0
  583. sage/modules/ore_module_homspace.py +147 -0
  584. sage/modules/ore_module_morphism.py +968 -0
  585. sage/modules/quotient_module.py +699 -0
  586. sage/modules/real_double_vector.py +22 -0
  587. sage/modules/submodule.py +255 -0
  588. sage/modules/tensor_operations.py +567 -0
  589. sage/modules/torsion_quadratic_module.py +1352 -0
  590. sage/modules/tutorial_free_modules.py +248 -0
  591. sage/modules/vector_complex_double_dense.cpython-314-darwin.so +0 -0
  592. sage/modules/vector_complex_double_dense.pxd +6 -0
  593. sage/modules/vector_complex_double_dense.pyx +117 -0
  594. sage/modules/vector_double_dense.cpython-314-darwin.so +0 -0
  595. sage/modules/vector_double_dense.pxd +6 -0
  596. sage/modules/vector_double_dense.pyx +604 -0
  597. sage/modules/vector_integer_dense.cpython-314-darwin.so +0 -0
  598. sage/modules/vector_integer_dense.pxd +15 -0
  599. sage/modules/vector_integer_dense.pyx +361 -0
  600. sage/modules/vector_integer_sparse.cpython-314-darwin.so +0 -0
  601. sage/modules/vector_integer_sparse.pxd +29 -0
  602. sage/modules/vector_integer_sparse.pyx +406 -0
  603. sage/modules/vector_modn_dense.cpython-314-darwin.so +0 -0
  604. sage/modules/vector_modn_dense.pxd +12 -0
  605. sage/modules/vector_modn_dense.pyx +394 -0
  606. sage/modules/vector_modn_sparse.cpython-314-darwin.so +0 -0
  607. sage/modules/vector_modn_sparse.pxd +21 -0
  608. sage/modules/vector_modn_sparse.pyx +298 -0
  609. sage/modules/vector_numpy_dense.cpython-314-darwin.so +0 -0
  610. sage/modules/vector_numpy_dense.pxd +15 -0
  611. sage/modules/vector_numpy_dense.pyx +304 -0
  612. sage/modules/vector_numpy_integer_dense.cpython-314-darwin.so +0 -0
  613. sage/modules/vector_numpy_integer_dense.pxd +7 -0
  614. sage/modules/vector_numpy_integer_dense.pyx +54 -0
  615. sage/modules/vector_rational_dense.cpython-314-darwin.so +0 -0
  616. sage/modules/vector_rational_dense.pxd +15 -0
  617. sage/modules/vector_rational_dense.pyx +387 -0
  618. sage/modules/vector_rational_sparse.cpython-314-darwin.so +0 -0
  619. sage/modules/vector_rational_sparse.pxd +30 -0
  620. sage/modules/vector_rational_sparse.pyx +413 -0
  621. sage/modules/vector_real_double_dense.cpython-314-darwin.so +0 -0
  622. sage/modules/vector_real_double_dense.pxd +6 -0
  623. sage/modules/vector_real_double_dense.pyx +126 -0
  624. sage/modules/vector_space_homspace.py +430 -0
  625. sage/modules/vector_space_morphism.py +989 -0
  626. sage/modules/with_basis/all.py +15 -0
  627. sage/modules/with_basis/cell_module.py +494 -0
  628. sage/modules/with_basis/indexed_element.cpython-314-darwin.so +0 -0
  629. sage/modules/with_basis/indexed_element.pxd +13 -0
  630. sage/modules/with_basis/indexed_element.pyx +1058 -0
  631. sage/modules/with_basis/invariant.py +1075 -0
  632. sage/modules/with_basis/morphism.py +1636 -0
  633. sage/modules/with_basis/representation.py +2939 -0
  634. sage/modules/with_basis/subquotient.py +685 -0
  635. sage/numerical/all__sagemath_modules.py +6 -0
  636. sage/numerical/gauss_legendre.cpython-314-darwin.so +0 -0
  637. sage/numerical/gauss_legendre.pyx +381 -0
  638. sage/numerical/optimize.py +910 -0
  639. sage/probability/all.py +10 -0
  640. sage/probability/probability_distribution.cpython-314-darwin.so +0 -0
  641. sage/probability/probability_distribution.pyx +1242 -0
  642. sage/probability/random_variable.py +411 -0
  643. sage/quadratic_forms/all.py +4 -0
  644. sage/quadratic_forms/all__sagemath_modules.py +15 -0
  645. sage/quadratic_forms/binary_qf.py +2042 -0
  646. sage/quadratic_forms/bqf_class_group.py +748 -0
  647. sage/quadratic_forms/constructions.py +93 -0
  648. sage/quadratic_forms/count_local_2.cpython-314-darwin.so +0 -0
  649. sage/quadratic_forms/count_local_2.pyx +365 -0
  650. sage/quadratic_forms/extras.py +195 -0
  651. sage/quadratic_forms/quadratic_form.py +1753 -0
  652. sage/quadratic_forms/quadratic_form__count_local_2.py +221 -0
  653. sage/quadratic_forms/quadratic_form__equivalence_testing.py +708 -0
  654. sage/quadratic_forms/quadratic_form__evaluate.cpython-314-darwin.so +0 -0
  655. sage/quadratic_forms/quadratic_form__evaluate.pyx +139 -0
  656. sage/quadratic_forms/quadratic_form__local_density_congruence.py +977 -0
  657. sage/quadratic_forms/quadratic_form__local_field_invariants.py +1072 -0
  658. sage/quadratic_forms/quadratic_form__neighbors.py +424 -0
  659. sage/quadratic_forms/quadratic_form__reduction_theory.py +488 -0
  660. sage/quadratic_forms/quadratic_form__split_local_covering.py +416 -0
  661. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +657 -0
  662. sage/quadratic_forms/quadratic_form__theta.py +352 -0
  663. sage/quadratic_forms/quadratic_form__variable_substitutions.py +370 -0
  664. sage/quadratic_forms/random_quadraticform.py +209 -0
  665. sage/quadratic_forms/ternary.cpython-314-darwin.so +0 -0
  666. sage/quadratic_forms/ternary.pyx +1154 -0
  667. sage/quadratic_forms/ternary_qf.py +2027 -0
  668. sage/rings/all__sagemath_modules.py +28 -0
  669. sage/rings/asymptotic/all__sagemath_modules.py +1 -0
  670. sage/rings/asymptotic/misc.py +1252 -0
  671. sage/rings/cc.py +4 -0
  672. sage/rings/cfinite_sequence.py +1306 -0
  673. sage/rings/complex_conversion.cpython-314-darwin.so +0 -0
  674. sage/rings/complex_conversion.pxd +8 -0
  675. sage/rings/complex_conversion.pyx +23 -0
  676. sage/rings/complex_double.cpython-314-darwin.so +0 -0
  677. sage/rings/complex_double.pxd +21 -0
  678. sage/rings/complex_double.pyx +2654 -0
  679. sage/rings/complex_mpc.cpython-314-darwin.so +0 -0
  680. sage/rings/complex_mpc.pxd +21 -0
  681. sage/rings/complex_mpc.pyx +2576 -0
  682. sage/rings/complex_mpfr.cpython-314-darwin.so +0 -0
  683. sage/rings/complex_mpfr.pxd +18 -0
  684. sage/rings/complex_mpfr.pyx +3602 -0
  685. sage/rings/derivation.py +2334 -0
  686. sage/rings/finite_rings/all__sagemath_modules.py +1 -0
  687. sage/rings/finite_rings/maps_finite_field.py +191 -0
  688. sage/rings/function_field/all__sagemath_modules.py +8 -0
  689. sage/rings/function_field/derivations.py +102 -0
  690. sage/rings/function_field/derivations_rational.py +132 -0
  691. sage/rings/function_field/differential.py +853 -0
  692. sage/rings/function_field/divisor.py +1107 -0
  693. sage/rings/function_field/drinfeld_modules/action.py +199 -0
  694. sage/rings/function_field/drinfeld_modules/all.py +1 -0
  695. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +673 -0
  696. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +2087 -0
  697. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1131 -0
  698. sage/rings/function_field/drinfeld_modules/homset.py +420 -0
  699. sage/rings/function_field/drinfeld_modules/morphism.py +820 -0
  700. sage/rings/function_field/hermite_form_polynomial.cpython-314-darwin.so +0 -0
  701. sage/rings/function_field/hermite_form_polynomial.pyx +188 -0
  702. sage/rings/function_field/khuri_makdisi.cpython-314-darwin.so +0 -0
  703. sage/rings/function_field/khuri_makdisi.pyx +935 -0
  704. sage/rings/invariants/all.py +4 -0
  705. sage/rings/invariants/invariant_theory.py +4597 -0
  706. sage/rings/invariants/reconstruction.py +395 -0
  707. sage/rings/polynomial/all__sagemath_modules.py +17 -0
  708. sage/rings/polynomial/integer_valued_polynomials.py +1230 -0
  709. sage/rings/polynomial/laurent_polynomial_mpair.cpython-314-darwin.so +0 -0
  710. sage/rings/polynomial/laurent_polynomial_mpair.pxd +15 -0
  711. sage/rings/polynomial/laurent_polynomial_mpair.pyx +2023 -0
  712. sage/rings/polynomial/ore_function_element.py +952 -0
  713. sage/rings/polynomial/ore_function_field.py +1028 -0
  714. sage/rings/polynomial/ore_polynomial_element.cpython-314-darwin.so +0 -0
  715. sage/rings/polynomial/ore_polynomial_element.pxd +48 -0
  716. sage/rings/polynomial/ore_polynomial_element.pyx +3145 -0
  717. sage/rings/polynomial/ore_polynomial_ring.py +1334 -0
  718. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-314-darwin.so +0 -0
  719. sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +788 -0
  720. sage/rings/polynomial/q_integer_valued_polynomials.py +1264 -0
  721. sage/rings/polynomial/skew_polynomial_element.cpython-314-darwin.so +0 -0
  722. sage/rings/polynomial/skew_polynomial_element.pxd +9 -0
  723. sage/rings/polynomial/skew_polynomial_element.pyx +684 -0
  724. sage/rings/polynomial/skew_polynomial_finite_field.cpython-314-darwin.so +0 -0
  725. sage/rings/polynomial/skew_polynomial_finite_field.pxd +19 -0
  726. sage/rings/polynomial/skew_polynomial_finite_field.pyx +1093 -0
  727. sage/rings/polynomial/skew_polynomial_finite_order.cpython-314-darwin.so +0 -0
  728. sage/rings/polynomial/skew_polynomial_finite_order.pxd +10 -0
  729. sage/rings/polynomial/skew_polynomial_finite_order.pyx +567 -0
  730. sage/rings/polynomial/skew_polynomial_ring.py +908 -0
  731. sage/rings/real_double_element_gsl.cpython-314-darwin.so +0 -0
  732. sage/rings/real_double_element_gsl.pxd +8 -0
  733. sage/rings/real_double_element_gsl.pyx +794 -0
  734. sage/rings/real_field.py +58 -0
  735. sage/rings/real_mpfr.cpython-314-darwin.so +0 -0
  736. sage/rings/real_mpfr.pxd +29 -0
  737. sage/rings/real_mpfr.pyx +6122 -0
  738. sage/rings/ring_extension.cpython-314-darwin.so +0 -0
  739. sage/rings/ring_extension.pxd +42 -0
  740. sage/rings/ring_extension.pyx +2779 -0
  741. sage/rings/ring_extension_conversion.cpython-314-darwin.so +0 -0
  742. sage/rings/ring_extension_conversion.pxd +16 -0
  743. sage/rings/ring_extension_conversion.pyx +462 -0
  744. sage/rings/ring_extension_element.cpython-314-darwin.so +0 -0
  745. sage/rings/ring_extension_element.pxd +21 -0
  746. sage/rings/ring_extension_element.pyx +1635 -0
  747. sage/rings/ring_extension_homset.py +64 -0
  748. sage/rings/ring_extension_morphism.cpython-314-darwin.so +0 -0
  749. sage/rings/ring_extension_morphism.pxd +35 -0
  750. sage/rings/ring_extension_morphism.pyx +920 -0
  751. sage/schemes/all__sagemath_modules.py +1 -0
  752. sage/schemes/projective/all__sagemath_modules.py +1 -0
  753. sage/schemes/projective/coherent_sheaf.py +300 -0
  754. sage/schemes/projective/cohomology.py +510 -0
  755. sage/stats/all.py +15 -0
  756. sage/stats/basic_stats.py +489 -0
  757. sage/stats/distributions/all.py +7 -0
  758. sage/stats/distributions/catalog.py +34 -0
  759. sage/stats/distributions/dgs.h +50 -0
  760. sage/stats/distributions/dgs.pxd +111 -0
  761. sage/stats/distributions/dgs_bern.h +400 -0
  762. sage/stats/distributions/dgs_gauss.h +614 -0
  763. sage/stats/distributions/dgs_misc.h +104 -0
  764. sage/stats/distributions/discrete_gaussian_integer.cpython-314-darwin.so +0 -0
  765. sage/stats/distributions/discrete_gaussian_integer.pxd +14 -0
  766. sage/stats/distributions/discrete_gaussian_integer.pyx +498 -0
  767. sage/stats/distributions/discrete_gaussian_lattice.py +908 -0
  768. sage/stats/distributions/discrete_gaussian_polynomial.py +141 -0
  769. sage/stats/hmm/all.py +15 -0
  770. sage/stats/hmm/chmm.cpython-314-darwin.so +0 -0
  771. sage/stats/hmm/chmm.pyx +1595 -0
  772. sage/stats/hmm/distributions.cpython-314-darwin.so +0 -0
  773. sage/stats/hmm/distributions.pxd +29 -0
  774. sage/stats/hmm/distributions.pyx +531 -0
  775. sage/stats/hmm/hmm.cpython-314-darwin.so +0 -0
  776. sage/stats/hmm/hmm.pxd +17 -0
  777. sage/stats/hmm/hmm.pyx +1388 -0
  778. sage/stats/hmm/util.cpython-314-darwin.so +0 -0
  779. sage/stats/hmm/util.pxd +7 -0
  780. sage/stats/hmm/util.pyx +165 -0
  781. sage/stats/intlist.cpython-314-darwin.so +0 -0
  782. sage/stats/intlist.pxd +14 -0
  783. sage/stats/intlist.pyx +588 -0
  784. sage/stats/r.py +49 -0
  785. sage/stats/time_series.cpython-314-darwin.so +0 -0
  786. sage/stats/time_series.pxd +6 -0
  787. sage/stats/time_series.pyx +2546 -0
  788. sage/tensor/all.py +2 -0
  789. sage/tensor/modules/all.py +8 -0
  790. sage/tensor/modules/alternating_contr_tensor.py +761 -0
  791. sage/tensor/modules/comp.py +5598 -0
  792. sage/tensor/modules/ext_pow_free_module.py +824 -0
  793. sage/tensor/modules/finite_rank_free_module.py +3589 -0
  794. sage/tensor/modules/format_utilities.py +333 -0
  795. sage/tensor/modules/free_module_alt_form.py +858 -0
  796. sage/tensor/modules/free_module_automorphism.py +1207 -0
  797. sage/tensor/modules/free_module_basis.py +1074 -0
  798. sage/tensor/modules/free_module_element.py +284 -0
  799. sage/tensor/modules/free_module_homset.py +652 -0
  800. sage/tensor/modules/free_module_linear_group.py +564 -0
  801. sage/tensor/modules/free_module_morphism.py +1581 -0
  802. sage/tensor/modules/free_module_tensor.py +3289 -0
  803. sage/tensor/modules/reflexive_module.py +386 -0
  804. sage/tensor/modules/tensor_free_module.py +780 -0
  805. sage/tensor/modules/tensor_free_submodule.py +538 -0
  806. sage/tensor/modules/tensor_free_submodule_basis.py +140 -0
  807. sage/tensor/modules/tensor_with_indices.py +1043 -0
@@ -0,0 +1,1324 @@
1
+ # sage_setup: distribution = sagemath-modules
2
+ # sage.doctest: needs sage.graphs
3
+ """
4
+ Onsager Algebra
5
+
6
+ AUTHORS:
7
+
8
+ - Travis Scrimshaw (2017-07): Initial version
9
+ """
10
+
11
+ #*****************************************************************************
12
+ # Copyright (C) 2017 Travis Scrimshaw <tcscrims at gmail.com>
13
+ #
14
+ # This program is free software: you can redistribute it and/or modify
15
+ # it under the terms of the GNU General Public License as published by
16
+ # the Free Software Foundation, either version 2 of the License, or
17
+ # (at your option) any later version.
18
+ # http://www.gnu.org/licenses/
19
+ #*****************************************************************************
20
+
21
+ from sage.misc.cachefunc import cached_method
22
+ from sage.categories.algebras import Algebras
23
+ from sage.categories.lie_algebras import LieAlgebras
24
+ from sage.combinat.free_module import CombinatorialFreeModule
25
+ from sage.structure.indexed_generators import IndexedGenerators
26
+ from sage.sets.family import Family
27
+ from sage.algebras.lie_algebras.lie_algebra_element import LieAlgebraElement
28
+ from sage.algebras.lie_algebras.lie_algebra import LieAlgebraWithGenerators, InfinitelyGeneratedLieAlgebra
29
+
30
+
31
+ class OnsagerAlgebra(LieAlgebraWithGenerators, IndexedGenerators):
32
+ r"""
33
+ The Onsager (Lie) algebra.
34
+
35
+ The Onsager (Lie) algebra `\mathcal{O}` is a Lie algebra with
36
+ generators `A_0, A_1` that satisfy
37
+
38
+ .. MATH::
39
+
40
+ [A_0, [A_0, [A_0, A_1]]] = -4 [A_0, A_1],
41
+ \qquad
42
+ [A_1, [A_1, [A_1, A_0]]] = -4 [A_1, A_0].
43
+
44
+ .. NOTE::
45
+
46
+ We are using a rescaled version of the usual defining generators.
47
+
48
+ There exist a basis `\{A_m, G_n \mid m \in \ZZ, n \in \ZZ_{>0}\}`
49
+ for `\mathcal{O}` with structure coefficients
50
+
51
+ .. MATH::
52
+
53
+ [A_m, A_{m'}] = G_{m-m'},
54
+ \qquad
55
+ [G_n, G_{n'}] = 0,
56
+ \qquad
57
+ [G_n, A_m] = 2A_{m-n} - 2A_{m+n},
58
+
59
+ where `m > m'`.
60
+
61
+ The Onsager algebra is isomorphic to the subalgebra of the affine
62
+ Lie algebra `\widehat{\mathfrak{sl}}_2 = \mathfrak{sl}_2 \otimes
63
+ \CC[t,t^{-1}] \oplus \CC K \oplus \CC d` that is invariant under
64
+ the Chevalley involution. In particular, we have
65
+
66
+ .. MATH::
67
+
68
+ A_i \mapsto f \otimes t^i - e \otimes t^{-i},
69
+ \qquad
70
+ G_i \mapsto h \otimes t^{-i} - h \otimes t^i.
71
+
72
+ where `e,f,h` are the Chevalley generators of `\mathfrak{sl}_2`.
73
+
74
+ EXAMPLES:
75
+
76
+ We construct the Onsager algebra and do some basic computations::
77
+
78
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
79
+ sage: O.inject_variables()
80
+ Defining A0, A1
81
+
82
+ We verify the defining relations::
83
+
84
+ sage: O([A0, [A0, [A0, A1]]]) == -4 * O([A0, A1])
85
+ True
86
+ sage: O([A1, [A1, [A1, A0]]]) == -4 * O([A1, A0])
87
+ True
88
+
89
+ We check the embedding into `\widehat{\mathfrak{sl}}_2`::
90
+
91
+ sage: L = LieAlgebra(QQ, cartan_type=['A',1,1])
92
+ sage: B = L.basis()
93
+ sage: al = RootSystem(['A',1]).root_lattice().simple_root(1)
94
+ sage: ac = al.associated_coroot()
95
+ sage: def emb_A(i): return B[-al,i] - B[al,-i]
96
+ sage: def emb_G(i): return B[ac,i] - B[ac,-i]
97
+ sage: a0 = emb_A(0)
98
+ sage: a1 = emb_A(1)
99
+ sage: L([a0, [a0, [a0, a1]]]) == -4 * L([a0, a1])
100
+ True
101
+ sage: L([a1, [a1, [a1, a0]]]) == -4 * L([a1, a0])
102
+ True
103
+
104
+ sage: all(emb_G(n).bracket(emb_A(m)) == 2*emb_A(m-n) - 2*emb_A(m+n)
105
+ ....: for m in range(-10, 10) for n in range(1,10))
106
+ True
107
+ sage: all(emb_A(m).bracket(emb_A(mp)) == emb_G(m-mp)
108
+ ....: for m in range(-10,10) for mp in range(m-10, m))
109
+ True
110
+
111
+ REFERENCES:
112
+
113
+ - [Onsager1944]_
114
+ - [DG1982]_
115
+ """
116
+ def __init__(self, R):
117
+ """
118
+ Initialize ``self``.
119
+
120
+ EXAMPLES::
121
+
122
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
123
+ sage: TestSuite(O).run()
124
+ """
125
+ cat = LieAlgebras(R).WithBasis()
126
+ from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
127
+ IndexedGenerators.__init__(self, FiniteEnumeratedSet([0,1]))
128
+ LieAlgebraWithGenerators.__init__(self, R, index_set=self._indices,
129
+ names=('A0', 'A1'), category=cat)
130
+
131
+ def _repr_(self):
132
+ """
133
+ Return a string representation of ``self``.
134
+
135
+ EXAMPLES::
136
+
137
+ sage: lie_algebras.OnsagerAlgebra(QQ)
138
+ Onsager algebra over Rational Field
139
+ """
140
+ return "Onsager algebra over {}".format(self.base_ring())
141
+
142
+ def _latex_(self):
143
+ r"""
144
+ Return a string representation of ``self``.
145
+
146
+ EXAMPLES::
147
+
148
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
149
+ sage: latex(O)
150
+ \mathcal{O}_{\Bold{Q}}
151
+ """
152
+ from sage.misc.latex import latex
153
+ return "\\mathcal{{O}}_{{{}}}".format(latex(self.base_ring()))
154
+
155
+ def _repr_generator(self, m):
156
+ """
157
+ Return a string representation of the generator indexed by ``m``.
158
+
159
+ EXAMPLES::
160
+
161
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
162
+ sage: O._repr_generator((0,-2))
163
+ 'A[-2]'
164
+ sage: O._repr_generator((1,4))
165
+ 'G[4]'
166
+ """
167
+ if m[0] == 0:
168
+ return 'A[{}]'.format(m[1])
169
+ return 'G[{}]'.format(m[1])
170
+
171
+ def _latex_generator(self, m):
172
+ r"""
173
+ Return a LaTeX representation of the generator indexed by ``m``.
174
+
175
+ EXAMPLES::
176
+
177
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
178
+ sage: O._latex_generator((0,-2))
179
+ 'A_{-2}'
180
+ sage: O._latex_generator((1,4))
181
+ 'G_{4}'
182
+ """
183
+ if m[0] == 0:
184
+ return 'A_{{{}}}'.format(m[1])
185
+ return 'G_{{{}}}'.format(m[1])
186
+
187
+ # For compatibility with CombinatorialFreeModuleElement
188
+ _repr_term = _repr_generator
189
+ _latex_term = _latex_generator
190
+
191
+ @cached_method
192
+ def basis(self):
193
+ r"""
194
+ Return the basis of ``self``.
195
+
196
+ EXAMPLES::
197
+
198
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
199
+ sage: O.basis()
200
+ Lazy family (Onsager monomial(i))_{i in
201
+ Disjoint union of Family (Integer Ring, Positive integers)}
202
+ """
203
+ from sage.rings.integer_ring import ZZ
204
+ from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets
205
+ from sage.sets.positive_integers import PositiveIntegers
206
+ I = DisjointUnionEnumeratedSets([ZZ, PositiveIntegers()],
207
+ keepkey=True, facade=True)
208
+ return Family(I, self.monomial, name='Onsager monomial')
209
+
210
+ @cached_method
211
+ def lie_algebra_generators(self):
212
+ r"""
213
+ Return the generators of ``self`` as a Lie algebra.
214
+
215
+ EXAMPLES::
216
+
217
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
218
+ sage: O.lie_algebra_generators()
219
+ Finite family {'A0': A[0], 'A1': A[1]}
220
+ """
221
+ d = {"A0": self.basis()[0,0], "A1": self.basis()[0,1]}
222
+ return Family(self._names, d.__getitem__)
223
+
224
+ def bracket_on_basis(self, x, y):
225
+ r"""
226
+ Return the bracket of basis elements indexed by ``x`` and ``y``
227
+ where ``x < y``.
228
+
229
+ EXAMPLES::
230
+
231
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
232
+ sage: O.bracket_on_basis((1,3), (1,9)) # [G, G]
233
+ 0
234
+ sage: O.bracket_on_basis((0,8), (1,13)) # [A, G]
235
+ -2*A[-5] + 2*A[21]
236
+ sage: O.bracket_on_basis((0,-9), (0, 7)) # [A, A]
237
+ -G[16]
238
+ """
239
+ if x[0] == 1:
240
+ # From < property, we have y[0] == 1
241
+ # Therefore, we have [G_n, G_{n'}] = 0
242
+ return self.zero()
243
+ R = self.base_ring()
244
+ if y[0] == 1: # [A_m, G_n] = -(2A_{m-n} - 2A_{m+n})
245
+ d = {(0, x[1]-y[1]): R(-2), (0, x[1]+y[1]): R(2)}
246
+ return self.element_class(self, d)
247
+ # [A_m, A_{m'}] = -G_{m' - m}, where m < m'
248
+ return self.element_class(self, {(1, y[1]-x[1]): -R.one()})
249
+
250
+ def _an_element_(self):
251
+ """
252
+ Return an element of ``self``.
253
+
254
+ EXAMPLES::
255
+
256
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
257
+ sage: O.an_element()
258
+ -2*A[-3] + A[2] + 3*G[2]
259
+ """
260
+ B = self.basis()
261
+ return B[0,2] - 2*B[0,-3] + 3*B[1,2]
262
+
263
+ def some_elements(self):
264
+ """
265
+ Return some elements of ``self``.
266
+
267
+ EXAMPLES::
268
+
269
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
270
+ sage: O.some_elements()
271
+ [A[0], A[2], A[-1], G[4], -2*A[-3] + A[2] + 3*G[2]]
272
+ """
273
+ B = self.basis()
274
+ return [B[0,0], B[0,2], B[0,-1], B[1,4], self.an_element()]
275
+
276
+ def quantum_group(self, q=None, c=None):
277
+ r"""
278
+ Return the quantum group of ``self``.
279
+
280
+ The corresponding quantum group is the
281
+ :class:`~sage.algebras.lie_algebras.onsager.QuantumOnsagerAlgebra`.
282
+ The parameter `c` must be such that `c(1) = 1`
283
+
284
+ INPUT:
285
+
286
+ - ``q`` -- (optional) the quantum parameter; the default
287
+ is `q \in R(q)`, where `R` is the base ring of ``self``
288
+ - ``c`` -- (optional) the parameter `c`; the default is ``q``
289
+
290
+ EXAMPLES::
291
+
292
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
293
+ sage: Q = O.quantum_group()
294
+ sage: Q
295
+ q-Onsager algebra with c=q over Fraction Field of
296
+ Univariate Polynomial Ring in q over Rational Field
297
+ """
298
+ if q is None:
299
+ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
300
+ q = PolynomialRing(self.base_ring(), 'q').fraction_field().gen()
301
+ if c is None:
302
+ c = q
303
+ else:
304
+ c = q.parent()(c)
305
+ return QuantumOnsagerAlgebra(self, q, c)
306
+
307
+ def alternating_central_extension(self):
308
+ r"""
309
+ Return the alternating central extension of ``self``.
310
+
311
+ EXAMPLES::
312
+
313
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
314
+ sage: ACE = O.alternating_central_extension()
315
+ sage: ACE
316
+ Alternating central extension of the Onsager algebra over Rational Field
317
+ """
318
+ return OnsagerAlgebraACE(self.base_ring())
319
+
320
+ Element = LieAlgebraElement
321
+
322
+ #####################################################################
323
+ # q-Onsager algebra (the quantum group)
324
+
325
+
326
+ class QuantumOnsagerAlgebra(CombinatorialFreeModule):
327
+ r"""
328
+ The quantum Onsager algebra.
329
+
330
+ The *quantum Onsager algebra*, or `q`-Onsager algebra, is a
331
+ quantum group analog of the Onsager algebra. It is the left
332
+ (or right) coideal subalgebra of the quantum group
333
+ `U_q(\widehat{\mathfrak{sl}}_2)` and is the simplest example
334
+ of a quantum symmetric pair coideal subalgebra of affine type.
335
+
336
+ The `q`-Onsager algebra depends on a parameter `c` such that
337
+ `c(1) = 1`. The `q`-Onsager algebra with parameter `c` is denoted
338
+ `U_q(\mathcal{O}_R)_c`, where `R` is the base ring of the
339
+ defining Onsager algebra.
340
+
341
+ EXAMPLES:
342
+
343
+ We create the `q`-Onsager algebra and its generators::
344
+
345
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
346
+ sage: Q = O.quantum_group()
347
+ sage: G = Q.algebra_generators()
348
+
349
+ The generators are given as pairs, where `G[0,n]` is the generator
350
+ `B_{n\delta+\alpha_1}` and `G[1,n]` is the generator `B_{n\delta}`.
351
+ We use the convention that
352
+ `n\delta + \alpha_1 \equiv (-n-1)\delta + \alpha_0`. ::
353
+
354
+ sage: G[0,5]
355
+ B[5d+a1]
356
+ sage: G[0,-5]
357
+ B[4d+a0]
358
+ sage: G[1,5]
359
+ B[5d]
360
+ sage: (G[0,5] + G[0,-3]) * (G[1,2] - G[0,3])
361
+ B[2d+a0]*B[2d] - B[2d+a0]*B[3d+a1]
362
+ + ((-q^4+1)/q^2)*B[1d]*B[6d+a1]
363
+ + ((q^4-1)/q^2)*B[1d]*B[4d+a1] + B[2d]*B[5d+a1]
364
+ - B[5d+a1]*B[3d+a1] + ((q^2+1)/q^2)*B[7d+a1]
365
+ + ((q^6+q^4-q^2-1)/q^2)*B[5d+a1] + (-q^4-q^2)*B[3d+a1]
366
+ sage: (G[0,5] + G[0,-3] + G[1,4]) * (G[0,2] - G[1,3])
367
+ -B[2d+a0]*B[3d] + B[2d+a0]*B[2d+a1]
368
+ + ((q^4-1)/q^4)*B[1d]*B[7d+a1]
369
+ + ((q^8-2*q^4+1)/q^4)*B[1d]*B[5d+a1]
370
+ + (-q^4+1)*B[1d]*B[3d+a1] + ((q^4-1)/q^2)*B[2d]*B[6d+a1]
371
+ + ((-q^4+1)/q^2)*B[2d]*B[4d+a1] - B[3d]*B[4d]
372
+ - B[3d]*B[5d+a1] + B[4d]*B[2d+a1] + B[5d+a1]*B[2d+a1]
373
+ + ((-q^2-1)/q^4)*B[8d+a1] + ((-q^6-q^4+q^2+1)/q^4)*B[6d+a1]
374
+ + (-q^6-q^4+q^2+1)*B[4d+a1] + (q^6+q^4)*B[2d+a1]
375
+
376
+ We check the `q`-Dolan-Grady relations::
377
+
378
+ sage: def q_dolan_grady(a, b, q):
379
+ ....: x = q*a*b - ~q*b*a
380
+ ....: y = ~q*a*x - q*x*a
381
+ ....: return a*y - y*a
382
+ sage: A0, A1 = G[0,-1], G[0,0]
383
+ sage: q = Q.q()
384
+ sage: q_dolan_grady(A1, A0, q) == (q^4 + 2*q^2 + 1) * (A0*A1 - A1*A0)
385
+ True
386
+ sage: q_dolan_grady(A0, A1, q) == (q^4 + 2*q^2 + 1) * (A1*A0 - A0*A1)
387
+ True
388
+
389
+ REFERENCES:
390
+
391
+ - [BK2017]_
392
+ """
393
+ def __init__(self, g, q, c):
394
+ """
395
+ Initialize ``self``.
396
+
397
+ TESTS::
398
+
399
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
400
+ sage: Q = O.quantum_group()
401
+ sage: TestSuite(Q).run() # long time
402
+ """
403
+ self._g = g
404
+ self._q = q
405
+ self._c = c
406
+ self._q_two = q + ~q
407
+ R = self._q_two.parent()
408
+ from sage.monoids.indexed_free_monoid import IndexedFreeAbelianMonoid
409
+ monomials = IndexedFreeAbelianMonoid(g.basis().keys(),
410
+ prefix='B', bracket=False,
411
+ sorting_key=self._monoid_key)
412
+ CombinatorialFreeModule.__init__(self, R, monomials,
413
+ prefix='', bracket=False, latex_bracket=False,
414
+ sorting_key=self._monomial_key,
415
+ category=Algebras(R).WithBasis().Filtered())
416
+
417
+ def _basis_key(self, k):
418
+ r"""
419
+ Key for ordering the basis elements of ``self._g``.
420
+
421
+ We choose a key in order to obtain the ordering from [BK2017]_
422
+ in the quantum group.
423
+
424
+ EXAMPLES::
425
+
426
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
427
+ sage: Q = O.quantum_group()
428
+ sage: Q._basis_key((0,2))
429
+ (1, -2)
430
+ sage: Q._basis_key((0,-2))
431
+ (-1, 2)
432
+ sage: Q._basis_key((1,2))
433
+ (0, 2)
434
+ """
435
+ if k[0] == 0: # B_{m\delta + \alpha_1}
436
+ if k[1] < 0:
437
+ return (-1, -k[1])
438
+ else:
439
+ return (1, -k[1])
440
+ # B_{n\delta}
441
+ return (0, k[1])
442
+
443
+ def _monoid_key(self, x):
444
+ r"""
445
+ Key function for the underlying monoid of ``self``.
446
+
447
+ EXAMPLES::
448
+
449
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
450
+ sage: Q = O.quantum_group()
451
+ sage: G = Q.algebra_generators()
452
+ sage: I = Q._indices.gens()
453
+ sage: I[0,1] * I[1,3] * I[1,2] * I[0,-4]^3 # indirect doctest
454
+ B(0, -4)^3*B(1, 2)*B(1, 3)*B(0, 1)
455
+ """
456
+ return self._basis_key(x[0])
457
+
458
+ def _monomial_key(self, x):
459
+ r"""
460
+ Compute the key for ``x`` so that the comparison is done by
461
+ reverse degree lexicographic order.
462
+
463
+ EXAMPLES::
464
+
465
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
466
+ sage: Q = O.quantum_group()
467
+ sage: G = Q.algebra_generators()
468
+ sage: G[0,0] * G[1,1] * G[0,-2] # indirect doctest
469
+ (q^2-1)*B[a0]^2*B[1d] + q^2*B[1d+a0]*B[1d]*B[a1]
470
+ + ((q^6-2*q^2-1)/q^2)*B[a0]*B[1d+a0] + (-q^4-q^2)*B[a0]*B[a1]
471
+ + (q^4+q^2)*B[1d+a0]*B[1d+a1] + (q^4+q^2)*B[2d+a0]*B[a1]
472
+ + q^2*B[1d]*B[2d] + (-q^4+1)*B[1d] + (q^4+q^2)*B[3d]
473
+ """
474
+ return (-len(x), [self._basis_key(l) for l in x.to_word_list()])
475
+
476
+ def _repr_(self):
477
+ r"""
478
+ Return a string representation of ``self``.
479
+
480
+ EXAMPLES::
481
+
482
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
483
+ sage: O.quantum_group()
484
+ q-Onsager algebra with c=q over Fraction Field of
485
+ Univariate Polynomial Ring in q over Rational Field
486
+ """
487
+ return "{}-Onsager algebra with c={} over {}".format(self._q, self._c,
488
+ self.base_ring())
489
+
490
+ def _latex_(self):
491
+ r"""
492
+ Return a latex representation of ``self``.
493
+
494
+ EXAMPLES::
495
+
496
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
497
+ sage: Q = O.quantum_group(q=-1)
498
+ sage: latex(Q)
499
+ U_{-1}(\mathcal{O}_{\Bold{Q}})_{-1}
500
+ """
501
+ from sage.misc.latex import latex
502
+ return "U_{{{}}}(\\mathcal{{O}}_{{{}}})_{{{}}}".format(latex(self._q),
503
+ latex(self._g.base_ring()), latex(self._c))
504
+
505
+ def _repr_term(self, m):
506
+ r"""
507
+ Return a string representation of the term indexed by ``m``.
508
+
509
+ EXAMPLES::
510
+
511
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
512
+ sage: Q = O.quantum_group()
513
+ sage: I = Q._indices.gens()
514
+ sage: Q._repr_term(I[0,3])
515
+ 'B[3d+a1]'
516
+ sage: Q._repr_term(I[0,-3])
517
+ 'B[2d+a0]'
518
+ sage: Q._repr_term(I[1,3])
519
+ 'B[3d]'
520
+ sage: Q._repr_term(I[0,-1]^2 * I[1,3]^13 * I[0,3])
521
+ 'B[a0]^2*B[3d]^13*B[3d+a1]'
522
+ """
523
+ def to_str(x):
524
+ k,e = x
525
+ if k[0] == 0:
526
+ if k[1] == -1:
527
+ ret = 'B[a0]'
528
+ elif k[1] == 0:
529
+ ret = 'B[a1]'
530
+ elif k[1] < -1:
531
+ ret = 'B[{}d+a0]'.format(-k[1]-1)
532
+ elif k[1] > 0:
533
+ ret = 'B[{}d+a1]'.format(k[1])
534
+ else:
535
+ ret = 'B[{}d]'.format(k[1])
536
+ if e > 1:
537
+ ret = ret + '^{}'.format(e)
538
+ return ret
539
+ return '*'.join(to_str(x) for x in m._sorted_items())
540
+
541
+ def _latex_term(self, m):
542
+ r"""
543
+ Return a latex representation of the term indexed by ``m``.
544
+
545
+ EXAMPLES::
546
+
547
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
548
+ sage: Q = O.quantum_group()
549
+ sage: I = Q._indices.gens()
550
+ sage: Q._latex_term(I[0,3])
551
+ 'B_{3\\delta+\\alpha_1}'
552
+ sage: Q._latex_term(I[0,-3])
553
+ 'B_{2\\delta+\\alpha_0}'
554
+ sage: Q._latex_term(I[1,3])
555
+ 'B_{3\\delta}'
556
+ sage: Q._latex_term(I[0,-1]^2 * I[1,3]^13 * I[0,3])
557
+ 'B_{\\alpha_0}^{2} B_{3\\delta}^{13} B_{3\\delta+\\alpha_1}'
558
+ """
559
+ def to_str(x):
560
+ k,e = x
561
+ if k[0] == 0:
562
+ if k[1] == -1:
563
+ ret = 'B_{\\alpha_0}'
564
+ elif k[1] == 0:
565
+ ret = 'B_{\\alpha_1}'
566
+ elif k[1] < -1:
567
+ ret = 'B_{{{}\\delta+\\alpha_0}}'.format(-k[1]-1)
568
+ elif k[1] > 0:
569
+ ret = 'B_{{{}\\delta+\\alpha_1}}'.format(k[1])
570
+ else:
571
+ ret = 'B_{{{}\\delta}}'.format(k[1])
572
+ if e > 1:
573
+ ret = ret + '^{{{}}}'.format(e)
574
+ return ret
575
+ return ' '.join(to_str(x) for x in m._sorted_items())
576
+
577
+ def lie_algebra(self):
578
+ r"""
579
+ Return the underlying Lie algebra of ``self``.
580
+
581
+ EXAMPLES::
582
+
583
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
584
+ sage: Q = O.quantum_group()
585
+ sage: Q.lie_algebra()
586
+ Onsager algebra over Rational Field
587
+ sage: Q.lie_algebra() is O
588
+ True
589
+ """
590
+ return self._g
591
+
592
+ def algebra_generators(self):
593
+ r"""
594
+ Return the algebra generators of ``self``.
595
+
596
+ EXAMPLES::
597
+
598
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
599
+ sage: Q = O.quantum_group()
600
+ sage: Q.algebra_generators()
601
+ Lazy family (generator map(i))_{i in Disjoint union of
602
+ Family (Integer Ring, Positive integers)}
603
+ """
604
+ G = self._indices.gens()
605
+ return Family(self._indices._indices, lambda x: self.monomial(G[x]),
606
+ name="generator map")
607
+
608
+ gens = algebra_generators
609
+
610
+ def q(self):
611
+ """
612
+ Return the parameter `q` of ``self``.
613
+
614
+ EXAMPLES::
615
+
616
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
617
+ sage: Q = O.quantum_group()
618
+ sage: Q.q()
619
+ q
620
+ """
621
+ return self._q
622
+
623
+ def c(self):
624
+ """
625
+ Return the parameter `c` of ``self``.
626
+
627
+ EXAMPLES::
628
+
629
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
630
+ sage: Q = O.quantum_group(c=-3)
631
+ sage: Q.c()
632
+ -3
633
+ """
634
+ return self._c
635
+
636
+ @cached_method
637
+ def one_basis(self):
638
+ """
639
+ Return the basis element indexing `1`.
640
+
641
+ EXAMPLES::
642
+
643
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
644
+ sage: Q = O.quantum_group()
645
+ sage: ob = Q.one_basis(); ob
646
+ 1
647
+ sage: ob.parent()
648
+ Free abelian monoid indexed by
649
+ Disjoint union of Family (Integer Ring, Positive integers)
650
+ """
651
+ return self._indices.one()
652
+
653
+ def _an_element_(self):
654
+ """
655
+ Return an element of ``self``.
656
+
657
+ EXAMPLES::
658
+
659
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
660
+ sage: Q = O.quantum_group()
661
+ sage: Q.an_element()
662
+ -2*B[2d+a0] + q*B[2d] + B[2d+a1]
663
+ """
664
+ G = self.algebra_generators()
665
+ return G[0,2] - 2*G[0,-3] + self.base_ring().an_element()*G[1,2]
666
+
667
+ def some_elements(self):
668
+ """
669
+ Return some elements of ``self``.
670
+
671
+ EXAMPLES::
672
+
673
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
674
+ sage: Q = O.quantum_group()
675
+ sage: Q.some_elements()
676
+ [B[a1], B[3d+a1], B[a0], B[1d], B[4d]]
677
+ """
678
+ G = self.algebra_generators()
679
+ return [G[0,0], G[0,3], G[0,-1], G[1,1], G[1,4]]
680
+
681
+ def degree_on_basis(self, m):
682
+ r"""
683
+ Return the degree of the basis element indexed by ``m``.
684
+
685
+ EXAMPLES::
686
+
687
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
688
+ sage: Q = O.quantum_group()
689
+ sage: G = Q.algebra_generators()
690
+ sage: B0 = G[0,0]
691
+ sage: B1 = G[0,-1]
692
+ sage: Q.degree_on_basis(B0.leading_support())
693
+ 1
694
+ sage: Q.degree_on_basis((B1^10 * B0^10).leading_support())
695
+ 20
696
+ sage: ((B0 * B1)^3).maximal_degree()
697
+ 6
698
+ """
699
+ return m.length()
700
+
701
+ @cached_method
702
+ def product_on_basis(self, lhs, rhs):
703
+ r"""
704
+ Return the product of the two basis elements ``lhs`` and ``rhs``.
705
+
706
+ EXAMPLES::
707
+
708
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
709
+ sage: Q = O.quantum_group()
710
+ sage: I = Q._indices.gens()
711
+ sage: Q.product_on_basis(I[1,21]^2, I[1,31]^3)
712
+ B[21d]^2*B[31d]^3
713
+ sage: Q.product_on_basis(I[1,31]^3, I[1,21]^2)
714
+ B[21d]^2*B[31d]^3
715
+ sage: Q.product_on_basis(I[0,8], I[0,6])
716
+ B[8d+a1]*B[6d+a1]
717
+ sage: Q.product_on_basis(I[0,-8], I[0,6])
718
+ B[7d+a0]*B[6d+a1]
719
+ sage: Q.product_on_basis(I[0,-6], I[0,-8])
720
+ B[5d+a0]*B[7d+a0]
721
+ sage: Q.product_on_basis(I[0,-6], I[1,2])
722
+ B[5d+a0]*B[2d]
723
+ sage: Q.product_on_basis(I[1,6], I[0,2])
724
+ B[6d]*B[2d+a1]
725
+
726
+ sage: Q.product_on_basis(I[0,1], I[0,2])
727
+ 1/q^2*B[2d+a1]*B[1d+a1] - B[1d]
728
+ sage: Q.product_on_basis(I[0,-3], I[0,-1])
729
+ 1/q^2*B[a0]*B[2d+a0] + ((-q^2+1)/q^2)*B[1d+a0]^2 - B[2d]
730
+ sage: Q.product_on_basis(I[0,2], I[0,-1])
731
+ q^2*B[a0]*B[2d+a1] + ((q^4-1)/q^2)*B[1d+a1]*B[a1]
732
+ + (-q^2+1)*B[1d] + q^2*B[3d]
733
+ sage: Q.product_on_basis(I[0,2], I[1,1])
734
+ B[1d]*B[2d+a1] + (q^2+1)*B[3d+a1] + (-q^2-1)*B[1d+a1]
735
+ sage: Q.product_on_basis(I[0,1], I[1,2])
736
+ ((-q^4+1)/q^2)*B[1d]*B[2d+a1] + ((q^4-1)/q^2)*B[1d]*B[a1]
737
+ + B[2d]*B[1d+a1] + (-q^4-q^2)*B[a0]
738
+ + ((q^2+1)/q^2)*B[3d+a1] + ((q^6+q^4-q^2-1)/q^2)*B[1d+a1]
739
+ sage: Q.product_on_basis(I[1,2], I[0,-1])
740
+ B[a0]*B[2d] + ((-q^4+1)/q^2)*B[1d+a0]*B[1d]
741
+ + ((q^4-1)/q^2)*B[1d]*B[a1] + ((q^2+1)/q^2)*B[2d+a0]
742
+ + ((-q^2-1)/q^2)*B[1d+a1]
743
+ sage: Q.product_on_basis(I[1,2], I[0,-4])
744
+ ((q^4-1)/q^2)*B[2d+a0]*B[1d] + B[3d+a0]*B[2d]
745
+ + ((-q^4+1)/q^2)*B[4d+a0]*B[1d] + (-q^4-q^2)*B[1d+a0]
746
+ + ((q^6+q^4-q^2-1)/q^2)*B[3d+a0] + ((q^2+1)/q^2)*B[5d+a0]
747
+
748
+ TESTS::
749
+
750
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
751
+ sage: Q = O.quantum_group()
752
+ sage: G = Q.gens()
753
+ sage: G[0,2]*(G[0,1]*G[0,3]) - (G[0,2]*G[0,1])*G[0,3]
754
+ 0
755
+ sage: G[0,-2]*(G[0,-1]*G[0,-3]) - (G[0,-2]*G[0,-1])*G[0,-3]
756
+ 0
757
+ sage: G[0,1]*(G[0,3]*G[0,-2]) - (G[0,1]*G[0,3])*G[0,-2]
758
+ 0
759
+ sage: G[0,2]*(G[0,1]*G[1,3]) - (G[0,2]*G[0,1])*G[1,3]
760
+ 0
761
+ sage: G[0,-2]*(G[0,1]*G[1,3]) - (G[0,-2]*G[0,1])*G[1,3]
762
+ 0
763
+ sage: G[0,-2]*(G[1,1]*G[1,3]) - (G[0,-2]*G[1,1])*G[1,3]
764
+ 0
765
+ """
766
+ # Some trivial base cases
767
+ if lhs == self.one_basis():
768
+ return self.monomial(rhs)
769
+ if rhs == self.one_basis():
770
+ return self.monomial(lhs)
771
+
772
+ I = self._indices
773
+ B = I.gens()
774
+ q = self._q
775
+ kl = lhs.trailing_support()
776
+ kr = rhs.leading_support()
777
+ if self._basis_key(kl) <= self._basis_key(kr):
778
+ return self.monomial(lhs * rhs)
779
+
780
+ # Create the commutator
781
+ # We have xy - yx = [x, y] -> xy = yx + LOT for x > y
782
+ if kl[0] == 1 and kr[0] == 1:
783
+ # [B[rd], B[md]] == 0
784
+ return self.monomial(lhs * B[kr]) * self.monomial(rhs // B[kr])
785
+
786
+ if kl[0] == 0 and kr[0] == 0:
787
+ def a(m, p):
788
+ if p <= (m - 1) // 2:
789
+ return q**(-2*(p-1)) * (1 + q**-2)
790
+ # Assume m is even and p == m/2
791
+ assert p == m // 2 and m % 2 == 0
792
+ return q**(-m+2)
793
+ if kl[1] * kr[1] > 0 or (kl[1] == 0 and kr[1] > 0):
794
+ # Same sign
795
+ # [B[rd+a1], B[(r+m)d+a1]]
796
+ m = kr[1] - kl[1]
797
+ assert m > 0
798
+ terms = q**-2 * self.monomial(B[kr] * B[kl])
799
+ terms -= self.monomial(B[1,m])
800
+ temp = (-sum(q**(-2*(p-1)) * self.monomial(B[1,m-2*p])
801
+ for p in range(1, (m - 1) // 2 + 1))
802
+ + sum(a(m,p) * self.monomial(B[0,kr[1]-p]) * self.monomial(B[0,p+kl[1]])
803
+ for p in range(1, m // 2 + 1)))
804
+ terms += (q**-2 - 1) * temp
805
+ else:
806
+ r = -kr[1] - 1
807
+ # s = kl[1]
808
+ if r <= kl[1]:
809
+ # [B[rd+a0], B[sd+a1]] r <= s
810
+ terms = -self.monomial(B[kr] * B[kl])
811
+ terms -= self.monomial(B[1,r+kl[1]+1])
812
+ terms -= (q**2-1) * sum(q**(2*k) * self.monomial(B[1,r+kl[1]-1-2*k])
813
+ for k in range(r))
814
+ terms -= (q**2-q**-2) * sum(q**(2*(r-1-k)) * self.monomial(B[0,-(k+1)]) * self.monomial(B[0,-r+kl[1]+k])
815
+ for k in range(r))
816
+ m = -r + kl[1] + 1
817
+ temp = (-sum(q**(-2*(p-1)) * self.monomial(B[1,m-2*p])
818
+ for p in range(1, (m - 1) // 2 + 1))
819
+ + sum(a(m,p) * self.monomial(B[0,m-p-1]) * self.monomial(B[0,p-1])
820
+ for p in range(1, m // 2 + 1)))
821
+ terms += (q**-2 - 1) * q**(2*r) * temp
822
+ else:
823
+ # [B[rd+a0], B[sd+a1]] r > s
824
+ terms = -self.monomial(B[kr] * B[kl])
825
+ terms -= self.monomial(B[1,r+kl[1]+1])
826
+ terms -= (q**2-1) * sum(q**(2*k) * self.monomial(B[1,r+kl[1]-1-2*k])
827
+ for k in range(kl[1]))
828
+ terms -= (q**2-q**-2) * sum(q**(2*(kl[1]-1-k)) * self.monomial(B[0,-(r-kl[1]+k+1)]) * self.monomial(B[0,k])
829
+ for k in range(kl[1]))
830
+ m = r - kl[1] + 1
831
+ temp = (-sum(q**(-2*(p-1)) * self.monomial(B[1,m-2*p])
832
+ for p in range(1, (m - 1) // 2 + 1))
833
+ + sum(a(m,p) * self.monomial(B[0,-p]) * self.monomial(B[0,p-m])
834
+ for p in range(1, m // 2 + 1)))
835
+ terms += (q**-2 - 1) * q**(2*kl[1]) * temp
836
+ terms = -q**2 * terms
837
+ elif kl[0] == 1 and kr[0] == 0:
838
+ terms = self.monomial(B[kr] * B[kl])
839
+ # We have kr[1] < 0
840
+ assert kr[1] < 0
841
+ p = -kr[1] - 1
842
+ if p < kl[1]:
843
+ # [B[md], B[pd+a0]] with p < m
844
+ # m = kl[1]
845
+ terms += self._c * self._q_two * (
846
+ q**(-2*(kl[1]-1)) * self.monomial(B[0,-(kl[1]+p+1)])
847
+ + (q**2 - q**-2) * sum(q**(-2*(kl[1]-2*p+2*h))
848
+ * self.monomial(B[0,-(kl[1]-p+2*h+1)])
849
+ for h in range(p))
850
+ - q**(-2*(kl[1]-2*p-1)) * self.monomial(B[0,kl[1]-p-1])
851
+ )
852
+ terms -= (q**2 - q**-2) * sum(
853
+ q**(-2*(ell-1)) * self.monomial(B[0,-(ell+p+1)] * B[1,kl[1]-ell])
854
+ + (q**2 - q**-2) * sum(q**(-2*(ell-2*h)) * self.monomial(B[0,-(ell+p-2*h+1)] * B[1,kl[1]-ell])
855
+ for h in range(1, ell))
856
+ - q**(2*(ell-1)) * self.monomial(B[0,-(p-ell+1)] * B[1,kl[1]-ell])
857
+ for ell in range(1, p+1))
858
+ terms -= (q**2 - q**-2) * sum(
859
+ q**(-2*(ell-1)) * self.monomial(B[0,-(ell+p+1)] * B[1,kl[1]-ell])
860
+ + (q**2 - q**-2) * sum(q**(-2*(ell-2*h)) * self.monomial(B[0,-(ell+p-2*h+1)] * B[1,kl[1]-ell])
861
+ for h in range(1, p+1))
862
+ for ell in range(p+1, kl[1]))
863
+ terms += (q**2 - q**-2) * sum(
864
+ q**(-2*(ell-2*p-1)) * self.monomial(B[1,kl[1]-ell] * B[0,ell-p-1])
865
+ for ell in range(p+1, kl[1]))
866
+ else:
867
+ # [B[md], B[pd+a0]] with p >= m
868
+ # m = kl[1]
869
+ terms += self._c * self._q_two * (
870
+ q**(-2*(kl[1]-1)) * self.monomial(B[0,-(p+kl[1]+1)])
871
+ + (q**2 - q**-2) * sum(q**(2*(kl[1]-2-2*h))
872
+ * self.monomial(B[0,-(p-kl[1]+2+2*h+1)])
873
+ for h in range(kl[1]-1))
874
+ - q**(2*(kl[1]-1)) * self.monomial(B[0,-(p-kl[1]+1)])
875
+ )
876
+ terms -= (q**2 - q**-2) * sum(
877
+ q**(-2*(ell-1)) * self.monomial(B[0,-(p+ell+1)] * B[1,kl[1]-ell])
878
+ + (q**2 - q**-2) * sum(q**(-2*(ell-2*h)) * self.monomial(B[0,-(p+ell-2*h+1)] * B[1,kl[1]-ell])
879
+ for h in range(1, ell))
880
+ - q**(2*(ell-1)) * self.monomial(B[0,-(p-ell+1)] * B[1,kl[1]-ell])
881
+ for ell in range(1, kl[1]))
882
+ else: # kl[0] == 0 and kr[0] == 1:
883
+ terms = self.monomial(B[kr] * B[kl])
884
+ if kl[1] < kr[1]:
885
+ # [B[pd+a1], B[md]] with p < m
886
+ # p = kl[1], m = kr[1]
887
+ terms += self._c * self._q_two * (
888
+ q**(-2*(kr[1]-1)) * self.monomial(B[0,kr[1]+kl[1]])
889
+ + (q**2 - q**-2) * sum(q**(-2*(kr[1]-2*kl[1]+2*h))
890
+ * self.monomial(B[0,kr[1]-kl[1]+2*h])
891
+ for h in range(kl[1]))
892
+ - q**(-2*(kr[1]-2*kl[1]-1)) * self.monomial(B[0,kl[1]-kr[1]])
893
+ )
894
+ terms -= (q**2 - q**-2) * sum(
895
+ q**(-2*(ell-1)) * self.monomial(B[1,kr[1]-ell] * B[0,ell+kl[1]])
896
+ + (q**2 - q**-2) * sum(q**(-2*(ell-2*h)) * self.monomial(B[1,kr[1]-ell] * B[0,ell+kl[1]-2*h])
897
+ for h in range(1, ell))
898
+ - q**(2*(ell-1)) * self.monomial(B[1,kr[1]-ell] * B[0,kl[1]-ell])
899
+ for ell in range(1, kl[1]+1))
900
+ terms -= (q**2 - q**-2) * sum(
901
+ q**(-2*(ell-1)) * self.monomial(B[1,kr[1]-ell] * B[0,ell+kl[1]])
902
+ + (q**2 - q**-2) * sum(q**(-2*(ell-2*h)) * self.monomial(B[1,kr[1]-ell] * B[0,ell+kl[1]-2*h])
903
+ for h in range(1, kl[1]+1))
904
+ for ell in range(kl[1]+1, kr[1]))
905
+ terms += (q**2 - q**-2) * sum(
906
+ q**(-2*(ell-2*kl[1]-1)) * self.monomial(B[0,kl[1]-ell] * B[1,kr[1]-ell])
907
+ for ell in range(kl[1]+1, kr[1]))
908
+ else:
909
+ # [B[pd+a1], B[md]] with p >= m
910
+ # p = kl[1], m = kr[1]
911
+ terms += self._c * self._q_two * (
912
+ q**(-2*(kr[1]-1)) * self.monomial(B[0,kl[1]+kr[1]])
913
+ + (q**2 - q**-2) * sum(q**(2*(kr[1]-2-2*h))
914
+ * self.monomial(B[0,kl[1]-kr[1]+2+2*h])
915
+ for h in range(kr[1]-1))
916
+ - q**(2*(kr[1]-1)) * self.monomial(B[0,kl[1]-kr[1]])
917
+ )
918
+ terms -= (q**2 - q**-2) * sum(
919
+ q**(-2*(ell-1)) * self.monomial(B[1,kr[1]-ell] * B[0,kl[1]+ell])
920
+ + (q**2 - q**-2) * sum(q**(-2*(ell-2*h)) * self.monomial(B[1,kr[1]-ell] * B[0,kl[1]+ell-2*h])
921
+ for h in range(1, ell))
922
+ - q**(2*(ell-1)) * self.monomial(B[1,kr[1]-ell] * B[0,kl[1]-ell])
923
+ for ell in range(1, kr[1]))
924
+
925
+ return self.monomial(lhs // B[kl]) * terms * self.monomial(rhs // B[kr])
926
+
927
+ #####################################################################
928
+ # ACE of the Onsager algebra
929
+
930
+
931
+ class OnsagerAlgebraACE(InfinitelyGeneratedLieAlgebra, IndexedGenerators):
932
+ r"""
933
+ The alternating central extension of the Onsager algebra.
934
+
935
+ The *alternating central extension* of the :class:`Onsager algebra
936
+ <sage.algebras.lie_algebras.onsager.OnsagerAlgebra>` is the Lie algebra
937
+ with basis elements `\{\mathcal{A}_k, \mathcal{B}_k\}_{k \in \ZZ}`
938
+ that satisfy the relations
939
+
940
+ .. MATH::
941
+
942
+ \begin{aligned}
943
+ [\mathcal{A}_k, \mathcal{A}_m] & = \mathcal{B}_{k-m} - \mathcal{B}_{m-k},
944
+ \\ [\mathcal{A}_k, \mathcal{B}_m] & = \mathcal{A}_{k+m} - \mathcal{A}_{k-m},
945
+ \\ [\mathcal{B}_k, \mathcal{B}_m] & = 0.
946
+ \end{aligned}
947
+
948
+ This has a natural injection from the Onsager algebra by the map `\iota`
949
+ defined by
950
+
951
+ .. MATH::
952
+
953
+ \iota(A_k) = \mathcal{A}_k,
954
+ \qquad\qquad
955
+ \iota(B_k) = \mathcal{B}_k - \mathcal{B}_{-k}.
956
+
957
+ Note that the map `\iota` differs slightly from Lemma 4.18 in [Ter2021b]_
958
+ due to our choice of basis of the Onsager algebra.
959
+
960
+ .. WARNING::
961
+
962
+ We have added an extra basis vector `\mathcal{B}_0`, which would
963
+ be `0` in the definition given in [Ter2021b]_.
964
+
965
+ EXAMPLES:
966
+
967
+ We begin by constructing the ACE and doing some sample computations::
968
+
969
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
970
+ sage: ACE = O.alternating_central_extension()
971
+ sage: ACE
972
+ Alternating central extension of the Onsager algebra over Rational Field
973
+
974
+ sage: B = ACE.basis()
975
+ sage: A1, A2, Am2 = B[0,1], B[0,2], B[0,-2]
976
+ sage: B1, B2, Bm2 = B[1,1], B[1,2], B[1,-2]
977
+ sage: A1.bracket(Am2)
978
+ -B[-3] + B[3]
979
+ sage: A1.bracket(A2)
980
+ B[-1] - B[1]
981
+ sage: A1.bracket(B2)
982
+ -A[-1] + A[3]
983
+ sage: A1.bracket(Bm2)
984
+ A[-1] - A[3]
985
+ sage: B2.bracket(B1)
986
+ 0
987
+ sage: Bm2.bracket(B2)
988
+ 0
989
+ sage: (A2 + Am2).bracket(B1 + A2 + B2 + Bm2)
990
+ -A[-3] + A[-1] - A[1] + A[3] + B[-4] - B[4]
991
+
992
+ The natural inclusion map `\iota` is implemented as a coercion map::
993
+
994
+ sage: iota = ACE.coerce_map_from(O)
995
+ sage: b = O.basis()
996
+ sage: am1, a2, b4 = b[0,-1], b[0,2], b[1,4]
997
+ sage: iota(am1.bracket(a2)) == iota(am1).bracket(iota(a2))
998
+ True
999
+ sage: iota(am1.bracket(b4)) == iota(am1).bracket(iota(b4))
1000
+ True
1001
+ sage: iota(b4.bracket(a2)) == iota(b4).bracket(iota(a2))
1002
+ True
1003
+
1004
+ sage: am1 + B2
1005
+ A[-1] + B[2]
1006
+ sage: am1.bracket(B2)
1007
+ -A[-3] + A[1]
1008
+ sage: Bm2.bracket(a2)
1009
+ -A[0] + A[4]
1010
+
1011
+ We have the projection map `\rho` from Lemma 4.19 in [Ter2021b]_:
1012
+
1013
+ .. MATH::
1014
+
1015
+ \rho(\mathcal{A}_k) = A_k,
1016
+ \qquad\qquad
1017
+ \rho(\mathcal{B}_k) = \mathrm{sgn}(k) B_{|k|}.
1018
+
1019
+ The kernel of `\rho` is the center `\mathcal{Z}`, which has a basis
1020
+ `\{B_k + B_{-k}\}_{k \in \ZZ}`::
1021
+
1022
+ sage: rho = ACE.projection()
1023
+ sage: rho(A1)
1024
+ A[1]
1025
+ sage: rho(Am2)
1026
+ A[-2]
1027
+ sage: rho(B1)
1028
+ 1/2*G[1]
1029
+ sage: rho(Bm2)
1030
+ -1/2*G[2]
1031
+ sage: all(rho(B[1,k] + B[1,-k]) == 0 for k in range(-6,6))
1032
+ True
1033
+ sage: all(B[0,m].bracket(B[1,k] + B[1,-k]) == 0
1034
+ ....: for k in range(-4,4) for m in range(-4,4))
1035
+ True
1036
+ """
1037
+ def __init__(self, R):
1038
+ r"""
1039
+ Initialize ``self``.
1040
+
1041
+ EXAMPLES::
1042
+
1043
+ sage: ACE = lie_algebras.AlternatingCentralExtensionOnsagerAlgebra(QQ)
1044
+ sage: TestSuite(ACE).run()
1045
+
1046
+ sage: B = ACE.basis()
1047
+ sage: A1, A2, Am2 = B[0,1], B[0,2], B[0,-2]
1048
+ sage: B1, B2, Bm2 = B[1,1], B[1,2], B[1,-2]
1049
+ sage: TestSuite(ACE).run(elements=[A1,A2,Am2,B1,B2,Bm2,ACE.an_element()])
1050
+ """
1051
+ cat = LieAlgebras(R).WithBasis()
1052
+ from sage.rings.integer_ring import ZZ
1053
+ from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets
1054
+ I = DisjointUnionEnumeratedSets([ZZ, ZZ], keepkey=True, facade=True)
1055
+ IndexedGenerators.__init__(self, I)
1056
+ InfinitelyGeneratedLieAlgebra.__init__(self, R, index_set=I, category=cat)
1057
+
1058
+ def _repr_(self):
1059
+ """
1060
+ Return a string representation of ``self``.
1061
+
1062
+ EXAMPLES::
1063
+
1064
+ sage: lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1065
+ Alternating central extension of the Onsager algebra over Rational Field
1066
+ """
1067
+ return "Alternating central extension of the Onsager algebra over {}".format(self.base_ring())
1068
+
1069
+ def _latex_(self):
1070
+ r"""
1071
+ Return a string representation of ``self``.
1072
+
1073
+ EXAMPLES::
1074
+
1075
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1076
+ sage: latex(O)
1077
+ \mathcal{O}_{\Bold{Q}}
1078
+ """
1079
+ from sage.misc.latex import latex
1080
+ return "\\mathcal{{O}}_{{{}}}".format(latex(self.base_ring()))
1081
+
1082
+ def _repr_generator(self, m):
1083
+ """
1084
+ Return a string representation of the generator indexed by ``m``.
1085
+
1086
+ EXAMPLES::
1087
+
1088
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1089
+ sage: O._repr_generator((0,-2))
1090
+ 'A[-2]'
1091
+ sage: O._repr_generator((1,4))
1092
+ 'B[4]'
1093
+ """
1094
+ if m[0] == 0:
1095
+ return 'A[{}]'.format(m[1])
1096
+ return 'B[{}]'.format(m[1])
1097
+
1098
+ def _latex_generator(self, m):
1099
+ r"""
1100
+ Return a LaTeX representation of the generator indexed by ``m``.
1101
+
1102
+ EXAMPLES::
1103
+
1104
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1105
+ sage: O._latex_generator((0,-2))
1106
+ '\\mathcal{A}_{-2}'
1107
+ sage: O._latex_generator((1,4))
1108
+ '\\mathcal{B}_{4}'
1109
+ """
1110
+ if m[0] == 0:
1111
+ return '\\mathcal{{A}}_{{{}}}'.format(m[1])
1112
+ return '\\mathcal{{B}}_{{{}}}'.format(m[1])
1113
+
1114
+ # For compatibility with CombinatorialFreeModuleElement
1115
+ _repr_term = _repr_generator
1116
+ _latex_term = _latex_generator
1117
+
1118
+ @cached_method
1119
+ def basis(self):
1120
+ r"""
1121
+ Return the basis of ``self``.
1122
+
1123
+ EXAMPLES::
1124
+
1125
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1126
+ sage: O.basis()
1127
+ Lazy family (Onsager ACE monomial(i))_{i in
1128
+ Disjoint union of Family (Integer Ring, Integer Ring)}
1129
+ """
1130
+ return Family(self._indices, self.monomial, name='Onsager ACE monomial')
1131
+
1132
+ @cached_method
1133
+ def lie_algebra_generators(self):
1134
+ r"""
1135
+ Return the generators of ``self`` as a Lie algebra.
1136
+
1137
+ EXAMPLES::
1138
+
1139
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1140
+ sage: O.lie_algebra_generators()
1141
+ Lazy family (Onsager ACE monomial(i))_{i in
1142
+ Disjoint union of Family (Integer Ring, Integer Ring)}
1143
+ """
1144
+ return self.basis()
1145
+
1146
+ def _an_element_(self):
1147
+ r"""
1148
+ Return an element of ``self``.
1149
+
1150
+ EXAMPLES::
1151
+
1152
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1153
+ sage: O.an_element()
1154
+ -2*A[-3] + A[2] + B[-1] + 3*B[2]
1155
+ """
1156
+ B = self.basis()
1157
+ return B[0,2] - 2*B[0,-3] + 3*B[1,2] + B[1,-1]
1158
+
1159
+ def some_elements(self):
1160
+ r"""
1161
+ Return some elements of ``self``.
1162
+
1163
+ EXAMPLES::
1164
+
1165
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1166
+ sage: O.some_elements()
1167
+ [A[0], A[2], A[-1], B[4], B[-3], -2*A[-3] + A[2] + B[-1] + 3*B[2]]
1168
+ """
1169
+ B = self.basis()
1170
+ return [B[0,0], B[0,2], B[0,-1], B[1,4], B[1,-3], self.an_element()]
1171
+
1172
+ def bracket_on_basis(self, x, y):
1173
+ r"""
1174
+ Return the bracket of basis elements indexed by ``x`` and ``y``
1175
+ where ``x < y``.
1176
+
1177
+ EXAMPLES::
1178
+
1179
+ sage: O = lie_algebras.OnsagerAlgebra(QQ).alternating_central_extension()
1180
+ sage: O.bracket_on_basis((1,3), (1,9)) # [B, B]
1181
+ 0
1182
+ sage: O.bracket_on_basis((0,8), (1,13)) # [A, B]
1183
+ -A[-5] + A[21]
1184
+ sage: O.bracket_on_basis((0,-9), (0, 7)) # [A, A]
1185
+ B[-16] - B[16]
1186
+ """
1187
+ if x[0] == 1:
1188
+ # From < property, we have y[0] == 1
1189
+ # Therefore, we have [B_k, B_m] = 0
1190
+ return self.zero()
1191
+ R = self.base_ring()
1192
+ one = R.one()
1193
+ if y[0] == 1: # [A_k, B_m] = A_{k+m} - A_{k-m}
1194
+ if y[1] == 0: # special case for m = 0, as A_k - A_k = 0
1195
+ return self.zero()
1196
+ d = {(0, x[1]-y[1]): -one, (0, y[1]+x[1]): one}
1197
+ else:
1198
+ # [A_k, A_m] = B_{k-m} - B_{m-k}
1199
+ d = {(1, x[1]-y[1]): one, (1, y[1]-x[1]): -one}
1200
+ return self.element_class(self, d)
1201
+
1202
+ def _coerce_map_from_(self, R):
1203
+ r"""
1204
+ Return if there is a coercion map from ``R``.
1205
+
1206
+ EXAMPLES::
1207
+
1208
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
1209
+ sage: ACE = O.alternating_central_extension()
1210
+ sage: ACE.has_coerce_map_from(O) # indirect doctest
1211
+ True
1212
+ """
1213
+ if isinstance(R, OnsagerAlgebra):
1214
+ if R.base_ring().has_coerce_map_from(self.base_ring()):
1215
+ return R.module_morphism(self._from_onsager_on_basis, codomain=self)
1216
+ return super()._coerce_map_from_(R)
1217
+
1218
+ def _from_onsager_on_basis(self, x):
1219
+ r"""
1220
+ Map the basis element indexed by ``x`` from the corresponding
1221
+ Onsager algebra to ``self``.
1222
+
1223
+ EXAMPLES::
1224
+
1225
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
1226
+ sage: ACE = O.alternating_central_extension()
1227
+ sage: ACE._from_onsager_on_basis((0, 2))
1228
+ A[2]
1229
+ sage: ACE._from_onsager_on_basis((1, 4))
1230
+ -B[-4] + B[4]
1231
+
1232
+ sage: phi = ACE.coerce_map_from(O)
1233
+ sage: a1 = O.basis()[0,1]
1234
+ sage: a3 = O.basis()[0,3]
1235
+ sage: b2 = O.basis()[1,2]
1236
+ sage: phi(a3)
1237
+ A[3]
1238
+ sage: phi(b2)
1239
+ -B[-2] + B[2]
1240
+ sage: b2.bracket(a3)
1241
+ 2*A[1] - 2*A[5]
1242
+ sage: phi(b2).bracket(phi(a3))
1243
+ 2*A[1] - 2*A[5]
1244
+ sage: phi(b2.bracket(a3))
1245
+ 2*A[1] - 2*A[5]
1246
+
1247
+ sage: a1.bracket(a3)
1248
+ -G[2]
1249
+ sage: phi(a1).bracket(phi(a3))
1250
+ B[-2] - B[2]
1251
+ sage: phi(a1.bracket(a3))
1252
+ B[-2] - B[2]
1253
+ """
1254
+ one = self.base_ring().one()
1255
+ if x[0] == 0:
1256
+ return self._from_dict({x: one}, remove_zeros=False)
1257
+ return self._from_dict({(1, x[1]): one, (1, -x[1]): -one}, remove_zeros=False)
1258
+
1259
+ def projection(self):
1260
+ r"""
1261
+ Return the projection map `\rho` from Lemma 4.19 in [Ter2021b]_
1262
+ to the Onsager algebra.
1263
+
1264
+ EXAMPLES::
1265
+
1266
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
1267
+ sage: ACE = O.alternating_central_extension()
1268
+ sage: rho = ACE.projection()
1269
+ sage: B = ACE.basis()
1270
+ sage: A1, A2, Am2 = B[0,1], B[0,2], B[0,-2]
1271
+ sage: B1, B2, Bm2 = B[1,1], B[1,2], B[1,-2]
1272
+
1273
+ sage: rho(A1)
1274
+ A[1]
1275
+ sage: rho(Am2)
1276
+ A[-2]
1277
+ sage: rho(B1)
1278
+ 1/2*G[1]
1279
+ sage: rho(B2)
1280
+ 1/2*G[2]
1281
+ sage: rho(Bm2)
1282
+ -1/2*G[2]
1283
+
1284
+ sage: rho(A1.bracket(A2))
1285
+ -G[1]
1286
+ sage: rho(A1).bracket(rho(A2))
1287
+ -G[1]
1288
+ sage: rho(B1.bracket(Am2))
1289
+ A[-3] - A[-1]
1290
+ sage: rho(B1).bracket(rho(Am2))
1291
+ A[-3] - A[-1]
1292
+ """
1293
+ O = OnsagerAlgebra(self.base_ring())
1294
+ return self.module_morphism(self._projection_on_basis, codomain=O)
1295
+
1296
+ def _projection_on_basis(self, x):
1297
+ r"""
1298
+ Compute the projection map `\rho` on the basis element ``x``.
1299
+
1300
+ EXAMPLES::
1301
+
1302
+ sage: O = lie_algebras.OnsagerAlgebra(QQ)
1303
+ sage: ACE = O.alternating_central_extension()
1304
+ sage: ACE._projection_on_basis((0,2))
1305
+ A[2]
1306
+ sage: ACE._projection_on_basis((1,4))
1307
+ 1/2*G[4]
1308
+ sage: ACE._projection_on_basis((1,-4))
1309
+ -1/2*G[4]
1310
+ """
1311
+ R = self.base_ring()
1312
+ O = OnsagerAlgebra(R)
1313
+ if x[0] == 0: # A_k
1314
+ return O._from_dict({x: R.one()}, remove_zeros=False)
1315
+ # Otherwise B_k
1316
+ c = R.one() / 2
1317
+ if x[1] < 0:
1318
+ return O._from_dict({(1, -x[1]): -c}, remove_zeros=False)
1319
+ elif x[1] == 0:
1320
+ return O.zero()
1321
+ else:
1322
+ return O._from_dict({x: c}, remove_zeros=False)
1323
+
1324
+ Element = LieAlgebraElement