passagemath-modules 10.6.31rc3__cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.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 (806) hide show
  1. passagemath_modules-10.6.31rc3.dist-info/METADATA +281 -0
  2. passagemath_modules-10.6.31rc3.dist-info/RECORD +806 -0
  3. passagemath_modules-10.6.31rc3.dist-info/WHEEL +6 -0
  4. passagemath_modules-10.6.31rc3.dist-info/top_level.txt +2 -0
  5. passagemath_modules.libs/libgfortran-e1b7dfc8.so.5.0.0 +0 -0
  6. passagemath_modules.libs/libgmp-93ebf16a.so.10.5.0 +0 -0
  7. passagemath_modules.libs/libgsl-e3525837.so.28.0.0 +0 -0
  8. passagemath_modules.libs/libmpc-c5c421e1.so.3.3.1 +0 -0
  9. passagemath_modules.libs/libmpfr-e0f11cf3.so.6.2.1 +0 -0
  10. passagemath_modules.libs/libopenblasp-r0-4c5b64b1.3.29.so +0 -0
  11. sage/algebras/all__sagemath_modules.py +20 -0
  12. sage/algebras/catalog.py +148 -0
  13. sage/algebras/clifford_algebra.py +3107 -0
  14. sage/algebras/clifford_algebra_element.cpython-314-aarch64-linux-gnu.so +0 -0
  15. sage/algebras/clifford_algebra_element.pxd +16 -0
  16. sage/algebras/clifford_algebra_element.pyx +997 -0
  17. sage/algebras/commutative_dga.py +4252 -0
  18. sage/algebras/exterior_algebra_groebner.cpython-314-aarch64-linux-gnu.so +0 -0
  19. sage/algebras/exterior_algebra_groebner.pxd +55 -0
  20. sage/algebras/exterior_algebra_groebner.pyx +727 -0
  21. sage/algebras/finite_dimensional_algebras/all.py +2 -0
  22. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +1029 -0
  23. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-314-aarch64-linux-gnu.so +0 -0
  24. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +12 -0
  25. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +706 -0
  26. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py +196 -0
  27. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py +255 -0
  28. sage/algebras/finite_gca.py +528 -0
  29. sage/algebras/group_algebra.py +232 -0
  30. sage/algebras/lie_algebras/abelian.py +197 -0
  31. sage/algebras/lie_algebras/affine_lie_algebra.py +1213 -0
  32. sage/algebras/lie_algebras/all.py +25 -0
  33. sage/algebras/lie_algebras/all__sagemath_modules.py +1 -0
  34. sage/algebras/lie_algebras/bch.py +177 -0
  35. sage/algebras/lie_algebras/bgg_dual_module.py +1184 -0
  36. sage/algebras/lie_algebras/bgg_resolution.py +232 -0
  37. sage/algebras/lie_algebras/center_uea.py +767 -0
  38. sage/algebras/lie_algebras/classical_lie_algebra.py +2516 -0
  39. sage/algebras/lie_algebras/examples.py +683 -0
  40. sage/algebras/lie_algebras/free_lie_algebra.py +973 -0
  41. sage/algebras/lie_algebras/heisenberg.py +820 -0
  42. sage/algebras/lie_algebras/lie_algebra.py +1562 -0
  43. sage/algebras/lie_algebras/lie_algebra_element.cpython-314-aarch64-linux-gnu.so +0 -0
  44. sage/algebras/lie_algebras/lie_algebra_element.pxd +68 -0
  45. sage/algebras/lie_algebras/lie_algebra_element.pyx +2122 -0
  46. sage/algebras/lie_algebras/morphism.py +661 -0
  47. sage/algebras/lie_algebras/nilpotent_lie_algebra.py +457 -0
  48. sage/algebras/lie_algebras/onsager.py +1324 -0
  49. sage/algebras/lie_algebras/poincare_birkhoff_witt.py +816 -0
  50. sage/algebras/lie_algebras/quotient.py +462 -0
  51. sage/algebras/lie_algebras/rank_two_heisenberg_virasoro.py +355 -0
  52. sage/algebras/lie_algebras/representation.py +1040 -0
  53. sage/algebras/lie_algebras/structure_coefficients.py +459 -0
  54. sage/algebras/lie_algebras/subalgebra.py +967 -0
  55. sage/algebras/lie_algebras/symplectic_derivation.py +289 -0
  56. sage/algebras/lie_algebras/verma_module.py +1630 -0
  57. sage/algebras/lie_algebras/virasoro.py +1186 -0
  58. sage/algebras/octonion_algebra.cpython-314-aarch64-linux-gnu.so +0 -0
  59. sage/algebras/octonion_algebra.pxd +20 -0
  60. sage/algebras/octonion_algebra.pyx +987 -0
  61. sage/algebras/orlik_solomon.py +907 -0
  62. sage/algebras/orlik_terao.py +779 -0
  63. sage/algebras/steenrod/all.py +7 -0
  64. sage/algebras/steenrod/steenrod_algebra.py +4258 -0
  65. sage/algebras/steenrod/steenrod_algebra_bases.py +1179 -0
  66. sage/algebras/steenrod/steenrod_algebra_misc.py +1167 -0
  67. sage/algebras/steenrod/steenrod_algebra_mult.py +954 -0
  68. sage/algebras/weyl_algebra.py +1126 -0
  69. sage/all__sagemath_modules.py +62 -0
  70. sage/calculus/all__sagemath_modules.py +19 -0
  71. sage/calculus/expr.py +205 -0
  72. sage/calculus/integration.cpython-314-aarch64-linux-gnu.so +0 -0
  73. sage/calculus/integration.pyx +698 -0
  74. sage/calculus/interpolation.cpython-314-aarch64-linux-gnu.so +0 -0
  75. sage/calculus/interpolation.pxd +13 -0
  76. sage/calculus/interpolation.pyx +387 -0
  77. sage/calculus/interpolators.cpython-314-aarch64-linux-gnu.so +0 -0
  78. sage/calculus/interpolators.pyx +326 -0
  79. sage/calculus/ode.cpython-314-aarch64-linux-gnu.so +0 -0
  80. sage/calculus/ode.pxd +5 -0
  81. sage/calculus/ode.pyx +610 -0
  82. sage/calculus/riemann.cpython-314-aarch64-linux-gnu.so +0 -0
  83. sage/calculus/riemann.pyx +1521 -0
  84. sage/calculus/test_sympy.py +201 -0
  85. sage/calculus/transforms/all.py +7 -0
  86. sage/calculus/transforms/dft.py +844 -0
  87. sage/calculus/transforms/dwt.cpython-314-aarch64-linux-gnu.so +0 -0
  88. sage/calculus/transforms/dwt.pxd +7 -0
  89. sage/calculus/transforms/dwt.pyx +160 -0
  90. sage/calculus/transforms/fft.cpython-314-aarch64-linux-gnu.so +0 -0
  91. sage/calculus/transforms/fft.pxd +12 -0
  92. sage/calculus/transforms/fft.pyx +487 -0
  93. sage/calculus/wester.py +662 -0
  94. sage/coding/abstract_code.py +1108 -0
  95. sage/coding/ag_code.py +868 -0
  96. sage/coding/ag_code_decoders.cpython-314-aarch64-linux-gnu.so +0 -0
  97. sage/coding/ag_code_decoders.pyx +2639 -0
  98. sage/coding/all.py +15 -0
  99. sage/coding/bch_code.py +494 -0
  100. sage/coding/binary_code.cpython-314-aarch64-linux-gnu.so +0 -0
  101. sage/coding/binary_code.pxd +124 -0
  102. sage/coding/binary_code.pyx +4139 -0
  103. sage/coding/bounds_catalog.py +43 -0
  104. sage/coding/channel.py +819 -0
  105. sage/coding/channels_catalog.py +29 -0
  106. sage/coding/code_bounds.py +755 -0
  107. sage/coding/code_constructions.py +804 -0
  108. sage/coding/codes_catalog.py +111 -0
  109. sage/coding/cyclic_code.py +1329 -0
  110. sage/coding/databases.py +316 -0
  111. sage/coding/decoder.py +373 -0
  112. sage/coding/decoders_catalog.py +88 -0
  113. sage/coding/delsarte_bounds.py +709 -0
  114. sage/coding/encoder.py +390 -0
  115. sage/coding/encoders_catalog.py +64 -0
  116. sage/coding/extended_code.py +468 -0
  117. sage/coding/gabidulin_code.py +1058 -0
  118. sage/coding/golay_code.py +404 -0
  119. sage/coding/goppa_code.py +441 -0
  120. sage/coding/grs_code.py +2371 -0
  121. sage/coding/guava.py +107 -0
  122. sage/coding/guruswami_sudan/all.py +1 -0
  123. sage/coding/guruswami_sudan/gs_decoder.py +897 -0
  124. sage/coding/guruswami_sudan/interpolation.py +409 -0
  125. sage/coding/guruswami_sudan/utils.py +176 -0
  126. sage/coding/hamming_code.py +176 -0
  127. sage/coding/information_set_decoder.py +1032 -0
  128. sage/coding/kasami_codes.cpython-314-aarch64-linux-gnu.so +0 -0
  129. sage/coding/kasami_codes.pyx +351 -0
  130. sage/coding/linear_code.py +3067 -0
  131. sage/coding/linear_code_no_metric.py +1354 -0
  132. sage/coding/linear_rank_metric.py +961 -0
  133. sage/coding/parity_check_code.py +353 -0
  134. sage/coding/punctured_code.py +719 -0
  135. sage/coding/reed_muller_code.py +999 -0
  136. sage/coding/self_dual_codes.py +942 -0
  137. sage/coding/source_coding/all.py +2 -0
  138. sage/coding/source_coding/huffman.py +553 -0
  139. sage/coding/subfield_subcode.py +423 -0
  140. sage/coding/two_weight_db.py +399 -0
  141. sage/combinat/all__sagemath_modules.py +7 -0
  142. sage/combinat/cartesian_product.py +347 -0
  143. sage/combinat/family.py +11 -0
  144. sage/combinat/free_module.py +1977 -0
  145. sage/combinat/root_system/all.py +147 -0
  146. sage/combinat/root_system/ambient_space.py +527 -0
  147. sage/combinat/root_system/associahedron.py +471 -0
  148. sage/combinat/root_system/braid_move_calculator.py +143 -0
  149. sage/combinat/root_system/braid_orbit.cpython-314-aarch64-linux-gnu.so +0 -0
  150. sage/combinat/root_system/braid_orbit.pyx +144 -0
  151. sage/combinat/root_system/branching_rules.py +2301 -0
  152. sage/combinat/root_system/cartan_matrix.py +1245 -0
  153. sage/combinat/root_system/cartan_type.py +3069 -0
  154. sage/combinat/root_system/coxeter_group.py +162 -0
  155. sage/combinat/root_system/coxeter_matrix.py +1261 -0
  156. sage/combinat/root_system/coxeter_type.py +681 -0
  157. sage/combinat/root_system/dynkin_diagram.py +900 -0
  158. sage/combinat/root_system/extended_affine_weyl_group.py +2993 -0
  159. sage/combinat/root_system/fundamental_group.py +795 -0
  160. sage/combinat/root_system/hecke_algebra_representation.py +1203 -0
  161. sage/combinat/root_system/integrable_representations.py +1227 -0
  162. sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +1965 -0
  163. sage/combinat/root_system/pieri_factors.py +1147 -0
  164. sage/combinat/root_system/plot.py +1615 -0
  165. sage/combinat/root_system/root_lattice_realization_algebras.py +1214 -0
  166. sage/combinat/root_system/root_lattice_realizations.py +4628 -0
  167. sage/combinat/root_system/root_space.py +487 -0
  168. sage/combinat/root_system/root_system.py +882 -0
  169. sage/combinat/root_system/type_A.py +348 -0
  170. sage/combinat/root_system/type_A_affine.py +227 -0
  171. sage/combinat/root_system/type_A_infinity.py +241 -0
  172. sage/combinat/root_system/type_B.py +347 -0
  173. sage/combinat/root_system/type_BC_affine.py +287 -0
  174. sage/combinat/root_system/type_B_affine.py +216 -0
  175. sage/combinat/root_system/type_C.py +317 -0
  176. sage/combinat/root_system/type_C_affine.py +188 -0
  177. sage/combinat/root_system/type_D.py +357 -0
  178. sage/combinat/root_system/type_D_affine.py +208 -0
  179. sage/combinat/root_system/type_E.py +641 -0
  180. sage/combinat/root_system/type_E_affine.py +231 -0
  181. sage/combinat/root_system/type_F.py +387 -0
  182. sage/combinat/root_system/type_F_affine.py +137 -0
  183. sage/combinat/root_system/type_G.py +293 -0
  184. sage/combinat/root_system/type_G_affine.py +132 -0
  185. sage/combinat/root_system/type_H.py +105 -0
  186. sage/combinat/root_system/type_I.py +110 -0
  187. sage/combinat/root_system/type_Q.py +150 -0
  188. sage/combinat/root_system/type_affine.py +509 -0
  189. sage/combinat/root_system/type_dual.py +704 -0
  190. sage/combinat/root_system/type_folded.py +301 -0
  191. sage/combinat/root_system/type_marked.py +748 -0
  192. sage/combinat/root_system/type_reducible.py +601 -0
  193. sage/combinat/root_system/type_relabel.py +730 -0
  194. sage/combinat/root_system/type_super_A.py +837 -0
  195. sage/combinat/root_system/weight_lattice_realizations.py +1188 -0
  196. sage/combinat/root_system/weight_space.py +639 -0
  197. sage/combinat/root_system/weyl_characters.py +2238 -0
  198. sage/crypto/__init__.py +4 -0
  199. sage/crypto/all.py +28 -0
  200. sage/crypto/block_cipher/all.py +7 -0
  201. sage/crypto/block_cipher/des.py +1065 -0
  202. sage/crypto/block_cipher/miniaes.py +2171 -0
  203. sage/crypto/block_cipher/present.py +909 -0
  204. sage/crypto/block_cipher/sdes.py +1527 -0
  205. sage/crypto/boolean_function.cpython-314-aarch64-linux-gnu.so +0 -0
  206. sage/crypto/boolean_function.pxd +10 -0
  207. sage/crypto/boolean_function.pyx +1487 -0
  208. sage/crypto/cipher.py +78 -0
  209. sage/crypto/classical.py +3668 -0
  210. sage/crypto/classical_cipher.py +569 -0
  211. sage/crypto/cryptosystem.py +387 -0
  212. sage/crypto/key_exchange/all.py +7 -0
  213. sage/crypto/key_exchange/catalog.py +24 -0
  214. sage/crypto/key_exchange/diffie_hellman.py +323 -0
  215. sage/crypto/key_exchange/key_exchange_scheme.py +107 -0
  216. sage/crypto/lattice.py +312 -0
  217. sage/crypto/lfsr.py +295 -0
  218. sage/crypto/lwe.py +840 -0
  219. sage/crypto/mq/__init__.py +4 -0
  220. sage/crypto/mq/mpolynomialsystemgenerator.py +204 -0
  221. sage/crypto/mq/rijndael_gf.py +2345 -0
  222. sage/crypto/mq/sbox.py +7 -0
  223. sage/crypto/mq/sr.py +3344 -0
  224. sage/crypto/public_key/all.py +5 -0
  225. sage/crypto/public_key/blum_goldwasser.py +776 -0
  226. sage/crypto/sbox.cpython-314-aarch64-linux-gnu.so +0 -0
  227. sage/crypto/sbox.pyx +2090 -0
  228. sage/crypto/sboxes.py +2090 -0
  229. sage/crypto/stream.py +390 -0
  230. sage/crypto/stream_cipher.py +297 -0
  231. sage/crypto/util.py +519 -0
  232. sage/ext/all__sagemath_modules.py +1 -0
  233. sage/ext/interpreters/__init__.py +1 -0
  234. sage/ext/interpreters/all__sagemath_modules.py +2 -0
  235. sage/ext/interpreters/wrapper_cc.cpython-314-aarch64-linux-gnu.so +0 -0
  236. sage/ext/interpreters/wrapper_cc.pxd +30 -0
  237. sage/ext/interpreters/wrapper_cc.pyx +252 -0
  238. sage/ext/interpreters/wrapper_cdf.cpython-314-aarch64-linux-gnu.so +0 -0
  239. sage/ext/interpreters/wrapper_cdf.pxd +26 -0
  240. sage/ext/interpreters/wrapper_cdf.pyx +245 -0
  241. sage/ext/interpreters/wrapper_rdf.cpython-314-aarch64-linux-gnu.so +0 -0
  242. sage/ext/interpreters/wrapper_rdf.pxd +23 -0
  243. sage/ext/interpreters/wrapper_rdf.pyx +221 -0
  244. sage/ext/interpreters/wrapper_rr.cpython-314-aarch64-linux-gnu.so +0 -0
  245. sage/ext/interpreters/wrapper_rr.pxd +28 -0
  246. sage/ext/interpreters/wrapper_rr.pyx +335 -0
  247. sage/geometry/all__sagemath_modules.py +5 -0
  248. sage/geometry/toric_lattice.py +1745 -0
  249. sage/geometry/toric_lattice_element.cpython-314-aarch64-linux-gnu.so +0 -0
  250. sage/geometry/toric_lattice_element.pyx +432 -0
  251. sage/groups/abelian_gps/abelian_group.py +1925 -0
  252. sage/groups/abelian_gps/abelian_group_element.py +164 -0
  253. sage/groups/abelian_gps/all__sagemath_modules.py +5 -0
  254. sage/groups/abelian_gps/dual_abelian_group.py +421 -0
  255. sage/groups/abelian_gps/dual_abelian_group_element.py +179 -0
  256. sage/groups/abelian_gps/element_base.py +341 -0
  257. sage/groups/abelian_gps/values.py +488 -0
  258. sage/groups/additive_abelian/additive_abelian_group.py +476 -0
  259. sage/groups/additive_abelian/additive_abelian_wrapper.py +857 -0
  260. sage/groups/additive_abelian/all.py +4 -0
  261. sage/groups/additive_abelian/qmodnz.py +231 -0
  262. sage/groups/additive_abelian/qmodnz_element.py +349 -0
  263. sage/groups/affine_gps/affine_group.py +535 -0
  264. sage/groups/affine_gps/all.py +1 -0
  265. sage/groups/affine_gps/catalog.py +17 -0
  266. sage/groups/affine_gps/euclidean_group.py +246 -0
  267. sage/groups/affine_gps/group_element.py +562 -0
  268. sage/groups/all__sagemath_modules.py +12 -0
  269. sage/groups/galois_group.py +479 -0
  270. sage/groups/matrix_gps/all.py +4 -0
  271. sage/groups/matrix_gps/all__sagemath_modules.py +13 -0
  272. sage/groups/matrix_gps/catalog.py +26 -0
  273. sage/groups/matrix_gps/coxeter_group.py +927 -0
  274. sage/groups/matrix_gps/finitely_generated.py +487 -0
  275. sage/groups/matrix_gps/group_element.cpython-314-aarch64-linux-gnu.so +0 -0
  276. sage/groups/matrix_gps/group_element.pxd +11 -0
  277. sage/groups/matrix_gps/group_element.pyx +431 -0
  278. sage/groups/matrix_gps/linear.py +440 -0
  279. sage/groups/matrix_gps/matrix_group.py +617 -0
  280. sage/groups/matrix_gps/named_group.py +296 -0
  281. sage/groups/matrix_gps/orthogonal.py +544 -0
  282. sage/groups/matrix_gps/symplectic.py +251 -0
  283. sage/groups/matrix_gps/unitary.py +436 -0
  284. sage/groups/misc_gps/all__sagemath_modules.py +1 -0
  285. sage/groups/misc_gps/argument_groups.py +1905 -0
  286. sage/groups/misc_gps/imaginary_groups.py +479 -0
  287. sage/groups/perm_gps/all__sagemath_modules.py +1 -0
  288. sage/groups/perm_gps/partn_ref/all__sagemath_modules.py +1 -0
  289. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-314-aarch64-linux-gnu.so +0 -0
  290. sage/groups/perm_gps/partn_ref/refinement_binary.pxd +41 -0
  291. sage/groups/perm_gps/partn_ref/refinement_binary.pyx +1167 -0
  292. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-314-aarch64-linux-gnu.so +0 -0
  293. sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +31 -0
  294. sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +385 -0
  295. sage/homology/algebraic_topological_model.py +595 -0
  296. sage/homology/all.py +2 -0
  297. sage/homology/all__sagemath_modules.py +8 -0
  298. sage/homology/chain_complex.py +2148 -0
  299. sage/homology/chain_complex_homspace.py +165 -0
  300. sage/homology/chain_complex_morphism.py +629 -0
  301. sage/homology/chain_homotopy.py +604 -0
  302. sage/homology/chains.py +653 -0
  303. sage/homology/free_resolution.py +923 -0
  304. sage/homology/graded_resolution.py +567 -0
  305. sage/homology/hochschild_complex.py +756 -0
  306. sage/homology/homology_group.py +188 -0
  307. sage/homology/homology_morphism.py +422 -0
  308. sage/homology/homology_vector_space_with_basis.py +1454 -0
  309. sage/homology/koszul_complex.py +169 -0
  310. sage/homology/matrix_utils.py +205 -0
  311. sage/libs/all__sagemath_modules.py +1 -0
  312. sage/libs/gsl/__init__.py +1 -0
  313. sage/libs/gsl/airy.pxd +56 -0
  314. sage/libs/gsl/all.pxd +66 -0
  315. sage/libs/gsl/array.cpython-314-aarch64-linux-gnu.so +0 -0
  316. sage/libs/gsl/array.pxd +5 -0
  317. sage/libs/gsl/array.pyx +102 -0
  318. sage/libs/gsl/bessel.pxd +208 -0
  319. sage/libs/gsl/blas.pxd +116 -0
  320. sage/libs/gsl/blas_types.pxd +34 -0
  321. sage/libs/gsl/block.pxd +52 -0
  322. sage/libs/gsl/chebyshev.pxd +37 -0
  323. sage/libs/gsl/clausen.pxd +12 -0
  324. sage/libs/gsl/combination.pxd +47 -0
  325. sage/libs/gsl/complex.pxd +151 -0
  326. sage/libs/gsl/coulomb.pxd +30 -0
  327. sage/libs/gsl/coupling.pxd +21 -0
  328. sage/libs/gsl/dawson.pxd +12 -0
  329. sage/libs/gsl/debye.pxd +24 -0
  330. sage/libs/gsl/dilog.pxd +14 -0
  331. sage/libs/gsl/eigen.pxd +46 -0
  332. sage/libs/gsl/elementary.pxd +12 -0
  333. sage/libs/gsl/ellint.pxd +48 -0
  334. sage/libs/gsl/elljac.pxd +8 -0
  335. sage/libs/gsl/erf.pxd +32 -0
  336. sage/libs/gsl/errno.pxd +26 -0
  337. sage/libs/gsl/exp.pxd +44 -0
  338. sage/libs/gsl/expint.pxd +44 -0
  339. sage/libs/gsl/fermi_dirac.pxd +44 -0
  340. sage/libs/gsl/fft.pxd +121 -0
  341. sage/libs/gsl/fit.pxd +50 -0
  342. sage/libs/gsl/gamma.pxd +94 -0
  343. sage/libs/gsl/gegenbauer.pxd +26 -0
  344. sage/libs/gsl/histogram.pxd +176 -0
  345. sage/libs/gsl/hyperg.pxd +52 -0
  346. sage/libs/gsl/integration.pxd +69 -0
  347. sage/libs/gsl/interp.pxd +109 -0
  348. sage/libs/gsl/laguerre.pxd +24 -0
  349. sage/libs/gsl/lambert.pxd +16 -0
  350. sage/libs/gsl/legendre.pxd +90 -0
  351. sage/libs/gsl/linalg.pxd +185 -0
  352. sage/libs/gsl/log.pxd +26 -0
  353. sage/libs/gsl/math.pxd +43 -0
  354. sage/libs/gsl/matrix.pxd +143 -0
  355. sage/libs/gsl/matrix_complex.pxd +130 -0
  356. sage/libs/gsl/min.pxd +67 -0
  357. sage/libs/gsl/monte.pxd +56 -0
  358. sage/libs/gsl/ntuple.pxd +32 -0
  359. sage/libs/gsl/odeiv.pxd +70 -0
  360. sage/libs/gsl/permutation.pxd +78 -0
  361. sage/libs/gsl/poly.pxd +40 -0
  362. sage/libs/gsl/pow_int.pxd +12 -0
  363. sage/libs/gsl/psi.pxd +28 -0
  364. sage/libs/gsl/qrng.pxd +29 -0
  365. sage/libs/gsl/random.pxd +257 -0
  366. sage/libs/gsl/rng.pxd +100 -0
  367. sage/libs/gsl/roots.pxd +72 -0
  368. sage/libs/gsl/sort.pxd +36 -0
  369. sage/libs/gsl/statistics.pxd +59 -0
  370. sage/libs/gsl/sum.pxd +55 -0
  371. sage/libs/gsl/synchrotron.pxd +16 -0
  372. sage/libs/gsl/transport.pxd +24 -0
  373. sage/libs/gsl/trig.pxd +58 -0
  374. sage/libs/gsl/types.pxd +137 -0
  375. sage/libs/gsl/vector.pxd +101 -0
  376. sage/libs/gsl/vector_complex.pxd +83 -0
  377. sage/libs/gsl/wavelet.pxd +49 -0
  378. sage/libs/gsl/zeta.pxd +28 -0
  379. sage/libs/mpc/__init__.pxd +114 -0
  380. sage/libs/mpc/types.pxd +28 -0
  381. sage/libs/mpfr/__init__.pxd +299 -0
  382. sage/libs/mpfr/types.pxd +26 -0
  383. sage/libs/mpmath/__init__.py +1 -0
  384. sage/libs/mpmath/all.py +27 -0
  385. sage/libs/mpmath/all__sagemath_modules.py +1 -0
  386. sage/libs/mpmath/utils.cpython-314-aarch64-linux-gnu.so +0 -0
  387. sage/libs/mpmath/utils.pxd +4 -0
  388. sage/libs/mpmath/utils.pyx +319 -0
  389. sage/matrix/action.cpython-314-aarch64-linux-gnu.so +0 -0
  390. sage/matrix/action.pxd +26 -0
  391. sage/matrix/action.pyx +596 -0
  392. sage/matrix/all.py +9 -0
  393. sage/matrix/args.cpython-314-aarch64-linux-gnu.so +0 -0
  394. sage/matrix/args.pxd +144 -0
  395. sage/matrix/args.pyx +1668 -0
  396. sage/matrix/benchmark.py +1258 -0
  397. sage/matrix/berlekamp_massey.py +95 -0
  398. sage/matrix/compute_J_ideal.py +926 -0
  399. sage/matrix/constructor.cpython-314-aarch64-linux-gnu.so +0 -0
  400. sage/matrix/constructor.pyx +750 -0
  401. sage/matrix/docs.py +430 -0
  402. sage/matrix/echelon_matrix.cpython-314-aarch64-linux-gnu.so +0 -0
  403. sage/matrix/echelon_matrix.pyx +155 -0
  404. sage/matrix/matrix.pxd +2 -0
  405. sage/matrix/matrix0.cpython-314-aarch64-linux-gnu.so +0 -0
  406. sage/matrix/matrix0.pxd +68 -0
  407. sage/matrix/matrix0.pyx +6324 -0
  408. sage/matrix/matrix1.cpython-314-aarch64-linux-gnu.so +0 -0
  409. sage/matrix/matrix1.pxd +8 -0
  410. sage/matrix/matrix1.pyx +2851 -0
  411. sage/matrix/matrix2.cpython-314-aarch64-linux-gnu.so +0 -0
  412. sage/matrix/matrix2.pxd +25 -0
  413. sage/matrix/matrix2.pyx +20181 -0
  414. sage/matrix/matrix_cdv.cpython-314-aarch64-linux-gnu.so +0 -0
  415. sage/matrix/matrix_cdv.pxd +4 -0
  416. sage/matrix/matrix_cdv.pyx +93 -0
  417. sage/matrix/matrix_complex_double_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  418. sage/matrix/matrix_complex_double_dense.pxd +5 -0
  419. sage/matrix/matrix_complex_double_dense.pyx +98 -0
  420. sage/matrix/matrix_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  421. sage/matrix/matrix_dense.pxd +5 -0
  422. sage/matrix/matrix_dense.pyx +343 -0
  423. sage/matrix/matrix_domain_dense.pxd +5 -0
  424. sage/matrix/matrix_domain_sparse.pxd +5 -0
  425. sage/matrix/matrix_double_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  426. sage/matrix/matrix_double_dense.pxd +7 -0
  427. sage/matrix/matrix_double_dense.pyx +3906 -0
  428. sage/matrix/matrix_double_sparse.cpython-314-aarch64-linux-gnu.so +0 -0
  429. sage/matrix/matrix_double_sparse.pxd +6 -0
  430. sage/matrix/matrix_double_sparse.pyx +248 -0
  431. sage/matrix/matrix_generic_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  432. sage/matrix/matrix_generic_dense.pxd +7 -0
  433. sage/matrix/matrix_generic_dense.pyx +354 -0
  434. sage/matrix/matrix_generic_sparse.cpython-314-aarch64-linux-gnu.so +0 -0
  435. sage/matrix/matrix_generic_sparse.pxd +7 -0
  436. sage/matrix/matrix_generic_sparse.pyx +461 -0
  437. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  438. sage/matrix/matrix_laurent_mpolynomial_dense.pxd +5 -0
  439. sage/matrix/matrix_laurent_mpolynomial_dense.pyx +115 -0
  440. sage/matrix/matrix_misc.py +313 -0
  441. sage/matrix/matrix_numpy_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  442. sage/matrix/matrix_numpy_dense.pxd +14 -0
  443. sage/matrix/matrix_numpy_dense.pyx +450 -0
  444. sage/matrix/matrix_numpy_integer_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  445. sage/matrix/matrix_numpy_integer_dense.pxd +7 -0
  446. sage/matrix/matrix_numpy_integer_dense.pyx +59 -0
  447. sage/matrix/matrix_polynomial_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  448. sage/matrix/matrix_polynomial_dense.pxd +5 -0
  449. sage/matrix/matrix_polynomial_dense.pyx +5341 -0
  450. sage/matrix/matrix_real_double_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  451. sage/matrix/matrix_real_double_dense.pxd +7 -0
  452. sage/matrix/matrix_real_double_dense.pyx +122 -0
  453. sage/matrix/matrix_space.py +2848 -0
  454. sage/matrix/matrix_sparse.cpython-314-aarch64-linux-gnu.so +0 -0
  455. sage/matrix/matrix_sparse.pxd +5 -0
  456. sage/matrix/matrix_sparse.pyx +1222 -0
  457. sage/matrix/matrix_window.cpython-314-aarch64-linux-gnu.so +0 -0
  458. sage/matrix/matrix_window.pxd +37 -0
  459. sage/matrix/matrix_window.pyx +242 -0
  460. sage/matrix/misc_mpfr.cpython-314-aarch64-linux-gnu.so +0 -0
  461. sage/matrix/misc_mpfr.pyx +80 -0
  462. sage/matrix/operation_table.py +1182 -0
  463. sage/matrix/special.py +3666 -0
  464. sage/matrix/strassen.cpython-314-aarch64-linux-gnu.so +0 -0
  465. sage/matrix/strassen.pyx +851 -0
  466. sage/matrix/symplectic_basis.py +541 -0
  467. sage/matrix/template.pxd +6 -0
  468. sage/matrix/tests.py +71 -0
  469. sage/matroids/advanced.py +77 -0
  470. sage/matroids/all.py +13 -0
  471. sage/matroids/basis_exchange_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  472. sage/matroids/basis_exchange_matroid.pxd +96 -0
  473. sage/matroids/basis_exchange_matroid.pyx +2344 -0
  474. sage/matroids/basis_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  475. sage/matroids/basis_matroid.pxd +45 -0
  476. sage/matroids/basis_matroid.pyx +1217 -0
  477. sage/matroids/catalog.py +44 -0
  478. sage/matroids/chow_ring.py +473 -0
  479. sage/matroids/chow_ring_ideal.py +849 -0
  480. sage/matroids/circuit_closures_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  481. sage/matroids/circuit_closures_matroid.pxd +16 -0
  482. sage/matroids/circuit_closures_matroid.pyx +559 -0
  483. sage/matroids/circuits_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  484. sage/matroids/circuits_matroid.pxd +38 -0
  485. sage/matroids/circuits_matroid.pyx +947 -0
  486. sage/matroids/constructor.py +1086 -0
  487. sage/matroids/database_collections.py +365 -0
  488. sage/matroids/database_matroids.py +5338 -0
  489. sage/matroids/dual_matroid.py +583 -0
  490. sage/matroids/extension.cpython-314-aarch64-linux-gnu.so +0 -0
  491. sage/matroids/extension.pxd +34 -0
  492. sage/matroids/extension.pyx +519 -0
  493. sage/matroids/flats_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  494. sage/matroids/flats_matroid.pxd +28 -0
  495. sage/matroids/flats_matroid.pyx +715 -0
  496. sage/matroids/gammoid.py +600 -0
  497. sage/matroids/graphic_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  498. sage/matroids/graphic_matroid.pxd +39 -0
  499. sage/matroids/graphic_matroid.pyx +2024 -0
  500. sage/matroids/lean_matrix.cpython-314-aarch64-linux-gnu.so +0 -0
  501. sage/matroids/lean_matrix.pxd +126 -0
  502. sage/matroids/lean_matrix.pyx +3667 -0
  503. sage/matroids/linear_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  504. sage/matroids/linear_matroid.pxd +180 -0
  505. sage/matroids/linear_matroid.pyx +6649 -0
  506. sage/matroids/matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  507. sage/matroids/matroid.pxd +243 -0
  508. sage/matroids/matroid.pyx +8759 -0
  509. sage/matroids/matroids_catalog.py +190 -0
  510. sage/matroids/matroids_plot_helpers.py +890 -0
  511. sage/matroids/minor_matroid.py +480 -0
  512. sage/matroids/minorfix.h +9 -0
  513. sage/matroids/named_matroids.py +5 -0
  514. sage/matroids/rank_matroid.py +268 -0
  515. sage/matroids/set_system.cpython-314-aarch64-linux-gnu.so +0 -0
  516. sage/matroids/set_system.pxd +38 -0
  517. sage/matroids/set_system.pyx +800 -0
  518. sage/matroids/transversal_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  519. sage/matroids/transversal_matroid.pxd +14 -0
  520. sage/matroids/transversal_matroid.pyx +893 -0
  521. sage/matroids/union_matroid.cpython-314-aarch64-linux-gnu.so +0 -0
  522. sage/matroids/union_matroid.pxd +20 -0
  523. sage/matroids/union_matroid.pyx +331 -0
  524. sage/matroids/unpickling.cpython-314-aarch64-linux-gnu.so +0 -0
  525. sage/matroids/unpickling.pyx +843 -0
  526. sage/matroids/utilities.py +809 -0
  527. sage/misc/all__sagemath_modules.py +20 -0
  528. sage/misc/c3.cpython-314-aarch64-linux-gnu.so +0 -0
  529. sage/misc/c3.pyx +238 -0
  530. sage/misc/compat.py +87 -0
  531. sage/misc/element_with_label.py +173 -0
  532. sage/misc/func_persist.py +79 -0
  533. sage/misc/pickle_old.cpython-314-aarch64-linux-gnu.so +0 -0
  534. sage/misc/pickle_old.pyx +19 -0
  535. sage/misc/proof.py +7 -0
  536. sage/misc/replace_dot_all.py +472 -0
  537. sage/misc/sagedoc_conf.py +168 -0
  538. sage/misc/sphinxify.py +167 -0
  539. sage/misc/test_class_pickling.py +85 -0
  540. sage/modules/all.py +42 -0
  541. sage/modules/complex_double_vector.py +25 -0
  542. sage/modules/diamond_cutting.py +380 -0
  543. sage/modules/fg_pid/all.py +1 -0
  544. sage/modules/fg_pid/fgp_element.py +456 -0
  545. sage/modules/fg_pid/fgp_module.py +2091 -0
  546. sage/modules/fg_pid/fgp_morphism.py +550 -0
  547. sage/modules/filtered_vector_space.py +1271 -0
  548. sage/modules/finite_submodule_iter.cpython-314-aarch64-linux-gnu.so +0 -0
  549. sage/modules/finite_submodule_iter.pxd +27 -0
  550. sage/modules/finite_submodule_iter.pyx +452 -0
  551. sage/modules/fp_graded/all.py +1 -0
  552. sage/modules/fp_graded/element.py +346 -0
  553. sage/modules/fp_graded/free_element.py +298 -0
  554. sage/modules/fp_graded/free_homspace.py +53 -0
  555. sage/modules/fp_graded/free_module.py +1060 -0
  556. sage/modules/fp_graded/free_morphism.py +217 -0
  557. sage/modules/fp_graded/homspace.py +563 -0
  558. sage/modules/fp_graded/module.py +1340 -0
  559. sage/modules/fp_graded/morphism.py +1990 -0
  560. sage/modules/fp_graded/steenrod/all.py +1 -0
  561. sage/modules/fp_graded/steenrod/homspace.py +65 -0
  562. sage/modules/fp_graded/steenrod/module.py +477 -0
  563. sage/modules/fp_graded/steenrod/morphism.py +404 -0
  564. sage/modules/fp_graded/steenrod/profile.py +241 -0
  565. sage/modules/free_module.py +8447 -0
  566. sage/modules/free_module_element.cpython-314-aarch64-linux-gnu.so +0 -0
  567. sage/modules/free_module_element.pxd +22 -0
  568. sage/modules/free_module_element.pyx +5445 -0
  569. sage/modules/free_module_homspace.py +369 -0
  570. sage/modules/free_module_integer.py +896 -0
  571. sage/modules/free_module_morphism.py +823 -0
  572. sage/modules/free_module_pseudohomspace.py +352 -0
  573. sage/modules/free_module_pseudomorphism.py +578 -0
  574. sage/modules/free_quadratic_module.py +1706 -0
  575. sage/modules/free_quadratic_module_integer_symmetric.py +1790 -0
  576. sage/modules/matrix_morphism.py +1745 -0
  577. sage/modules/misc.py +103 -0
  578. sage/modules/module_functors.py +192 -0
  579. sage/modules/multi_filtered_vector_space.py +719 -0
  580. sage/modules/ore_module.py +2208 -0
  581. sage/modules/ore_module_element.py +178 -0
  582. sage/modules/ore_module_homspace.py +147 -0
  583. sage/modules/ore_module_morphism.py +968 -0
  584. sage/modules/quotient_module.py +699 -0
  585. sage/modules/real_double_vector.py +22 -0
  586. sage/modules/submodule.py +255 -0
  587. sage/modules/tensor_operations.py +567 -0
  588. sage/modules/torsion_quadratic_module.py +1352 -0
  589. sage/modules/tutorial_free_modules.py +248 -0
  590. sage/modules/vector_complex_double_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  591. sage/modules/vector_complex_double_dense.pxd +6 -0
  592. sage/modules/vector_complex_double_dense.pyx +117 -0
  593. sage/modules/vector_double_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  594. sage/modules/vector_double_dense.pxd +6 -0
  595. sage/modules/vector_double_dense.pyx +604 -0
  596. sage/modules/vector_integer_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  597. sage/modules/vector_integer_dense.pxd +15 -0
  598. sage/modules/vector_integer_dense.pyx +361 -0
  599. sage/modules/vector_integer_sparse.cpython-314-aarch64-linux-gnu.so +0 -0
  600. sage/modules/vector_integer_sparse.pxd +29 -0
  601. sage/modules/vector_integer_sparse.pyx +406 -0
  602. sage/modules/vector_modn_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  603. sage/modules/vector_modn_dense.pxd +12 -0
  604. sage/modules/vector_modn_dense.pyx +394 -0
  605. sage/modules/vector_modn_sparse.cpython-314-aarch64-linux-gnu.so +0 -0
  606. sage/modules/vector_modn_sparse.pxd +21 -0
  607. sage/modules/vector_modn_sparse.pyx +298 -0
  608. sage/modules/vector_numpy_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  609. sage/modules/vector_numpy_dense.pxd +15 -0
  610. sage/modules/vector_numpy_dense.pyx +304 -0
  611. sage/modules/vector_numpy_integer_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  612. sage/modules/vector_numpy_integer_dense.pxd +7 -0
  613. sage/modules/vector_numpy_integer_dense.pyx +54 -0
  614. sage/modules/vector_rational_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  615. sage/modules/vector_rational_dense.pxd +15 -0
  616. sage/modules/vector_rational_dense.pyx +387 -0
  617. sage/modules/vector_rational_sparse.cpython-314-aarch64-linux-gnu.so +0 -0
  618. sage/modules/vector_rational_sparse.pxd +30 -0
  619. sage/modules/vector_rational_sparse.pyx +413 -0
  620. sage/modules/vector_real_double_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  621. sage/modules/vector_real_double_dense.pxd +6 -0
  622. sage/modules/vector_real_double_dense.pyx +126 -0
  623. sage/modules/vector_space_homspace.py +430 -0
  624. sage/modules/vector_space_morphism.py +989 -0
  625. sage/modules/with_basis/all.py +15 -0
  626. sage/modules/with_basis/cell_module.py +494 -0
  627. sage/modules/with_basis/indexed_element.cpython-314-aarch64-linux-gnu.so +0 -0
  628. sage/modules/with_basis/indexed_element.pxd +13 -0
  629. sage/modules/with_basis/indexed_element.pyx +1058 -0
  630. sage/modules/with_basis/invariant.py +1075 -0
  631. sage/modules/with_basis/morphism.py +1636 -0
  632. sage/modules/with_basis/representation.py +2939 -0
  633. sage/modules/with_basis/subquotient.py +685 -0
  634. sage/numerical/all__sagemath_modules.py +6 -0
  635. sage/numerical/gauss_legendre.cpython-314-aarch64-linux-gnu.so +0 -0
  636. sage/numerical/gauss_legendre.pyx +381 -0
  637. sage/numerical/optimize.py +910 -0
  638. sage/probability/all.py +10 -0
  639. sage/probability/probability_distribution.cpython-314-aarch64-linux-gnu.so +0 -0
  640. sage/probability/probability_distribution.pyx +1242 -0
  641. sage/probability/random_variable.py +411 -0
  642. sage/quadratic_forms/all.py +4 -0
  643. sage/quadratic_forms/all__sagemath_modules.py +15 -0
  644. sage/quadratic_forms/binary_qf.py +2042 -0
  645. sage/quadratic_forms/bqf_class_group.py +748 -0
  646. sage/quadratic_forms/constructions.py +93 -0
  647. sage/quadratic_forms/count_local_2.cpython-314-aarch64-linux-gnu.so +0 -0
  648. sage/quadratic_forms/count_local_2.pyx +365 -0
  649. sage/quadratic_forms/extras.py +195 -0
  650. sage/quadratic_forms/quadratic_form.py +1753 -0
  651. sage/quadratic_forms/quadratic_form__count_local_2.py +221 -0
  652. sage/quadratic_forms/quadratic_form__equivalence_testing.py +708 -0
  653. sage/quadratic_forms/quadratic_form__evaluate.cpython-314-aarch64-linux-gnu.so +0 -0
  654. sage/quadratic_forms/quadratic_form__evaluate.pyx +139 -0
  655. sage/quadratic_forms/quadratic_form__local_density_congruence.py +977 -0
  656. sage/quadratic_forms/quadratic_form__local_field_invariants.py +1072 -0
  657. sage/quadratic_forms/quadratic_form__neighbors.py +424 -0
  658. sage/quadratic_forms/quadratic_form__reduction_theory.py +488 -0
  659. sage/quadratic_forms/quadratic_form__split_local_covering.py +416 -0
  660. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +657 -0
  661. sage/quadratic_forms/quadratic_form__theta.py +352 -0
  662. sage/quadratic_forms/quadratic_form__variable_substitutions.py +370 -0
  663. sage/quadratic_forms/random_quadraticform.py +209 -0
  664. sage/quadratic_forms/ternary.cpython-314-aarch64-linux-gnu.so +0 -0
  665. sage/quadratic_forms/ternary.pyx +1154 -0
  666. sage/quadratic_forms/ternary_qf.py +2027 -0
  667. sage/rings/all__sagemath_modules.py +28 -0
  668. sage/rings/asymptotic/all__sagemath_modules.py +1 -0
  669. sage/rings/asymptotic/misc.py +1252 -0
  670. sage/rings/cc.py +4 -0
  671. sage/rings/cfinite_sequence.py +1306 -0
  672. sage/rings/complex_conversion.cpython-314-aarch64-linux-gnu.so +0 -0
  673. sage/rings/complex_conversion.pxd +8 -0
  674. sage/rings/complex_conversion.pyx +23 -0
  675. sage/rings/complex_double.cpython-314-aarch64-linux-gnu.so +0 -0
  676. sage/rings/complex_double.pxd +21 -0
  677. sage/rings/complex_double.pyx +2654 -0
  678. sage/rings/complex_mpc.cpython-314-aarch64-linux-gnu.so +0 -0
  679. sage/rings/complex_mpc.pxd +21 -0
  680. sage/rings/complex_mpc.pyx +2576 -0
  681. sage/rings/complex_mpfr.cpython-314-aarch64-linux-gnu.so +0 -0
  682. sage/rings/complex_mpfr.pxd +18 -0
  683. sage/rings/complex_mpfr.pyx +3602 -0
  684. sage/rings/derivation.py +2334 -0
  685. sage/rings/finite_rings/all__sagemath_modules.py +1 -0
  686. sage/rings/finite_rings/maps_finite_field.py +191 -0
  687. sage/rings/function_field/all__sagemath_modules.py +8 -0
  688. sage/rings/function_field/derivations.py +102 -0
  689. sage/rings/function_field/derivations_rational.py +132 -0
  690. sage/rings/function_field/differential.py +853 -0
  691. sage/rings/function_field/divisor.py +1107 -0
  692. sage/rings/function_field/drinfeld_modules/action.py +199 -0
  693. sage/rings/function_field/drinfeld_modules/all.py +1 -0
  694. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +673 -0
  695. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +2087 -0
  696. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1131 -0
  697. sage/rings/function_field/drinfeld_modules/homset.py +420 -0
  698. sage/rings/function_field/drinfeld_modules/morphism.py +820 -0
  699. sage/rings/function_field/hermite_form_polynomial.cpython-314-aarch64-linux-gnu.so +0 -0
  700. sage/rings/function_field/hermite_form_polynomial.pyx +188 -0
  701. sage/rings/function_field/khuri_makdisi.cpython-314-aarch64-linux-gnu.so +0 -0
  702. sage/rings/function_field/khuri_makdisi.pyx +935 -0
  703. sage/rings/invariants/all.py +4 -0
  704. sage/rings/invariants/invariant_theory.py +4597 -0
  705. sage/rings/invariants/reconstruction.py +395 -0
  706. sage/rings/polynomial/all__sagemath_modules.py +17 -0
  707. sage/rings/polynomial/integer_valued_polynomials.py +1230 -0
  708. sage/rings/polynomial/laurent_polynomial_mpair.cpython-314-aarch64-linux-gnu.so +0 -0
  709. sage/rings/polynomial/laurent_polynomial_mpair.pxd +15 -0
  710. sage/rings/polynomial/laurent_polynomial_mpair.pyx +2023 -0
  711. sage/rings/polynomial/ore_function_element.py +952 -0
  712. sage/rings/polynomial/ore_function_field.py +1028 -0
  713. sage/rings/polynomial/ore_polynomial_element.cpython-314-aarch64-linux-gnu.so +0 -0
  714. sage/rings/polynomial/ore_polynomial_element.pxd +48 -0
  715. sage/rings/polynomial/ore_polynomial_element.pyx +3145 -0
  716. sage/rings/polynomial/ore_polynomial_ring.py +1334 -0
  717. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  718. sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +788 -0
  719. sage/rings/polynomial/q_integer_valued_polynomials.py +1264 -0
  720. sage/rings/polynomial/skew_polynomial_element.cpython-314-aarch64-linux-gnu.so +0 -0
  721. sage/rings/polynomial/skew_polynomial_element.pxd +9 -0
  722. sage/rings/polynomial/skew_polynomial_element.pyx +684 -0
  723. sage/rings/polynomial/skew_polynomial_finite_field.cpython-314-aarch64-linux-gnu.so +0 -0
  724. sage/rings/polynomial/skew_polynomial_finite_field.pxd +19 -0
  725. sage/rings/polynomial/skew_polynomial_finite_field.pyx +1093 -0
  726. sage/rings/polynomial/skew_polynomial_finite_order.cpython-314-aarch64-linux-gnu.so +0 -0
  727. sage/rings/polynomial/skew_polynomial_finite_order.pxd +10 -0
  728. sage/rings/polynomial/skew_polynomial_finite_order.pyx +567 -0
  729. sage/rings/polynomial/skew_polynomial_ring.py +908 -0
  730. sage/rings/real_double_element_gsl.cpython-314-aarch64-linux-gnu.so +0 -0
  731. sage/rings/real_double_element_gsl.pxd +8 -0
  732. sage/rings/real_double_element_gsl.pyx +794 -0
  733. sage/rings/real_field.py +58 -0
  734. sage/rings/real_mpfr.cpython-314-aarch64-linux-gnu.so +0 -0
  735. sage/rings/real_mpfr.pxd +29 -0
  736. sage/rings/real_mpfr.pyx +6122 -0
  737. sage/rings/ring_extension.cpython-314-aarch64-linux-gnu.so +0 -0
  738. sage/rings/ring_extension.pxd +42 -0
  739. sage/rings/ring_extension.pyx +2779 -0
  740. sage/rings/ring_extension_conversion.cpython-314-aarch64-linux-gnu.so +0 -0
  741. sage/rings/ring_extension_conversion.pxd +16 -0
  742. sage/rings/ring_extension_conversion.pyx +462 -0
  743. sage/rings/ring_extension_element.cpython-314-aarch64-linux-gnu.so +0 -0
  744. sage/rings/ring_extension_element.pxd +21 -0
  745. sage/rings/ring_extension_element.pyx +1635 -0
  746. sage/rings/ring_extension_homset.py +64 -0
  747. sage/rings/ring_extension_morphism.cpython-314-aarch64-linux-gnu.so +0 -0
  748. sage/rings/ring_extension_morphism.pxd +35 -0
  749. sage/rings/ring_extension_morphism.pyx +920 -0
  750. sage/schemes/all__sagemath_modules.py +1 -0
  751. sage/schemes/projective/all__sagemath_modules.py +1 -0
  752. sage/schemes/projective/coherent_sheaf.py +300 -0
  753. sage/schemes/projective/cohomology.py +510 -0
  754. sage/stats/all.py +15 -0
  755. sage/stats/basic_stats.py +489 -0
  756. sage/stats/distributions/all.py +7 -0
  757. sage/stats/distributions/catalog.py +34 -0
  758. sage/stats/distributions/dgs.h +50 -0
  759. sage/stats/distributions/dgs.pxd +111 -0
  760. sage/stats/distributions/dgs_bern.h +400 -0
  761. sage/stats/distributions/dgs_gauss.h +614 -0
  762. sage/stats/distributions/dgs_misc.h +104 -0
  763. sage/stats/distributions/discrete_gaussian_integer.cpython-314-aarch64-linux-gnu.so +0 -0
  764. sage/stats/distributions/discrete_gaussian_integer.pxd +14 -0
  765. sage/stats/distributions/discrete_gaussian_integer.pyx +498 -0
  766. sage/stats/distributions/discrete_gaussian_lattice.py +908 -0
  767. sage/stats/distributions/discrete_gaussian_polynomial.py +141 -0
  768. sage/stats/hmm/all.py +15 -0
  769. sage/stats/hmm/chmm.cpython-314-aarch64-linux-gnu.so +0 -0
  770. sage/stats/hmm/chmm.pyx +1595 -0
  771. sage/stats/hmm/distributions.cpython-314-aarch64-linux-gnu.so +0 -0
  772. sage/stats/hmm/distributions.pxd +29 -0
  773. sage/stats/hmm/distributions.pyx +531 -0
  774. sage/stats/hmm/hmm.cpython-314-aarch64-linux-gnu.so +0 -0
  775. sage/stats/hmm/hmm.pxd +17 -0
  776. sage/stats/hmm/hmm.pyx +1388 -0
  777. sage/stats/hmm/util.cpython-314-aarch64-linux-gnu.so +0 -0
  778. sage/stats/hmm/util.pxd +7 -0
  779. sage/stats/hmm/util.pyx +165 -0
  780. sage/stats/intlist.cpython-314-aarch64-linux-gnu.so +0 -0
  781. sage/stats/intlist.pxd +14 -0
  782. sage/stats/intlist.pyx +588 -0
  783. sage/stats/r.py +49 -0
  784. sage/stats/time_series.cpython-314-aarch64-linux-gnu.so +0 -0
  785. sage/stats/time_series.pxd +6 -0
  786. sage/stats/time_series.pyx +2546 -0
  787. sage/tensor/all.py +2 -0
  788. sage/tensor/modules/all.py +8 -0
  789. sage/tensor/modules/alternating_contr_tensor.py +761 -0
  790. sage/tensor/modules/comp.py +5598 -0
  791. sage/tensor/modules/ext_pow_free_module.py +824 -0
  792. sage/tensor/modules/finite_rank_free_module.py +3589 -0
  793. sage/tensor/modules/format_utilities.py +333 -0
  794. sage/tensor/modules/free_module_alt_form.py +858 -0
  795. sage/tensor/modules/free_module_automorphism.py +1207 -0
  796. sage/tensor/modules/free_module_basis.py +1074 -0
  797. sage/tensor/modules/free_module_element.py +284 -0
  798. sage/tensor/modules/free_module_homset.py +652 -0
  799. sage/tensor/modules/free_module_linear_group.py +564 -0
  800. sage/tensor/modules/free_module_morphism.py +1581 -0
  801. sage/tensor/modules/free_module_tensor.py +3289 -0
  802. sage/tensor/modules/reflexive_module.py +386 -0
  803. sage/tensor/modules/tensor_free_module.py +780 -0
  804. sage/tensor/modules/tensor_free_submodule.py +538 -0
  805. sage/tensor/modules/tensor_free_submodule_basis.py +140 -0
  806. sage/tensor/modules/tensor_with_indices.py +1043 -0
@@ -0,0 +1,1213 @@
1
+ # sage_setup: distribution = sagemath-modules
2
+ # sage.doctest: needs sage.graphs sage.groups
3
+ """
4
+ Affine Lie Algebras
5
+
6
+ AUTHORS:
7
+
8
+ - Travis Scrimshaw (2013-05-03): Initial version
9
+ """
10
+
11
+ #*****************************************************************************
12
+ # Copyright (C) 2013-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.misc.lazy_attribute import lazy_attribute
23
+ from sage.structure.element import parent
24
+ from sage.categories.kac_moody_algebras import KacMoodyAlgebras
25
+
26
+ from sage.algebras.lie_algebras.lie_algebra import LieAlgebra, FinitelyGeneratedLieAlgebra
27
+ from sage.algebras.lie_algebras.lie_algebra_element import UntwistedAffineLieAlgebraElement
28
+ from sage.combinat.root_system.cartan_type import CartanType
29
+ from sage.categories.cartesian_product import cartesian_product
30
+ from sage.rings.integer_ring import ZZ
31
+ from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets
32
+ from sage.sets.family import Family
33
+ from sage.structure.unique_representation import UniqueRepresentation
34
+ from sage.structure.parent import Set_generic
35
+
36
+
37
+ class AffineLieAlgebra(FinitelyGeneratedLieAlgebra):
38
+ r"""
39
+ An (untwisted) affine Lie algebra.
40
+
41
+ Note that the derived subalgebra of the Kac-Moody algebra is the
42
+ affine Lie algebra.
43
+
44
+ INPUT:
45
+
46
+ Can be one of the following:
47
+
48
+ - a base ring and an affine Cartan type: constructs the affine
49
+ (Kac-Moody) Lie algebra of the classical Lie algebra in the
50
+ bracket representation over the base ring
51
+
52
+ - a classical Lie algebra: constructs the corresponding affine
53
+ (Kac-Moody) Lie algebra
54
+
55
+ There is the optional argument ``kac_moody``, which can be set
56
+ to ``False`` to obtain the affine Lie algebra instead of the affine
57
+ Kac-Moody algebra.
58
+
59
+ .. SEEALSO::
60
+
61
+ - :class:`UntwistedAffineLieAlgebra`
62
+ - :class:`TwistedAffineLieAlgebra`
63
+
64
+ REFERENCES:
65
+
66
+ - [Ka1990]_
67
+ """
68
+ @staticmethod
69
+ def __classcall_private__(cls, arg0, cartan_type=None, kac_moody=True):
70
+ """
71
+ Parse input to ensure a unique representation.
72
+
73
+ INPUT:
74
+
75
+ - ``arg0`` -- a simple Lie algebra or a base ring
76
+ - ``cartan_type`` -- a Cartan type
77
+
78
+ EXAMPLES::
79
+
80
+ sage: L1 = lie_algebras.Affine(QQ, ['A', 4, 1])
81
+ sage: cl = lie_algebras.sl(QQ, 5)
82
+ sage: L2 = lie_algebras.Affine(cl)
83
+ sage: L1 is L2
84
+ True
85
+ sage: cl.affine() is L1
86
+ True
87
+
88
+ sage: L1 = LieAlgebra(QQ, cartan_type=['A', 5, 2])
89
+ sage: L2 = lie_algebras.Affine(QQ, ['A', 5, 2])
90
+ sage: L1 is L2
91
+ True
92
+ """
93
+ if isinstance(arg0, LieAlgebra):
94
+ ct = arg0.cartan_type()
95
+ if not ct.is_finite():
96
+ raise ValueError("the base Lie algebra is not simple")
97
+ cartan_type = ct.affine()
98
+ g = arg0
99
+ else:
100
+ # arg0 is the base ring
101
+ cartan_type = CartanType(cartan_type)
102
+ if not cartan_type.is_affine():
103
+ raise ValueError("the Cartan type must be affine")
104
+ if cartan_type.is_untwisted_affine():
105
+ g = LieAlgebra(arg0, cartan_type=cartan_type.classical())
106
+
107
+ if cartan_type.is_untwisted_affine():
108
+ return UntwistedAffineLieAlgebra(g, kac_moody=kac_moody)
109
+ return TwistedAffineLieAlgebra(arg0, cartan_type, kac_moody=kac_moody)
110
+
111
+ def __init__(self, g, cartan_type, names, kac_moody):
112
+ """
113
+ Initialize ``self``.
114
+
115
+ EXAMPLES::
116
+
117
+ sage: asl = lie_algebras.Affine(QQ, ['D', 4, 1])
118
+ sage: TestSuite(asl).run()
119
+ """
120
+ self._g = g
121
+ self._cartan_type = cartan_type
122
+
123
+ if kac_moody:
124
+ names += ['d']
125
+ self._kac_moody = kac_moody
126
+
127
+ names = tuple(names)
128
+ self._ordered_indices = names
129
+ R = g.base_ring()
130
+ cat = KacMoodyAlgebras(R).WithBasis()
131
+ if not self._cartan_type.is_untwisted_affine():
132
+ cat = cat.Subobjects()
133
+ FinitelyGeneratedLieAlgebra.__init__(self, R, names, names, category=cat)
134
+
135
+ @cached_method
136
+ def basis(self):
137
+ r"""
138
+ Return the basis of ``self``.
139
+
140
+ EXAMPLES::
141
+
142
+ sage: g = LieAlgebra(QQ, cartan_type=['D', 4, 1])
143
+ sage: B = g.basis()
144
+ sage: al = RootSystem(['D',4]).root_lattice().simple_roots()
145
+ sage: B[al[1]+al[2]+al[4],4]
146
+ (E[alpha[1] + alpha[2] + alpha[4]])#t^4
147
+ sage: B[-al[1]-2*al[2]-al[3]-al[4],2]
148
+ (E[-alpha[1] - 2*alpha[2] - alpha[3] - alpha[4]])#t^2
149
+ sage: B[al[4],-2]
150
+ (E[alpha[4]])#t^-2
151
+ sage: B['c']
152
+ c
153
+ sage: B['d']
154
+ d
155
+
156
+ sage: g = LieAlgebra(QQ, cartan_type=['D', 4, 2], kac_moody=False)
157
+ sage: B = g.basis()
158
+ sage: it = iter(B)
159
+ sage: [next(it) for _ in range(3)]
160
+ [c, (E[alpha[1]])#t^0, (E[alpha[2]])#t^0]
161
+ sage: B['c']
162
+ c
163
+ sage: B['d']
164
+ 0
165
+ """
166
+ if self._cartan_type.is_untwisted_affine():
167
+ K = cartesian_product([self._g.basis().keys(), ZZ])
168
+ else:
169
+ K = TwistedAffineIndices(self._cartan_type)
170
+ from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
171
+ c = FiniteEnumeratedSet(['c'])
172
+ if self._kac_moody:
173
+ d = FiniteEnumeratedSet(['d'])
174
+ keys = DisjointUnionEnumeratedSets([c, d, K])
175
+ else:
176
+ keys = DisjointUnionEnumeratedSets([c, K])
177
+ return Family(keys, self.monomial)
178
+
179
+ def _element_constructor_(self, x):
180
+ r"""
181
+ Construct an element of ``self`` from ``x``.
182
+
183
+ EXAMPLES::
184
+
185
+ sage: g = LieAlgebra(QQ, cartan_type=['A',1])
186
+ sage: A = g.affine()
187
+ sage: D = A.derived_subalgebra()
188
+ sage: A(D.an_element())
189
+ (E[alpha[1]] + h1 + E[-alpha[1]])#t^0
190
+ + (E[-alpha[1]])#t^1 + (E[alpha[1]])#t^-1 + c
191
+ sage: A(g.an_element())
192
+ (E[alpha[1]] + h1 + E[-alpha[1]])#t^0
193
+ """
194
+ P = parent(x)
195
+ if P is self.derived_subalgebra():
196
+ return self.element_class(self, x.t_dict(), x.c_coefficient(),
197
+ x.d_coefficient())
198
+ if P == self._g:
199
+ zero = self.base_ring().zero()
200
+ return self.element_class(self, {0: x}, zero, zero)
201
+ return super()._element_constructor_(x)
202
+
203
+ def _coerce_map_from_(self, R):
204
+ """
205
+ Return the coerce map from ``R`` to ``self`` or ``True`` if
206
+ a coerce map exists.
207
+
208
+ EXAMPLES::
209
+
210
+ sage: g = LieAlgebra(QQ, cartan_type=['G',2])
211
+ sage: A = g.affine()
212
+ sage: A.has_coerce_map_from(g)
213
+ True
214
+ sage: D = A.derived_subalgebra()
215
+ sage: A.has_coerce_map_from(D)
216
+ True
217
+ """
218
+ if R is self.derived_subalgebra() or R is self._g:
219
+ return True
220
+ return super()._coerce_map_from_(R)
221
+
222
+ def derived_series(self):
223
+ """
224
+ Return the derived series of ``self``.
225
+
226
+ EXAMPLES::
227
+
228
+ sage: g = LieAlgebra(QQ, cartan_type=['B',3,1])
229
+ sage: g.derived_series()
230
+ [Affine Kac-Moody algebra of ['B', 3] in the Chevalley basis,
231
+ Affine Lie algebra of ['B', 3] in the Chevalley basis]
232
+ sage: g.lower_central_series()
233
+ [Affine Kac-Moody algebra of ['B', 3] in the Chevalley basis,
234
+ Affine Lie algebra of ['B', 3] in the Chevalley basis]
235
+
236
+ sage: D = g.derived_subalgebra()
237
+ sage: D.derived_series()
238
+ [Affine Lie algebra of ['B', 3] in the Chevalley basis]
239
+ """
240
+ if self._kac_moody:
241
+ return [self, self.derived_subalgebra()]
242
+ return [self]
243
+
244
+ lower_central_series = derived_series
245
+
246
+ def is_nilpotent(self):
247
+ """
248
+ Return ``False`` as ``self`` is semisimple.
249
+
250
+ EXAMPLES::
251
+
252
+ sage: g = LieAlgebra(QQ, cartan_type=['B',3,1])
253
+ sage: g.is_nilpotent()
254
+ False
255
+ sage: g.is_solvable()
256
+ False
257
+ """
258
+ return False
259
+
260
+ is_solvable = is_nilpotent
261
+
262
+ def cartan_type(self):
263
+ """
264
+ Return the Cartan type of ``self``.
265
+
266
+ EXAMPLES::
267
+
268
+ sage: g = LieAlgebra(QQ, cartan_type=['C',3,1])
269
+ sage: g.cartan_type()
270
+ ['C', 3, 1]
271
+ """
272
+ return self._cartan_type
273
+
274
+ def classical(self):
275
+ r"""
276
+ Return the classical Lie algebra of ``self``.
277
+
278
+ EXAMPLES::
279
+
280
+ sage: g = LieAlgebra(QQ, cartan_type=['F',4,1])
281
+ sage: g.classical()
282
+ Lie algebra of ['F', 4] in the Chevalley basis
283
+
284
+ sage: so5 = lie_algebras.so(QQ, 5, 'matrix')
285
+ sage: A = so5.affine()
286
+ sage: A.classical() == so5
287
+ True
288
+ """
289
+ return self._g
290
+
291
+ @cached_method
292
+ def zero(self):
293
+ r"""
294
+ Return the element `0`.
295
+
296
+ EXAMPLES::
297
+
298
+ sage: g = LieAlgebra(QQ, cartan_type=['F',4,1])
299
+ sage: g.zero()
300
+ 0
301
+ """
302
+ zero = self.base_ring().zero()
303
+ return self.element_class(self, {}, zero, zero)
304
+
305
+ @cached_method
306
+ def c(self):
307
+ r"""
308
+ Return the canonical central element `c` of ``self``.
309
+
310
+ EXAMPLES::
311
+
312
+ sage: g = LieAlgebra(QQ, cartan_type=['A',3,1])
313
+ sage: g.c()
314
+ c
315
+ """
316
+ R = self.base_ring()
317
+ return self.element_class(self, {}, R.one(), R.zero())
318
+
319
+ @cached_method
320
+ def d(self):
321
+ r"""
322
+ Return the canonical derivation `d` of ``self``.
323
+
324
+ If ``self`` is the affine Lie algebra, then this returns `0`.
325
+
326
+ EXAMPLES::
327
+
328
+ sage: g = LieAlgebra(QQ, cartan_type=['A',3,1])
329
+ sage: g.d()
330
+ d
331
+ sage: D = g.derived_subalgebra()
332
+ sage: D.d()
333
+ 0
334
+ """
335
+ if not self._kac_moody:
336
+ return self.zero()
337
+ R = self.base_ring()
338
+ return self.element_class(self, {}, R.zero(), R.one())
339
+
340
+ @cached_method
341
+ def lie_algebra_generators(self):
342
+ r"""
343
+ Return the Lie algebra generators of ``self``.
344
+
345
+ EXAMPLES::
346
+
347
+ sage: g = LieAlgebra(QQ, cartan_type=['A',1,1])
348
+ sage: list(g.lie_algebra_generators())
349
+ [(E[alpha[1]])#t^0,
350
+ (E[-alpha[1]])#t^0,
351
+ (h1)#t^0,
352
+ (E[-alpha[1]])#t^1,
353
+ (E[alpha[1]])#t^-1,
354
+ c,
355
+ d]
356
+
357
+ sage: L = LieAlgebra(QQ, cartan_type=['A',5,2])
358
+ sage: list(L.lie_algebra_generators())
359
+ [(E[alpha[1]])#t^0,
360
+ (E[alpha[2]])#t^0,
361
+ (E[alpha[3]])#t^0,
362
+ (E[-alpha[1]])#t^0,
363
+ (E[-alpha[2]])#t^0,
364
+ (E[-alpha[3]])#t^0,
365
+ (h1)#t^0,
366
+ (h2)#t^0,
367
+ (h3)#t^0,
368
+ (E[-alpha[1] - 2*alpha[2] - alpha[3]])#t^1,
369
+ (E[alpha[1] + 2*alpha[2] + alpha[3]])#t^-1,
370
+ c,
371
+ d]
372
+ """
373
+ zero = self.base_ring().zero()
374
+ d = {}
375
+ if self._kac_moody:
376
+ d['d'] = self.d()
377
+ d['c'] = self.c()
378
+
379
+ try:
380
+ finite_gens = dict(self._g.lie_algebra_generators(True))
381
+ except TypeError:
382
+ finite_gens = dict(self._g.lie_algebra_generators())
383
+ for k, g in finite_gens.items():
384
+ d[k] = self.element_class(self, {0: g}, zero, zero)
385
+
386
+ if self._cartan_type.is_untwisted_affine():
387
+ # e_0 = f_{\theta} t
388
+ d['e0'] = self.element_class(self, {1: self._g.highest_root_basis_elt(False)},
389
+ zero, zero)
390
+ # f_0 = e_{\theta} t^-1
391
+ d['f0'] = self.element_class(self, {-1: self._g.highest_root_basis_elt(True)},
392
+ zero, zero)
393
+ elif self._cartan_type.type() != 'BC':
394
+ a = self._cartan_type.a()
395
+ Q = self._g._Q
396
+ theta = Q._from_dict({i: a[i] for i in Q.index_set()}, remove_zeros=False)
397
+ # e_0 = f_{\theta} t
398
+ d['e0'] = self.element_class(self, {1: self._g.basis()[-theta]},
399
+ zero, zero)
400
+ # f_0 = e_{\theta} t^-1
401
+ d['f0'] = self.element_class(self, {-1: self._g.basis()[theta]},
402
+ zero, zero)
403
+ else:
404
+ n = self._g.cartan_type().rank()
405
+ a = self._cartan_type.a()
406
+ Q = self._g._Q
407
+ theta = Q._from_dict({i: ZZ(2) for i in Q.index_set()}, remove_zeros=False)
408
+ # e_0 = f_{\theta} t
409
+ d[f'e{n}'] = self.element_class(self, {1: self._g1.basis()[-theta]},
410
+ zero, zero)
411
+ # f_0 = e_{\theta} t^-1
412
+ d[f'f{n}'] = self.element_class(self, {-1: self._g1.basis()[theta]},
413
+ zero, zero)
414
+
415
+ return Family(self.variable_names(), d.__getitem__)
416
+
417
+ def e(self, i=None):
418
+ """
419
+ Return the generators `e` of ``self``.
420
+
421
+ INPUT:
422
+
423
+ - ``i`` -- (optional) if specified, return just the
424
+ generator `e_i`
425
+
426
+ EXAMPLES::
427
+
428
+ sage: g = LieAlgebra(QQ, cartan_type=['B', 3, 1])
429
+ sage: list(g.e())
430
+ [(E[-alpha[1] - 2*alpha[2] - 2*alpha[3]])#t^1,
431
+ (E[alpha[1]])#t^0, (E[alpha[2]])#t^0, (E[alpha[3]])#t^0]
432
+ sage: g.e(2)
433
+ (E[alpha[2]])#t^0
434
+ """
435
+ gens = self.lie_algebra_generators()
436
+ if i is None:
437
+ I = self._cartan_type.index_set()
438
+ d = {j: gens[f'e{j}'] for j in I}
439
+ return Family(I, d.__getitem__)
440
+ return gens[f'e{i}']
441
+
442
+ def f(self, i=None):
443
+ """
444
+ Return the generators `f` of ``self``.
445
+
446
+ INPUT:
447
+
448
+ - ``i`` -- (optional) if specified, return just the
449
+ generator `f_i`
450
+
451
+ EXAMPLES::
452
+
453
+ sage: g = LieAlgebra(QQ, cartan_type=['A', 5, 2])
454
+ sage: list(g.f())
455
+ [(E[alpha[1] + 2*alpha[2] + alpha[3]])#t^-1,
456
+ (E[-alpha[1]])#t^0, (E[-alpha[2]])#t^0, (E[-alpha[3]])#t^0]
457
+ sage: g.f(2)
458
+ (E[-alpha[2]])#t^0
459
+ """
460
+ gens = self.lie_algebra_generators()
461
+ if i is None:
462
+ I = self._cartan_type.index_set()
463
+ d = {j: gens[f'f{j}'] for j in I}
464
+ return Family(I, d.__getitem__)
465
+ return gens[f'f{i}']
466
+
467
+ def monomial(self, m):
468
+ r"""
469
+ Construct the monomial indexed by ``m``.
470
+
471
+ EXAMPLES::
472
+
473
+ sage: g = LieAlgebra(QQ, cartan_type=['B',4,1])
474
+ sage: al = RootSystem(['B',4]).root_lattice().simple_roots()
475
+ sage: g.monomial((al[1]+al[2]+al[3],4))
476
+ (E[alpha[1] + alpha[2] + alpha[3]])#t^4
477
+ sage: g.monomial((-al[1]-al[2]-2*al[3]-2*al[4],2))
478
+ (E[-alpha[1] - alpha[2] - 2*alpha[3] - 2*alpha[4]])#t^2
479
+ sage: g.monomial((al[4],-2))
480
+ (E[alpha[4]])#t^-2
481
+ sage: g.monomial('c')
482
+ c
483
+ sage: g.monomial('d')
484
+ d
485
+ """
486
+ if m == 'c':
487
+ return self.c()
488
+ if m == 'd':
489
+ return self.d()
490
+ G = self._g.basis()
491
+ zero = self.base_ring().zero()
492
+ return self.element_class(self, {m[1]: G[m[0]]}, zero, zero)
493
+
494
+
495
+ class UntwistedAffineLieAlgebra(AffineLieAlgebra):
496
+ r"""
497
+ An untwisted affine Lie algebra.
498
+
499
+ Let `R` be a ring. Given a finite-dimensional simple Lie algebra
500
+ `\mathfrak{g}` over `R`, the affine Lie algebra
501
+ `\widehat{\mathfrak{g}}^{\prime}` associated to `\mathfrak{g}` is
502
+ defined as
503
+
504
+ .. MATH::
505
+
506
+ \widehat{\mathfrak{g}}' = \bigl( \mathfrak{g} \otimes
507
+ R[t, t^{-1}] \bigr) \oplus R c,
508
+
509
+ where `c` is the canonical central element and `R[t, t^{-1}]` is the
510
+ Laurent polynomial ring over `R`. The Lie bracket is defined as
511
+
512
+ .. MATH::
513
+
514
+ [x \otimes t^m + \lambda c, y \otimes t^n + \mu c] =
515
+ [x, y] \otimes t^{m+n} + m \delta_{m,-n} ( x | y ) c,
516
+
517
+ where `( x | y )` is the Killing form on `\mathfrak{g}`.
518
+
519
+ There is a canonical derivation `d` on `\widehat{\mathfrak{g}}'`
520
+ that is defined by
521
+
522
+ .. MATH::
523
+
524
+ d(x \otimes t^m + \lambda c) = a \otimes m t^m,
525
+
526
+ or equivalently by `d = t \frac{d}{dt}`.
527
+
528
+ The affine Kac-Moody algebra `\widehat{\mathfrak{g}}` is formed by
529
+ adjoining the derivation `d` such that
530
+
531
+ .. MATH::
532
+
533
+ \widehat{\mathfrak{g}} = \bigl( \mathfrak{g} \otimes R[t,t^{-1}]
534
+ \bigr) \oplus R c \oplus R d.
535
+
536
+ Specifically, the bracket on `\widehat{\mathfrak{g}}` is defined as
537
+
538
+ .. MATH::
539
+
540
+ [t^m \otimes x \oplus \lambda c \oplus \mu d, t^n \otimes y \oplus
541
+ \lambda_1 c \oplus \mu_1 d] = \bigl( t^{m+n} [x,y] + \mu n t^n \otimes
542
+ y - \mu_1 m t^m \otimes x\bigr) \oplus m \delta_{m,-n} (x|y) c .
543
+
544
+ EXAMPLES:
545
+
546
+ We begin by constructing an affine Kac-Moody algebra of type `G_2^{(1)}`
547
+ from the classical Lie algebra of type `G_2`::
548
+
549
+ sage: g = LieAlgebra(QQ, cartan_type=['G',2])
550
+ sage: A = g.affine()
551
+ sage: A
552
+ Affine Kac-Moody algebra of ['G', 2] in the Chevalley basis
553
+
554
+ Next, we construct the generators and perform some computations::
555
+
556
+ sage: A.inject_variables()
557
+ Defining e1, e2, f1, f2, h1, h2, e0, f0, c, d
558
+ sage: e1.bracket(f1)
559
+ (h1)#t^0
560
+ sage: e0.bracket(f0)
561
+ (-h1 - 2*h2)#t^0 + 8*c
562
+ sage: e0.bracket(f1)
563
+ 0
564
+ sage: A[d, f0]
565
+ (-E[3*alpha[1] + 2*alpha[2]])#t^-1
566
+ sage: A([[e0, e2], [[[e1, e2], [e0, [e1, e2]]], e1]])
567
+ (-6*E[-3*alpha[1] - alpha[2]])#t^2
568
+ sage: f0.bracket(f1)
569
+ 0
570
+ sage: f0.bracket(f2)
571
+ (E[3*alpha[1] + alpha[2]])#t^-1
572
+ sage: A[h1+3*h2, A[[[f0, f2], f1], [f1,f2]] + f1] - f1
573
+ (2*E[alpha[1]])#t^-1
574
+
575
+ We can construct its derived subalgebra, the affine Lie algebra
576
+ of type `G_2^{(1)}`. In this case, there is no canonical derivation,
577
+ so the generator `d` is `0`::
578
+
579
+ sage: D = A.derived_subalgebra()
580
+ sage: D.d()
581
+ 0
582
+ """
583
+ def __init__(self, g, kac_moody):
584
+ """
585
+ Initialize ``self``.
586
+
587
+ EXAMPLES::
588
+
589
+ sage: asl = lie_algebras.Affine(QQ, ['A',4,1])
590
+ sage: TestSuite(asl).run()
591
+ """
592
+ cartan_type = g.cartan_type().affine()
593
+ names = list(g.variable_names()) + ['e0', 'f0', 'c']
594
+ super().__init__(g, cartan_type, names, kac_moody)
595
+
596
+ def _repr_(self):
597
+ r"""
598
+ Return a string representation of ``self``.
599
+
600
+ EXAMPLES::
601
+
602
+ sage: g = LieAlgebra(QQ, cartan_type=['D',4,1])
603
+ sage: g
604
+ Affine Kac-Moody algebra of ['D', 4] in the Chevalley basis
605
+ sage: g.derived_subalgebra()
606
+ Affine Lie algebra of ['D', 4] in the Chevalley basis
607
+ """
608
+ base = "Affine "
609
+ rep = repr(self._g)
610
+ if self._kac_moody:
611
+ old_len = len(rep)
612
+ rep = rep.replace("Lie", "Kac-Moody")
613
+ if len(rep) == old_len: # We did not replace anything
614
+ base += "Kac-Moody "
615
+ return base + rep
616
+
617
+ def derived_subalgebra(self):
618
+ """
619
+ Return the derived subalgebra of ``self``.
620
+
621
+ EXAMPLES::
622
+
623
+ sage: g = LieAlgebra(QQ, cartan_type=['B',3,1])
624
+ sage: g
625
+ Affine Kac-Moody algebra of ['B', 3] in the Chevalley basis
626
+ sage: D = g.derived_subalgebra(); D
627
+ Affine Lie algebra of ['B', 3] in the Chevalley basis
628
+ sage: D.derived_subalgebra() == D
629
+ True
630
+ """
631
+ if self._kac_moody:
632
+ return UntwistedAffineLieAlgebra(self._g, kac_moody=False)
633
+ return self
634
+
635
+ Element = UntwistedAffineLieAlgebraElement
636
+
637
+
638
+ class TwistedAffineLieAlgebra(AffineLieAlgebra):
639
+ r"""
640
+ A twisted affine Lie algebra.
641
+
642
+ A twisted affine Lie algebra is an affine Lie algebra for
643
+ type `X_N^{(r)}` with `r > 1`. We realize this inside an
644
+ untwisted affine Kac--Moody Lie algebra following Chapter 8
645
+ of [Ka1990]_.
646
+
647
+ Let `\overline{\mathfrak{g}}` be the classical Lie algebra by
648
+ taking the index set `I \setminus \{\epsilon\}`, where
649
+ `\epsilon = 0` unless `\epsilon = n` for `X_N^{(r)} = A_{2n}^{(2)}`,
650
+ for the twisted affine Lie algebra `\widetilde{\mathfrak{g}}`.
651
+ Let `\mathfrak{g}` be the basic Lie algebra of type `X_N`.
652
+ We realize `\overline{\mathfrak{g}}` as the fixed-point subalgebra
653
+ `\mathfrak{g}^{(0)}` of `\mathfrak{g}` under the order `r` diagram
654
+ automorphism `\mu`. This naturally acts on the `\zeta_r` (a primitive
655
+ `r`-th root of unity) eigenspace `\mathfrak{g}^{(1)}` of `\mu`,
656
+ which is the highest weight representation corresponding to
657
+ the small adjoint (where the weight spaces are the short roots
658
+ of `\overline{\mathfrak{g}}`). The *twisted affine (Kac-Moody)
659
+ Lie algebra* `\widehat{\mathfrak{g}}` is constructed as the
660
+ subalgebra of `X_N^{(1)}` given by
661
+
662
+ .. MATH::
663
+
664
+ \sum_{i \in \ZZ} \mathfrak{g}^{(i \mod 2)} \otimes t^i
665
+ \oplus R c \oplus R d,
666
+
667
+ where `R` is the base ring.
668
+
669
+ We encode our basis by using the classical Lie algebra except
670
+ for type `A_{2n}^{(2)}`. For type `A_{2n}^{(2)}`, the fixed-point
671
+ algebra `\mathfrak{g}^{(0)}` is of type `B_n` using the index set
672
+ `\{0, \ldots, n-1\}`. For `\mathfrak{g}^{(1)}`, we identify the
673
+ weights in this representation with the roots of type `B_n` and
674
+ the double all of its short roots.
675
+ """
676
+ def __init__(self, R, cartan_type, kac_moody):
677
+ """
678
+ Initialize ``self``.
679
+
680
+ EXAMPLES::
681
+
682
+ sage: g = lie_algebras.Affine(QQ, ['A', 5, 2])
683
+ sage: TestSuite(g).run()
684
+
685
+ sage: g = lie_algebras.Affine(QQ, ['D', 4, 2])
686
+ sage: TestSuite(g).run()
687
+
688
+ sage: g = lie_algebras.Affine(QQ, ['D', 5, 2])
689
+ sage: TestSuite(g).run()
690
+
691
+ sage: g = lie_algebras.Affine(QQ, ['A', 6, 2])
692
+ sage: TestSuite(g).run(skip=['_test_elements']) # _test_monomial_coefficients fails
693
+
694
+ sage: g = lie_algebras.Affine(QQ, ['A', 2, 2])
695
+ sage: TestSuite(g).run(skip=['_test_elements']) # _test_monomial_coefficients fails
696
+
697
+ sage: g = lie_algebras.Affine(QQ, ['E', 6, 2])
698
+ sage: TestSuite(g).run() # long time
699
+
700
+ sage: g = lie_algebras.Affine(QQ, ['D', 4, 3])
701
+ sage: TestSuite(g).run() # long time
702
+ """
703
+ # basic setup for AffineLieAlgebra
704
+ if cartan_type.type() == 'BC':
705
+ classical = cartan_type.classical().dual()
706
+ n = classical.rank()
707
+ classical = classical.relabel({n-i: i for i in range(n)})
708
+ else:
709
+ classical = cartan_type.classical()
710
+ g = LieAlgebra(R, cartan_type=classical)
711
+ n = classical.rank()
712
+ names = ['e%s' % i for i in range(1, n+1)]
713
+ names.extend('f%s' % i for i in range(1, n+1))
714
+ if cartan_type.type() == 'BC':
715
+ names.extend('h%s' % i for i in range(n))
716
+ else:
717
+ names.extend('h%s' % i for i in range(1, n+1))
718
+ names += ['e0', 'f0', 'c']
719
+ super().__init__(g, cartan_type, names, kac_moody)
720
+
721
+ # setup the ambient simply-laced algebra
722
+ basic_ct = cartan_type.basic_untwisted()
723
+ if cartan_type.dual().type() == 'B':
724
+ ep = [(i, i+1) for i in range(1, n)]
725
+ ep.extend((i+1, i) for i in range(n, 2*n-1))
726
+ elif cartan_type.dual().type() == 'F':
727
+ ep = [(1, 3), (3, 4), (5, 4), (6, 5), (4, 2)]
728
+ elif cartan_type.dual().type() == 'G':
729
+ ep = [(1, 2), (3, 2), (4, 2)]
730
+ else:
731
+ ep = basic_ct.dynkin_diagram().to_undirected().edges(labels=False, sort=False)
732
+
733
+ if self._cartan_type.dual().type() == 'G':
734
+ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
735
+ RP = PolynomialRing(R, 'x')
736
+ Rext = RP.quotient(RP.gen(0)**3 - 1)
737
+ self._basic = LieAlgebra(Rext, cartan_type=basic_ct, epsilon=ep)
738
+ else:
739
+ self._basic = LieAlgebra(R, cartan_type=basic_ct, epsilon=ep)
740
+ self._ambient = self._basic.affine(kac_moody=self._kac_moody)
741
+
742
+ # setup the embeddings
743
+ basic_ct = self._basic.cartan_type()
744
+ if self._cartan_type.dual().type() == 'G':
745
+ gens = basic_ct.dynkin_diagram().automorphism_group().gens()
746
+ auto = gens[0] * gens[1]
747
+ else:
748
+ auto = basic_ct.dynkin_diagram().automorphism_group().gen(0)
749
+ basic_Q = basic_ct.root_system().root_lattice()
750
+ basic_p_roots = basic_Q.positive_roots()
751
+ visited = set()
752
+ orbits = []
753
+ for al in basic_p_roots:
754
+ if al in visited:
755
+ continue
756
+ visited.add(al)
757
+ O = [al]
758
+ cur = basic_Q._from_dict({auto(i): c for i, c in al}, remove_zeros=False)
759
+ while cur != al:
760
+ O.append(cur)
761
+ visited.add(cur)
762
+ cur = basic_Q._from_dict({auto(i): c for i, c in cur}, remove_zeros=False)
763
+ orbits.append(O)
764
+
765
+ finite_ct = self._g.cartan_type()
766
+ Q = finite_ct.root_system().root_lattice()
767
+ I = finite_ct.index_set()
768
+ a = finite_ct.symmetrizer()
769
+ ord = auto.order()
770
+
771
+ if self._cartan_type.dual().type() == 'F':
772
+ # For E_6^(2), we need to take into account the lack of index sets matching
773
+ reindex = {2: 4, 4: 3, 3: 2, 1: 1}
774
+
775
+ def build_root(O):
776
+ return Q._from_dict({reindex[i]: c * (ord // a[reindex[i]]) / len(O) for i, c in sum(O) if i in reindex},
777
+ remove_zeros=False)
778
+ elif self._cartan_type.type() == 'BC':
779
+ reindex = {n-i: i for i in range(finite_ct.rank())}
780
+
781
+ def build_root(O):
782
+ return Q._from_dict({reindex[i]: c * (ord // len(O)) for i, c in sum(O) if i in reindex},
783
+ remove_zeros=False)
784
+ else:
785
+
786
+ def build_root(O):
787
+ return Q._from_dict({i: c * (ord // a[i]) / len(O) for i, c in sum(O) if i in I},
788
+ remove_zeros=False)
789
+
790
+ self._root_mapping = {build_root(O): O for O in orbits}
791
+ for r in list(self._root_mapping.keys()):
792
+ self._root_mapping[-r] = [-s for s in self._root_mapping[r]]
793
+ if self._cartan_type.type() == 'BC':
794
+ assert {r for r in self._root_mapping if len(self._root_mapping[r]) > 1} == set(Q.roots())
795
+ if self._cartan_type.rank() == 2:
796
+ # Special case since sl_2 has only 1 root length
797
+ assert {r / 2 for r in self._root_mapping if len(self._root_mapping[r]) == 1} == set(Q.roots())
798
+ else:
799
+ assert {r / 2 for r in self._root_mapping if len(self._root_mapping[r]) == 1} == set(Q.short_roots())
800
+ from sage.combinat.free_module import CombinatorialFreeModule
801
+ X = sorted(self._root_mapping, key=str)
802
+ self._g1 = CombinatorialFreeModule(R, X, prefix='E')
803
+ else:
804
+ assert set(self._root_mapping) == set(Q.roots())
805
+ al = Q.simple_roots()
806
+ ac = Q.simple_coroots()
807
+ for i in I:
808
+ self._root_mapping[ac[i]] = [r.associated_coroot() for r in self._root_mapping[al[i]]]
809
+ self._inverse_root_map = {O[0]: r for r, O in self._root_mapping.items()}
810
+
811
+ def _repr_(self):
812
+ r"""
813
+ Return a string representation of ``self``.
814
+
815
+ EXAMPLES::
816
+
817
+ sage: g = LieAlgebra(QQ, cartan_type=['D', 4, 2])
818
+ sage: g
819
+ Twisted affine Kac-Moody algebra of type ['C', 3, 1]^* over Rational Field
820
+ sage: g.derived_subalgebra()
821
+ Twisted affine Lie algebra of type ['C', 3, 1]^* over Rational Field
822
+ """
823
+ rep = "Twisted affine "
824
+ rep += "Kac-Moody " if self._kac_moody else "Lie "
825
+ rep += f"algebra of type {self._cartan_type} over {self.base_ring()}"
826
+ return rep
827
+
828
+ def _test_classical_subalgebra(self, **options):
829
+ r"""
830
+ Test the Chevalley basis properties for the classical subalgebra
831
+ of ``self``.
832
+
833
+ EXAMPLES::
834
+
835
+ sage: L = LieAlgebra(QQ, cartan_type=['A', 5, 2])
836
+ sage: L._test_classical_subalgebra()
837
+ sage: L = LieAlgebra(QQ, cartan_type=['D', 4, 2])
838
+ sage: L._test_classical_subalgebra()
839
+ """
840
+ tester = self._tester(**options)
841
+ B = self.basis()
842
+ roots = set(self._g._Q.roots())
843
+ from sage.misc.misc import some_tuples
844
+ for r, s in some_tuples(roots, 2, tester._max_runs):
845
+ ret = B[r, 0].bracket(B[s, 0])
846
+ if r + s in roots:
847
+ tester.assertEqual(list(ret.support()), [(r+s, 0)], f"obtained [{r}, {s}] == {ret}")
848
+ elif r == -s:
849
+ supp = {(ac, 0) for ac in r.associated_coroot().monomials()}
850
+ tester.assertEqual(set(ret.support()), supp, f"obtained [{r}, {s}] == {ret}")
851
+ else:
852
+ tester.assertEqual(ret, self.zero(), f"nonzero for [{r}, {s}]")
853
+
854
+ def derived_subalgebra(self):
855
+ r"""
856
+ Return the derived subalgebra of ``self``.
857
+
858
+ EXAMPLES::
859
+
860
+ sage: g = LieAlgebra(QQ, cartan_type=['A', 5, 2])
861
+ sage: g
862
+ Twisted affine Kac-Moody algebra of type ['B', 3, 1]^* over Rational Field
863
+ sage: D = g.derived_subalgebra(); D
864
+ Twisted affine Lie algebra of type ['B', 3, 1]^* over Rational Field
865
+ sage: D.derived_subalgebra() == D
866
+ True
867
+ """
868
+ if self._kac_moody:
869
+ return TwistedAffineLieAlgebra(self.base_ring(), self._cartan_type, kac_moody=False)
870
+ return self
871
+
872
+ def ambient(self):
873
+ r"""
874
+ Return the ambient untwisted affine Lie algebra of ``self``.
875
+
876
+ EXAMPLES::
877
+
878
+ sage: g = LieAlgebra(QQ, cartan_type=['A', 5, 2])
879
+ sage: g.ambient()
880
+ Affine Kac-Moody algebra of ['A', 5] in the Chevalley basis
881
+ """
882
+ return self._ambient
883
+
884
+ def retract(self, x):
885
+ r"""
886
+ Retract the element ``x`` from the ambient untwisted affine Lie
887
+ algebra into ``self``.
888
+
889
+ EXAMPLES::
890
+
891
+ sage: g = LieAlgebra(QQ, cartan_type=['A', 5, 2])
892
+ sage: it = iter(g.basis())
893
+ sage: elts = [next(it) for _ in range(20)]
894
+ sage: elts
895
+ [c,
896
+ d,
897
+ (E[alpha[1]])#t^0,
898
+ (E[alpha[2]])#t^0,
899
+ (E[alpha[3]])#t^0,
900
+ (E[alpha[1] + alpha[2]])#t^0,
901
+ (E[alpha[2] + alpha[3]])#t^0,
902
+ (E[2*alpha[2] + alpha[3]])#t^0,
903
+ (E[alpha[1] + alpha[2] + alpha[3]])#t^0,
904
+ (E[2*alpha[1] + 2*alpha[2] + alpha[3]])#t^0,
905
+ (E[alpha[1] + 2*alpha[2] + alpha[3]])#t^0,
906
+ (E[-alpha[1]])#t^0,
907
+ (E[-alpha[2]])#t^0,
908
+ (E[-alpha[3]])#t^0,
909
+ (E[-alpha[1] - alpha[2]])#t^0,
910
+ (E[-alpha[2] - alpha[3]])#t^0,
911
+ (E[-2*alpha[2] - alpha[3]])#t^0,
912
+ (E[-alpha[1] - alpha[2] - alpha[3]])#t^0,
913
+ (E[-2*alpha[1] - 2*alpha[2] - alpha[3]])#t^0,
914
+ (E[-alpha[1] - 2*alpha[2] - alpha[3]])#t^0]
915
+ sage: all(g.retract(g.to_ambient(x)) == x for x in elts)
916
+ True
917
+ """
918
+ t_dict = x.t_dict()
919
+ c_coeff = x.c_coefficient()
920
+ d_coeff = x.d_coefficient()
921
+ if self._cartan_type.dual().type() == 'G':
922
+ R = self.base_ring()
923
+ for i in t_dict:
924
+ t_dict[i] = self._g._from_dict({self._inverse_root_map[r]: R(c.lift())
925
+ for r, c in t_dict[i] if r in self._inverse_root_map},
926
+ remove_zeros=False)
927
+ elif self._cartan_type.type() == 'BC':
928
+ for i in t_dict:
929
+ if i % 2:
930
+ t_dict[i] = self._g1._from_dict({self._inverse_root_map[r]: c for r, c in t_dict[i]
931
+ if r in self._inverse_root_map},
932
+ remove_zeros=False)
933
+ else:
934
+ t_dict[i] = self._g._from_dict({self._inverse_root_map[r]: c for r, c in t_dict[i]
935
+ if r in self._inverse_root_map},
936
+ remove_zeros=False)
937
+ else:
938
+ for i in t_dict:
939
+ t_dict[i] = self._g._from_dict({self._inverse_root_map[r]: c for r, c in t_dict[i]
940
+ if r in self._inverse_root_map},
941
+ remove_zeros=False)
942
+ return self.element_class(self, t_dict, c_coeff, d_coeff)
943
+
944
+ @lazy_attribute
945
+ def to_ambient(self):
946
+ r"""
947
+ Lift the element ``x`` from the ambient untwisted affine Lie
948
+ algebra into ``self``.
949
+
950
+ EXAMPLES::
951
+
952
+ sage: g = LieAlgebra(QQ, cartan_type=['A', 5, 2])
953
+ sage: g.to_ambient
954
+ Generic morphism:
955
+ From: Twisted affine Kac-Moody algebra of type ['B', 3, 1]^* over Rational Field
956
+ To: Affine Kac-Moody algebra of ['A', 5] in the Chevalley basis
957
+ """
958
+ one = self.base_ring().one()
959
+
960
+ if self._cartan_type.type() == 'BC':
961
+ mone = -one
962
+
963
+ def basis_map(r):
964
+ O = self._root_mapping[r]
965
+ return self._basic._from_dict({O[0]: one, O[1]: mone**(1+O[1].height())},
966
+ remove_zeros=False)
967
+ else:
968
+
969
+ def basis_map(r):
970
+ return self._basic._from_dict({s: one for s in self._root_mapping[r]}, remove_zeros=False)
971
+
972
+ if self._cartan_type.dual().type() == 'G':
973
+ zeta3 = self._basic.base_ring().gen()
974
+
975
+ def basis_alt(r):
976
+ return self._basic._from_dict({s: zeta3**ind for ind, s in enumerate(self._root_mapping[r])},
977
+ remove_zeros=False)
978
+ elif self._cartan_type.type() == 'BC':
979
+
980
+ def basis_alt(r):
981
+ O = self._root_mapping[r]
982
+ if len(O) == 1:
983
+ return self._basic.monomial(O[0])
984
+ return self._basic._from_dict({O[0]: one, O[1]: mone**O[1].height()},
985
+ remove_zeros=False)
986
+ else:
987
+ mone = -one
988
+
989
+ def basis_alt(r):
990
+ return self._basic._from_dict({s: mone**ind for ind, s in enumerate(self._root_mapping[r])},
991
+ remove_zeros=False)
992
+
993
+ def lift_map(elt):
994
+ t_dict = elt.t_dict()
995
+ c_coeff = elt.c_coefficient()
996
+ d_coeff = elt.d_coefficient()
997
+ for i in t_dict:
998
+ if i % 2:
999
+ t_dict[i] = self._basic.linear_combination((basis_alt(r), c)
1000
+ for r, c in t_dict[i])
1001
+ else:
1002
+ t_dict[i] = self._basic.linear_combination((basis_map(r), c)
1003
+ for r, c in t_dict[i])
1004
+ return self._ambient.element_class(self._ambient, t_dict, c_coeff, d_coeff)
1005
+
1006
+ return self.module_morphism(function=lift_map, codomain=self._ambient)
1007
+
1008
+ class Element(UntwistedAffineLieAlgebraElement):
1009
+ def _bracket_(self, y):
1010
+ r"""
1011
+ Return the Lie bracket ``[self, y]``.
1012
+
1013
+ EXAMPLES::
1014
+
1015
+ sage: g = LieAlgebra(QQ, cartan_type=['D', 5, 2])
1016
+ sage: e0, e1, e2, e3, e4 = g.e()
1017
+ sage: f0, f1, f2, f3, f4 = g.f()
1018
+ sage: B = g.basis()
1019
+ sage: Q = g.classical().cartan_type().root_system().root_lattice()
1020
+ sage: h1, h2, h3, h4 = [B[ac, 0] for ac in Q.simple_coroots()]
1021
+ sage: e1._bracket_(e2)
1022
+ (-E[alpha[1] + alpha[2]])#t^0
1023
+ sage: e1._bracket_(e3)
1024
+ 0
1025
+ sage: e0._bracket_(e1)
1026
+ (-E[-alpha[2] - alpha[3] - alpha[4]])#t^1
1027
+ sage: e0._bracket_(e2)
1028
+ 0
1029
+ sage: f1._bracket_(f2)
1030
+ (E[-alpha[1] - alpha[2]])#t^0
1031
+ sage: f1._bracket_(f3)
1032
+ 0
1033
+ sage: f0._bracket_(f1)
1034
+ (E[alpha[2] + alpha[3] + alpha[4]])#t^-1
1035
+ sage: f0._bracket_(f2)
1036
+ 0
1037
+ sage: g[f0, e0]
1038
+ (2*h1 + 2*h2 + 2*h3 + h4)#t^0 + -32*c
1039
+ sage: g([f1, [e1, e2]])
1040
+ (E[alpha[2]])#t^0
1041
+ sage: g[h1, e0]
1042
+ (-E[-alpha[1] - alpha[2] - alpha[3] - alpha[4]])#t^1
1043
+ sage: g[h2, f0]
1044
+ 0
1045
+ """
1046
+ P = parent(self)
1047
+ ax = P.to_ambient(self)
1048
+ ay = P.to_ambient(y)
1049
+ return P.retract(ax.bracket(ay))
1050
+
1051
+
1052
+ class TwistedAffineIndices(UniqueRepresentation, Set_generic):
1053
+ r"""
1054
+ The indices for the basis of a twisted affine Lie algebra.
1055
+
1056
+ INPUT:
1057
+
1058
+ - ``cartan_type`` -- the Cartan type of twisted affine type Lie algebra
1059
+
1060
+ EXAMPLES::
1061
+
1062
+ sage: from sage.algebras.lie_algebras.affine_lie_algebra import TwistedAffineIndices
1063
+ sage: I = TwistedAffineIndices(['A', 3, 2])
1064
+ sage: it = iter(I)
1065
+ sage: [next(it) for _ in range(20)]
1066
+ [(alpha[1], 0), (alpha[2], 0), (alpha[1] + alpha[2], 0),
1067
+ (2*alpha[1] + alpha[2], 0), (-alpha[1], 0), (-alpha[2], 0),
1068
+ (-alpha[1] - alpha[2], 0), (-2*alpha[1] - alpha[2], 0),
1069
+ (alphacheck[1], 0), (alphacheck[2], 0), (alpha[1], 1),
1070
+ (alpha[1] + alpha[2], 1), (-alpha[1], 1), (-alpha[1] - alpha[2], 1),
1071
+ (alphacheck[1], 1), (alpha[1], -1), (alpha[1] + alpha[2], -1),
1072
+ (-alpha[1], -1), (-alpha[1] - alpha[2], -1), (alphacheck[1], -1)]
1073
+
1074
+ sage: I = TwistedAffineIndices(['A', 4, 2])
1075
+ sage: it = iter(I)
1076
+ sage: [next(it) for _ in range(20)]
1077
+ [(alpha[0], 0), (alpha[1], 0), (alpha[0] + alpha[1], 0),
1078
+ (2*alpha[0] + alpha[1], 0), (-alpha[0], 0), (-alpha[1], 0),
1079
+ (-alpha[0] - alpha[1], 0), (-2*alpha[0] - alpha[1], 0),
1080
+ (alphacheck[0], 0), (alphacheck[1], 0), (alpha[0], 1), (alpha[1], 1),
1081
+ (alpha[0] + alpha[1], 1), (2*alpha[0] + alpha[1], 1), (-alpha[0], 1),
1082
+ (-alpha[1], 1), (-alpha[0] - alpha[1], 1), (-2*alpha[0] - alpha[1], 1),
1083
+ (2*alpha[0], 1), (2*alpha[0] + 2*alpha[1], 1)]
1084
+
1085
+ sage: I = TwistedAffineIndices(['A', 2, 2])
1086
+ sage: it = iter(I)
1087
+ sage: [next(it) for _ in range(10)]
1088
+ [(alpha[0], 0), (-alpha[0], 0), (alphacheck[0], 0), (alpha[0], 1),
1089
+ (-alpha[0], 1), (2*alpha[0], 1), (-2*alpha[0], 1),
1090
+ (alphacheck[0], 1), (alpha[0], -1), (-alpha[0], -1)]
1091
+ """
1092
+ @staticmethod
1093
+ def __classcall_private__(cls, cartan_type):
1094
+ """
1095
+ Normalize input to ensure a unique representation.
1096
+
1097
+ sage: from sage.algebras.lie_algebras.affine_lie_algebra import TwistedAffineIndices
1098
+ sage: I1 = TwistedAffineIndices(CartanType(['C', 4, 1]).dual())
1099
+ sage: I2 = TwistedAffineIndices(['D', 5, 2])
1100
+ sage: I1 is I2
1101
+ True
1102
+ sage: I = TwistedAffineIndices(['C', 4, 1])
1103
+ Traceback (most recent call last):
1104
+ ...
1105
+ ValueError: the Cartan type must be a twisted affine type
1106
+ """
1107
+ cartan_type = CartanType(cartan_type)
1108
+ if not cartan_type.is_affine() or cartan_type.is_untwisted_affine():
1109
+ raise ValueError("the Cartan type must be a twisted affine type")
1110
+ return super().__classcall__(cls, cartan_type)
1111
+
1112
+ def __init__(self, cartan_type):
1113
+ """
1114
+ Initialize ``self``.
1115
+
1116
+ EXAMPLES::
1117
+
1118
+ sage: from sage.algebras.lie_algebras.affine_lie_algebra import TwistedAffineIndices
1119
+ sage: I = TwistedAffineIndices(['D', 4, 2])
1120
+ sage: TestSuite(I).run()
1121
+ """
1122
+ self._cartan_type = cartan_type
1123
+ if cartan_type.type() == 'BC':
1124
+ finite_ct = cartan_type.classical().dual()
1125
+ n = finite_ct.rank()
1126
+ Q = finite_ct.relabel({n-i: i for i in range(n)}).root_system().root_lattice()
1127
+ self._roots = tuple(Q.roots())
1128
+ self._ac = tuple(Q.simple_coroots())
1129
+ if cartan_type.rank() == 2:
1130
+ self._short_roots = self._roots + tuple(2*r for r in Q.roots())
1131
+ else:
1132
+ self._short_roots = self._roots + tuple(2*r for r in Q.short_roots())
1133
+ self._short_roots += self._ac
1134
+ facade = cartesian_product([self._short_roots, ZZ])
1135
+ else:
1136
+ Q = cartan_type.classical().root_system().root_lattice()
1137
+ self._roots = tuple(Q.roots())
1138
+ self._ac = tuple(Q.simple_coroots())
1139
+ self._short_roots = tuple(Q.short_roots())
1140
+ ac = Q.simple_coroots()
1141
+ self._short_roots += tuple([ac[i] for i in Q.index_set() if Q.simple_root(i).is_short_root()])
1142
+ facade = cartesian_product([self._roots + self._ac, ZZ])
1143
+ from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets
1144
+ super().__init__(facade=facade, category=InfiniteEnumeratedSets())
1145
+
1146
+ def __contains__(self, x):
1147
+ """
1148
+ Return if ``x`` is contained in ``self``.
1149
+
1150
+ EXAMPLES::
1151
+
1152
+ sage: from sage.algebras.lie_algebras.affine_lie_algebra import TwistedAffineIndices
1153
+ sage: I = TwistedAffineIndices(['D', 4, 2])
1154
+ sage: Q = RootSystem(['B', 3]).root_lattice()
1155
+ sage: all((r, 4) in I for r in Q.roots())
1156
+ True
1157
+ sage: all((r, 3) in I for r in Q.short_roots())
1158
+ True
1159
+ sage: all((r, 3) not in I for r in Q.long_roots())
1160
+ True
1161
+ sage: list(I.an_element()) in I # lists are not included
1162
+ False
1163
+ sage: (5, Q) in I
1164
+ False
1165
+ sage: (5, 5) in I
1166
+ False
1167
+ sage: (Q.simple_root(1), Q.simple_root(1)) in I
1168
+ False
1169
+ sage: (Q.simple_coroot(2), 1) in I
1170
+ False
1171
+ sage: (Q.simple_coroot(3), 1) in I
1172
+ True
1173
+ """
1174
+ if x not in self._facade_for[0]:
1175
+ return False
1176
+ x = self._facade_for[0](x)
1177
+ # self._short_roots also contains the corresponding coroots
1178
+ return (x[1] % 2 == 0) or x[0] in self._short_roots
1179
+
1180
+ def __iter__(self):
1181
+ """
1182
+ Iterate over ``self``.
1183
+
1184
+ EXAMPLES::
1185
+
1186
+ sage: from sage.algebras.lie_algebras.affine_lie_algebra import TwistedAffineIndices
1187
+ sage: I = TwistedAffineIndices(['D', 3, 2])
1188
+ sage: it = iter(I)
1189
+ sage: [next(it) for _ in range(22)]
1190
+ [(alpha[1], 0), (alpha[2], 0), (alpha[1] + 2*alpha[2], 0), (alpha[1] + alpha[2], 0),
1191
+ (-alpha[1], 0), (-alpha[2], 0), (-alpha[1] - 2*alpha[2], 0), (-alpha[1] - alpha[2], 0),
1192
+ (alphacheck[1], 0), (alphacheck[2], 0), (alpha[2], 1), (alpha[1] + alpha[2], 1),
1193
+ (-alpha[2], 1), (-alpha[1] - alpha[2], 1), (alphacheck[2], 1), (alpha[2], -1),
1194
+ (alpha[1] + alpha[2], -1), (-alpha[2], -1), (-alpha[1] - alpha[2], -1),
1195
+ (alphacheck[2], -1), (alpha[1], 2), (alpha[2], 2)]
1196
+ """
1197
+ if self._cartan_type.type() == 'BC':
1198
+ finite_ct = self._cartan_type.classical().dual()
1199
+ n = finite_ct.rank()
1200
+ finite_ct = finite_ct.relabel({n-i: i for i in range(n)})
1201
+ else:
1202
+ finite_ct = self._cartan_type.classical()
1203
+ P = self._facade_for[0]
1204
+ for i in ZZ:
1205
+ if i % 2:
1206
+ # self._short_roots also contains the corresponding coroots
1207
+ for r in self._short_roots:
1208
+ yield P((r, i))
1209
+ else:
1210
+ for r in self._roots:
1211
+ yield P((r, i))
1212
+ for r in self._ac:
1213
+ yield P((r, i))