passagemath-modules 10.6.31rc3__cp314-cp314-musllinux_1_2_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 (808) hide show
  1. passagemath_modules-10.6.31rc3.dist-info/METADATA +281 -0
  2. passagemath_modules-10.6.31rc3.dist-info/RECORD +808 -0
  3. passagemath_modules-10.6.31rc3.dist-info/WHEEL +5 -0
  4. passagemath_modules-10.6.31rc3.dist-info/top_level.txt +2 -0
  5. passagemath_modules.libs/libgcc_s-0cd532bd.so.1 +0 -0
  6. passagemath_modules.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
  7. passagemath_modules.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
  8. passagemath_modules.libs/libgsl-42cda06f.so.28.0.0 +0 -0
  9. passagemath_modules.libs/libmpc-d8ebe4b5.so.3.3.1 +0 -0
  10. passagemath_modules.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
  11. passagemath_modules.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
  12. passagemath_modules.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
  13. sage/algebras/all__sagemath_modules.py +20 -0
  14. sage/algebras/catalog.py +148 -0
  15. sage/algebras/clifford_algebra.py +3107 -0
  16. sage/algebras/clifford_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  17. sage/algebras/clifford_algebra_element.pxd +16 -0
  18. sage/algebras/clifford_algebra_element.pyx +997 -0
  19. sage/algebras/commutative_dga.py +4252 -0
  20. sage/algebras/exterior_algebra_groebner.cpython-314-x86_64-linux-musl.so +0 -0
  21. sage/algebras/exterior_algebra_groebner.pxd +55 -0
  22. sage/algebras/exterior_algebra_groebner.pyx +727 -0
  23. sage/algebras/finite_dimensional_algebras/all.py +2 -0
  24. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +1029 -0
  25. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  26. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +12 -0
  27. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +706 -0
  28. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py +196 -0
  29. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py +255 -0
  30. sage/algebras/finite_gca.py +528 -0
  31. sage/algebras/group_algebra.py +232 -0
  32. sage/algebras/lie_algebras/abelian.py +197 -0
  33. sage/algebras/lie_algebras/affine_lie_algebra.py +1213 -0
  34. sage/algebras/lie_algebras/all.py +25 -0
  35. sage/algebras/lie_algebras/all__sagemath_modules.py +1 -0
  36. sage/algebras/lie_algebras/bch.py +177 -0
  37. sage/algebras/lie_algebras/bgg_dual_module.py +1184 -0
  38. sage/algebras/lie_algebras/bgg_resolution.py +232 -0
  39. sage/algebras/lie_algebras/center_uea.py +767 -0
  40. sage/algebras/lie_algebras/classical_lie_algebra.py +2516 -0
  41. sage/algebras/lie_algebras/examples.py +683 -0
  42. sage/algebras/lie_algebras/free_lie_algebra.py +973 -0
  43. sage/algebras/lie_algebras/heisenberg.py +820 -0
  44. sage/algebras/lie_algebras/lie_algebra.py +1562 -0
  45. sage/algebras/lie_algebras/lie_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  46. sage/algebras/lie_algebras/lie_algebra_element.pxd +68 -0
  47. sage/algebras/lie_algebras/lie_algebra_element.pyx +2122 -0
  48. sage/algebras/lie_algebras/morphism.py +661 -0
  49. sage/algebras/lie_algebras/nilpotent_lie_algebra.py +457 -0
  50. sage/algebras/lie_algebras/onsager.py +1324 -0
  51. sage/algebras/lie_algebras/poincare_birkhoff_witt.py +816 -0
  52. sage/algebras/lie_algebras/quotient.py +462 -0
  53. sage/algebras/lie_algebras/rank_two_heisenberg_virasoro.py +355 -0
  54. sage/algebras/lie_algebras/representation.py +1040 -0
  55. sage/algebras/lie_algebras/structure_coefficients.py +459 -0
  56. sage/algebras/lie_algebras/subalgebra.py +967 -0
  57. sage/algebras/lie_algebras/symplectic_derivation.py +289 -0
  58. sage/algebras/lie_algebras/verma_module.py +1630 -0
  59. sage/algebras/lie_algebras/virasoro.py +1186 -0
  60. sage/algebras/octonion_algebra.cpython-314-x86_64-linux-musl.so +0 -0
  61. sage/algebras/octonion_algebra.pxd +20 -0
  62. sage/algebras/octonion_algebra.pyx +987 -0
  63. sage/algebras/orlik_solomon.py +907 -0
  64. sage/algebras/orlik_terao.py +779 -0
  65. sage/algebras/steenrod/all.py +7 -0
  66. sage/algebras/steenrod/steenrod_algebra.py +4258 -0
  67. sage/algebras/steenrod/steenrod_algebra_bases.py +1179 -0
  68. sage/algebras/steenrod/steenrod_algebra_misc.py +1167 -0
  69. sage/algebras/steenrod/steenrod_algebra_mult.py +954 -0
  70. sage/algebras/weyl_algebra.py +1126 -0
  71. sage/all__sagemath_modules.py +62 -0
  72. sage/calculus/all__sagemath_modules.py +19 -0
  73. sage/calculus/expr.py +205 -0
  74. sage/calculus/integration.cpython-314-x86_64-linux-musl.so +0 -0
  75. sage/calculus/integration.pyx +698 -0
  76. sage/calculus/interpolation.cpython-314-x86_64-linux-musl.so +0 -0
  77. sage/calculus/interpolation.pxd +13 -0
  78. sage/calculus/interpolation.pyx +387 -0
  79. sage/calculus/interpolators.cpython-314-x86_64-linux-musl.so +0 -0
  80. sage/calculus/interpolators.pyx +326 -0
  81. sage/calculus/ode.cpython-314-x86_64-linux-musl.so +0 -0
  82. sage/calculus/ode.pxd +5 -0
  83. sage/calculus/ode.pyx +610 -0
  84. sage/calculus/riemann.cpython-314-x86_64-linux-musl.so +0 -0
  85. sage/calculus/riemann.pyx +1521 -0
  86. sage/calculus/test_sympy.py +201 -0
  87. sage/calculus/transforms/all.py +7 -0
  88. sage/calculus/transforms/dft.py +844 -0
  89. sage/calculus/transforms/dwt.cpython-314-x86_64-linux-musl.so +0 -0
  90. sage/calculus/transforms/dwt.pxd +7 -0
  91. sage/calculus/transforms/dwt.pyx +160 -0
  92. sage/calculus/transforms/fft.cpython-314-x86_64-linux-musl.so +0 -0
  93. sage/calculus/transforms/fft.pxd +12 -0
  94. sage/calculus/transforms/fft.pyx +487 -0
  95. sage/calculus/wester.py +662 -0
  96. sage/coding/abstract_code.py +1108 -0
  97. sage/coding/ag_code.py +868 -0
  98. sage/coding/ag_code_decoders.cpython-314-x86_64-linux-musl.so +0 -0
  99. sage/coding/ag_code_decoders.pyx +2639 -0
  100. sage/coding/all.py +15 -0
  101. sage/coding/bch_code.py +494 -0
  102. sage/coding/binary_code.cpython-314-x86_64-linux-musl.so +0 -0
  103. sage/coding/binary_code.pxd +124 -0
  104. sage/coding/binary_code.pyx +4139 -0
  105. sage/coding/bounds_catalog.py +43 -0
  106. sage/coding/channel.py +819 -0
  107. sage/coding/channels_catalog.py +29 -0
  108. sage/coding/code_bounds.py +755 -0
  109. sage/coding/code_constructions.py +804 -0
  110. sage/coding/codes_catalog.py +111 -0
  111. sage/coding/cyclic_code.py +1329 -0
  112. sage/coding/databases.py +316 -0
  113. sage/coding/decoder.py +373 -0
  114. sage/coding/decoders_catalog.py +88 -0
  115. sage/coding/delsarte_bounds.py +709 -0
  116. sage/coding/encoder.py +390 -0
  117. sage/coding/encoders_catalog.py +64 -0
  118. sage/coding/extended_code.py +468 -0
  119. sage/coding/gabidulin_code.py +1058 -0
  120. sage/coding/golay_code.py +404 -0
  121. sage/coding/goppa_code.py +441 -0
  122. sage/coding/grs_code.py +2371 -0
  123. sage/coding/guava.py +107 -0
  124. sage/coding/guruswami_sudan/all.py +1 -0
  125. sage/coding/guruswami_sudan/gs_decoder.py +897 -0
  126. sage/coding/guruswami_sudan/interpolation.py +409 -0
  127. sage/coding/guruswami_sudan/utils.py +176 -0
  128. sage/coding/hamming_code.py +176 -0
  129. sage/coding/information_set_decoder.py +1032 -0
  130. sage/coding/kasami_codes.cpython-314-x86_64-linux-musl.so +0 -0
  131. sage/coding/kasami_codes.pyx +351 -0
  132. sage/coding/linear_code.py +3067 -0
  133. sage/coding/linear_code_no_metric.py +1354 -0
  134. sage/coding/linear_rank_metric.py +961 -0
  135. sage/coding/parity_check_code.py +353 -0
  136. sage/coding/punctured_code.py +719 -0
  137. sage/coding/reed_muller_code.py +999 -0
  138. sage/coding/self_dual_codes.py +942 -0
  139. sage/coding/source_coding/all.py +2 -0
  140. sage/coding/source_coding/huffman.py +553 -0
  141. sage/coding/subfield_subcode.py +423 -0
  142. sage/coding/two_weight_db.py +399 -0
  143. sage/combinat/all__sagemath_modules.py +7 -0
  144. sage/combinat/cartesian_product.py +347 -0
  145. sage/combinat/family.py +11 -0
  146. sage/combinat/free_module.py +1977 -0
  147. sage/combinat/root_system/all.py +147 -0
  148. sage/combinat/root_system/ambient_space.py +527 -0
  149. sage/combinat/root_system/associahedron.py +471 -0
  150. sage/combinat/root_system/braid_move_calculator.py +143 -0
  151. sage/combinat/root_system/braid_orbit.cpython-314-x86_64-linux-musl.so +0 -0
  152. sage/combinat/root_system/braid_orbit.pyx +144 -0
  153. sage/combinat/root_system/branching_rules.py +2301 -0
  154. sage/combinat/root_system/cartan_matrix.py +1245 -0
  155. sage/combinat/root_system/cartan_type.py +3069 -0
  156. sage/combinat/root_system/coxeter_group.py +162 -0
  157. sage/combinat/root_system/coxeter_matrix.py +1261 -0
  158. sage/combinat/root_system/coxeter_type.py +681 -0
  159. sage/combinat/root_system/dynkin_diagram.py +900 -0
  160. sage/combinat/root_system/extended_affine_weyl_group.py +2993 -0
  161. sage/combinat/root_system/fundamental_group.py +795 -0
  162. sage/combinat/root_system/hecke_algebra_representation.py +1203 -0
  163. sage/combinat/root_system/integrable_representations.py +1227 -0
  164. sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +1965 -0
  165. sage/combinat/root_system/pieri_factors.py +1147 -0
  166. sage/combinat/root_system/plot.py +1615 -0
  167. sage/combinat/root_system/root_lattice_realization_algebras.py +1214 -0
  168. sage/combinat/root_system/root_lattice_realizations.py +4628 -0
  169. sage/combinat/root_system/root_space.py +487 -0
  170. sage/combinat/root_system/root_system.py +882 -0
  171. sage/combinat/root_system/type_A.py +348 -0
  172. sage/combinat/root_system/type_A_affine.py +227 -0
  173. sage/combinat/root_system/type_A_infinity.py +241 -0
  174. sage/combinat/root_system/type_B.py +347 -0
  175. sage/combinat/root_system/type_BC_affine.py +287 -0
  176. sage/combinat/root_system/type_B_affine.py +216 -0
  177. sage/combinat/root_system/type_C.py +317 -0
  178. sage/combinat/root_system/type_C_affine.py +188 -0
  179. sage/combinat/root_system/type_D.py +357 -0
  180. sage/combinat/root_system/type_D_affine.py +208 -0
  181. sage/combinat/root_system/type_E.py +641 -0
  182. sage/combinat/root_system/type_E_affine.py +231 -0
  183. sage/combinat/root_system/type_F.py +387 -0
  184. sage/combinat/root_system/type_F_affine.py +137 -0
  185. sage/combinat/root_system/type_G.py +293 -0
  186. sage/combinat/root_system/type_G_affine.py +132 -0
  187. sage/combinat/root_system/type_H.py +105 -0
  188. sage/combinat/root_system/type_I.py +110 -0
  189. sage/combinat/root_system/type_Q.py +150 -0
  190. sage/combinat/root_system/type_affine.py +509 -0
  191. sage/combinat/root_system/type_dual.py +704 -0
  192. sage/combinat/root_system/type_folded.py +301 -0
  193. sage/combinat/root_system/type_marked.py +748 -0
  194. sage/combinat/root_system/type_reducible.py +601 -0
  195. sage/combinat/root_system/type_relabel.py +730 -0
  196. sage/combinat/root_system/type_super_A.py +837 -0
  197. sage/combinat/root_system/weight_lattice_realizations.py +1188 -0
  198. sage/combinat/root_system/weight_space.py +639 -0
  199. sage/combinat/root_system/weyl_characters.py +2238 -0
  200. sage/crypto/__init__.py +4 -0
  201. sage/crypto/all.py +28 -0
  202. sage/crypto/block_cipher/all.py +7 -0
  203. sage/crypto/block_cipher/des.py +1065 -0
  204. sage/crypto/block_cipher/miniaes.py +2171 -0
  205. sage/crypto/block_cipher/present.py +909 -0
  206. sage/crypto/block_cipher/sdes.py +1527 -0
  207. sage/crypto/boolean_function.cpython-314-x86_64-linux-musl.so +0 -0
  208. sage/crypto/boolean_function.pxd +10 -0
  209. sage/crypto/boolean_function.pyx +1487 -0
  210. sage/crypto/cipher.py +78 -0
  211. sage/crypto/classical.py +3668 -0
  212. sage/crypto/classical_cipher.py +569 -0
  213. sage/crypto/cryptosystem.py +387 -0
  214. sage/crypto/key_exchange/all.py +7 -0
  215. sage/crypto/key_exchange/catalog.py +24 -0
  216. sage/crypto/key_exchange/diffie_hellman.py +323 -0
  217. sage/crypto/key_exchange/key_exchange_scheme.py +107 -0
  218. sage/crypto/lattice.py +312 -0
  219. sage/crypto/lfsr.py +295 -0
  220. sage/crypto/lwe.py +840 -0
  221. sage/crypto/mq/__init__.py +4 -0
  222. sage/crypto/mq/mpolynomialsystemgenerator.py +204 -0
  223. sage/crypto/mq/rijndael_gf.py +2345 -0
  224. sage/crypto/mq/sbox.py +7 -0
  225. sage/crypto/mq/sr.py +3344 -0
  226. sage/crypto/public_key/all.py +5 -0
  227. sage/crypto/public_key/blum_goldwasser.py +776 -0
  228. sage/crypto/sbox.cpython-314-x86_64-linux-musl.so +0 -0
  229. sage/crypto/sbox.pyx +2090 -0
  230. sage/crypto/sboxes.py +2090 -0
  231. sage/crypto/stream.py +390 -0
  232. sage/crypto/stream_cipher.py +297 -0
  233. sage/crypto/util.py +519 -0
  234. sage/ext/all__sagemath_modules.py +1 -0
  235. sage/ext/interpreters/__init__.py +1 -0
  236. sage/ext/interpreters/all__sagemath_modules.py +2 -0
  237. sage/ext/interpreters/wrapper_cc.cpython-314-x86_64-linux-musl.so +0 -0
  238. sage/ext/interpreters/wrapper_cc.pxd +30 -0
  239. sage/ext/interpreters/wrapper_cc.pyx +252 -0
  240. sage/ext/interpreters/wrapper_cdf.cpython-314-x86_64-linux-musl.so +0 -0
  241. sage/ext/interpreters/wrapper_cdf.pxd +26 -0
  242. sage/ext/interpreters/wrapper_cdf.pyx +245 -0
  243. sage/ext/interpreters/wrapper_rdf.cpython-314-x86_64-linux-musl.so +0 -0
  244. sage/ext/interpreters/wrapper_rdf.pxd +23 -0
  245. sage/ext/interpreters/wrapper_rdf.pyx +221 -0
  246. sage/ext/interpreters/wrapper_rr.cpython-314-x86_64-linux-musl.so +0 -0
  247. sage/ext/interpreters/wrapper_rr.pxd +28 -0
  248. sage/ext/interpreters/wrapper_rr.pyx +335 -0
  249. sage/geometry/all__sagemath_modules.py +5 -0
  250. sage/geometry/toric_lattice.py +1745 -0
  251. sage/geometry/toric_lattice_element.cpython-314-x86_64-linux-musl.so +0 -0
  252. sage/geometry/toric_lattice_element.pyx +432 -0
  253. sage/groups/abelian_gps/abelian_group.py +1925 -0
  254. sage/groups/abelian_gps/abelian_group_element.py +164 -0
  255. sage/groups/abelian_gps/all__sagemath_modules.py +5 -0
  256. sage/groups/abelian_gps/dual_abelian_group.py +421 -0
  257. sage/groups/abelian_gps/dual_abelian_group_element.py +179 -0
  258. sage/groups/abelian_gps/element_base.py +341 -0
  259. sage/groups/abelian_gps/values.py +488 -0
  260. sage/groups/additive_abelian/additive_abelian_group.py +476 -0
  261. sage/groups/additive_abelian/additive_abelian_wrapper.py +857 -0
  262. sage/groups/additive_abelian/all.py +4 -0
  263. sage/groups/additive_abelian/qmodnz.py +231 -0
  264. sage/groups/additive_abelian/qmodnz_element.py +349 -0
  265. sage/groups/affine_gps/affine_group.py +535 -0
  266. sage/groups/affine_gps/all.py +1 -0
  267. sage/groups/affine_gps/catalog.py +17 -0
  268. sage/groups/affine_gps/euclidean_group.py +246 -0
  269. sage/groups/affine_gps/group_element.py +562 -0
  270. sage/groups/all__sagemath_modules.py +12 -0
  271. sage/groups/galois_group.py +479 -0
  272. sage/groups/matrix_gps/all.py +4 -0
  273. sage/groups/matrix_gps/all__sagemath_modules.py +13 -0
  274. sage/groups/matrix_gps/catalog.py +26 -0
  275. sage/groups/matrix_gps/coxeter_group.py +927 -0
  276. sage/groups/matrix_gps/finitely_generated.py +487 -0
  277. sage/groups/matrix_gps/group_element.cpython-314-x86_64-linux-musl.so +0 -0
  278. sage/groups/matrix_gps/group_element.pxd +11 -0
  279. sage/groups/matrix_gps/group_element.pyx +431 -0
  280. sage/groups/matrix_gps/linear.py +440 -0
  281. sage/groups/matrix_gps/matrix_group.py +617 -0
  282. sage/groups/matrix_gps/named_group.py +296 -0
  283. sage/groups/matrix_gps/orthogonal.py +544 -0
  284. sage/groups/matrix_gps/symplectic.py +251 -0
  285. sage/groups/matrix_gps/unitary.py +436 -0
  286. sage/groups/misc_gps/all__sagemath_modules.py +1 -0
  287. sage/groups/misc_gps/argument_groups.py +1905 -0
  288. sage/groups/misc_gps/imaginary_groups.py +479 -0
  289. sage/groups/perm_gps/all__sagemath_modules.py +1 -0
  290. sage/groups/perm_gps/partn_ref/all__sagemath_modules.py +1 -0
  291. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-314-x86_64-linux-musl.so +0 -0
  292. sage/groups/perm_gps/partn_ref/refinement_binary.pxd +41 -0
  293. sage/groups/perm_gps/partn_ref/refinement_binary.pyx +1167 -0
  294. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-314-x86_64-linux-musl.so +0 -0
  295. sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +31 -0
  296. sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +385 -0
  297. sage/homology/algebraic_topological_model.py +595 -0
  298. sage/homology/all.py +2 -0
  299. sage/homology/all__sagemath_modules.py +8 -0
  300. sage/homology/chain_complex.py +2148 -0
  301. sage/homology/chain_complex_homspace.py +165 -0
  302. sage/homology/chain_complex_morphism.py +629 -0
  303. sage/homology/chain_homotopy.py +604 -0
  304. sage/homology/chains.py +653 -0
  305. sage/homology/free_resolution.py +923 -0
  306. sage/homology/graded_resolution.py +567 -0
  307. sage/homology/hochschild_complex.py +756 -0
  308. sage/homology/homology_group.py +188 -0
  309. sage/homology/homology_morphism.py +422 -0
  310. sage/homology/homology_vector_space_with_basis.py +1454 -0
  311. sage/homology/koszul_complex.py +169 -0
  312. sage/homology/matrix_utils.py +205 -0
  313. sage/libs/all__sagemath_modules.py +1 -0
  314. sage/libs/gsl/__init__.py +1 -0
  315. sage/libs/gsl/airy.pxd +56 -0
  316. sage/libs/gsl/all.pxd +66 -0
  317. sage/libs/gsl/array.cpython-314-x86_64-linux-musl.so +0 -0
  318. sage/libs/gsl/array.pxd +5 -0
  319. sage/libs/gsl/array.pyx +102 -0
  320. sage/libs/gsl/bessel.pxd +208 -0
  321. sage/libs/gsl/blas.pxd +116 -0
  322. sage/libs/gsl/blas_types.pxd +34 -0
  323. sage/libs/gsl/block.pxd +52 -0
  324. sage/libs/gsl/chebyshev.pxd +37 -0
  325. sage/libs/gsl/clausen.pxd +12 -0
  326. sage/libs/gsl/combination.pxd +47 -0
  327. sage/libs/gsl/complex.pxd +151 -0
  328. sage/libs/gsl/coulomb.pxd +30 -0
  329. sage/libs/gsl/coupling.pxd +21 -0
  330. sage/libs/gsl/dawson.pxd +12 -0
  331. sage/libs/gsl/debye.pxd +24 -0
  332. sage/libs/gsl/dilog.pxd +14 -0
  333. sage/libs/gsl/eigen.pxd +46 -0
  334. sage/libs/gsl/elementary.pxd +12 -0
  335. sage/libs/gsl/ellint.pxd +48 -0
  336. sage/libs/gsl/elljac.pxd +8 -0
  337. sage/libs/gsl/erf.pxd +32 -0
  338. sage/libs/gsl/errno.pxd +26 -0
  339. sage/libs/gsl/exp.pxd +44 -0
  340. sage/libs/gsl/expint.pxd +44 -0
  341. sage/libs/gsl/fermi_dirac.pxd +44 -0
  342. sage/libs/gsl/fft.pxd +121 -0
  343. sage/libs/gsl/fit.pxd +50 -0
  344. sage/libs/gsl/gamma.pxd +94 -0
  345. sage/libs/gsl/gegenbauer.pxd +26 -0
  346. sage/libs/gsl/histogram.pxd +176 -0
  347. sage/libs/gsl/hyperg.pxd +52 -0
  348. sage/libs/gsl/integration.pxd +69 -0
  349. sage/libs/gsl/interp.pxd +109 -0
  350. sage/libs/gsl/laguerre.pxd +24 -0
  351. sage/libs/gsl/lambert.pxd +16 -0
  352. sage/libs/gsl/legendre.pxd +90 -0
  353. sage/libs/gsl/linalg.pxd +185 -0
  354. sage/libs/gsl/log.pxd +26 -0
  355. sage/libs/gsl/math.pxd +43 -0
  356. sage/libs/gsl/matrix.pxd +143 -0
  357. sage/libs/gsl/matrix_complex.pxd +130 -0
  358. sage/libs/gsl/min.pxd +67 -0
  359. sage/libs/gsl/monte.pxd +56 -0
  360. sage/libs/gsl/ntuple.pxd +32 -0
  361. sage/libs/gsl/odeiv.pxd +70 -0
  362. sage/libs/gsl/permutation.pxd +78 -0
  363. sage/libs/gsl/poly.pxd +40 -0
  364. sage/libs/gsl/pow_int.pxd +12 -0
  365. sage/libs/gsl/psi.pxd +28 -0
  366. sage/libs/gsl/qrng.pxd +29 -0
  367. sage/libs/gsl/random.pxd +257 -0
  368. sage/libs/gsl/rng.pxd +100 -0
  369. sage/libs/gsl/roots.pxd +72 -0
  370. sage/libs/gsl/sort.pxd +36 -0
  371. sage/libs/gsl/statistics.pxd +59 -0
  372. sage/libs/gsl/sum.pxd +55 -0
  373. sage/libs/gsl/synchrotron.pxd +16 -0
  374. sage/libs/gsl/transport.pxd +24 -0
  375. sage/libs/gsl/trig.pxd +58 -0
  376. sage/libs/gsl/types.pxd +137 -0
  377. sage/libs/gsl/vector.pxd +101 -0
  378. sage/libs/gsl/vector_complex.pxd +83 -0
  379. sage/libs/gsl/wavelet.pxd +49 -0
  380. sage/libs/gsl/zeta.pxd +28 -0
  381. sage/libs/mpc/__init__.pxd +114 -0
  382. sage/libs/mpc/types.pxd +28 -0
  383. sage/libs/mpfr/__init__.pxd +299 -0
  384. sage/libs/mpfr/types.pxd +26 -0
  385. sage/libs/mpmath/__init__.py +1 -0
  386. sage/libs/mpmath/all.py +27 -0
  387. sage/libs/mpmath/all__sagemath_modules.py +1 -0
  388. sage/libs/mpmath/utils.cpython-314-x86_64-linux-musl.so +0 -0
  389. sage/libs/mpmath/utils.pxd +4 -0
  390. sage/libs/mpmath/utils.pyx +319 -0
  391. sage/matrix/action.cpython-314-x86_64-linux-musl.so +0 -0
  392. sage/matrix/action.pxd +26 -0
  393. sage/matrix/action.pyx +596 -0
  394. sage/matrix/all.py +9 -0
  395. sage/matrix/args.cpython-314-x86_64-linux-musl.so +0 -0
  396. sage/matrix/args.pxd +144 -0
  397. sage/matrix/args.pyx +1668 -0
  398. sage/matrix/benchmark.py +1258 -0
  399. sage/matrix/berlekamp_massey.py +95 -0
  400. sage/matrix/compute_J_ideal.py +926 -0
  401. sage/matrix/constructor.cpython-314-x86_64-linux-musl.so +0 -0
  402. sage/matrix/constructor.pyx +750 -0
  403. sage/matrix/docs.py +430 -0
  404. sage/matrix/echelon_matrix.cpython-314-x86_64-linux-musl.so +0 -0
  405. sage/matrix/echelon_matrix.pyx +155 -0
  406. sage/matrix/matrix.pxd +2 -0
  407. sage/matrix/matrix0.cpython-314-x86_64-linux-musl.so +0 -0
  408. sage/matrix/matrix0.pxd +68 -0
  409. sage/matrix/matrix0.pyx +6324 -0
  410. sage/matrix/matrix1.cpython-314-x86_64-linux-musl.so +0 -0
  411. sage/matrix/matrix1.pxd +8 -0
  412. sage/matrix/matrix1.pyx +2851 -0
  413. sage/matrix/matrix2.cpython-314-x86_64-linux-musl.so +0 -0
  414. sage/matrix/matrix2.pxd +25 -0
  415. sage/matrix/matrix2.pyx +20181 -0
  416. sage/matrix/matrix_cdv.cpython-314-x86_64-linux-musl.so +0 -0
  417. sage/matrix/matrix_cdv.pxd +4 -0
  418. sage/matrix/matrix_cdv.pyx +93 -0
  419. sage/matrix/matrix_complex_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  420. sage/matrix/matrix_complex_double_dense.pxd +5 -0
  421. sage/matrix/matrix_complex_double_dense.pyx +98 -0
  422. sage/matrix/matrix_dense.cpython-314-x86_64-linux-musl.so +0 -0
  423. sage/matrix/matrix_dense.pxd +5 -0
  424. sage/matrix/matrix_dense.pyx +343 -0
  425. sage/matrix/matrix_domain_dense.pxd +5 -0
  426. sage/matrix/matrix_domain_sparse.pxd +5 -0
  427. sage/matrix/matrix_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  428. sage/matrix/matrix_double_dense.pxd +7 -0
  429. sage/matrix/matrix_double_dense.pyx +3906 -0
  430. sage/matrix/matrix_double_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  431. sage/matrix/matrix_double_sparse.pxd +6 -0
  432. sage/matrix/matrix_double_sparse.pyx +248 -0
  433. sage/matrix/matrix_generic_dense.cpython-314-x86_64-linux-musl.so +0 -0
  434. sage/matrix/matrix_generic_dense.pxd +7 -0
  435. sage/matrix/matrix_generic_dense.pyx +354 -0
  436. sage/matrix/matrix_generic_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  437. sage/matrix/matrix_generic_sparse.pxd +7 -0
  438. sage/matrix/matrix_generic_sparse.pyx +461 -0
  439. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
  440. sage/matrix/matrix_laurent_mpolynomial_dense.pxd +5 -0
  441. sage/matrix/matrix_laurent_mpolynomial_dense.pyx +115 -0
  442. sage/matrix/matrix_misc.py +313 -0
  443. sage/matrix/matrix_numpy_dense.cpython-314-x86_64-linux-musl.so +0 -0
  444. sage/matrix/matrix_numpy_dense.pxd +14 -0
  445. sage/matrix/matrix_numpy_dense.pyx +450 -0
  446. sage/matrix/matrix_numpy_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
  447. sage/matrix/matrix_numpy_integer_dense.pxd +7 -0
  448. sage/matrix/matrix_numpy_integer_dense.pyx +59 -0
  449. sage/matrix/matrix_polynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
  450. sage/matrix/matrix_polynomial_dense.pxd +5 -0
  451. sage/matrix/matrix_polynomial_dense.pyx +5341 -0
  452. sage/matrix/matrix_real_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  453. sage/matrix/matrix_real_double_dense.pxd +7 -0
  454. sage/matrix/matrix_real_double_dense.pyx +122 -0
  455. sage/matrix/matrix_space.py +2848 -0
  456. sage/matrix/matrix_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  457. sage/matrix/matrix_sparse.pxd +5 -0
  458. sage/matrix/matrix_sparse.pyx +1222 -0
  459. sage/matrix/matrix_window.cpython-314-x86_64-linux-musl.so +0 -0
  460. sage/matrix/matrix_window.pxd +37 -0
  461. sage/matrix/matrix_window.pyx +242 -0
  462. sage/matrix/misc_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
  463. sage/matrix/misc_mpfr.pyx +80 -0
  464. sage/matrix/operation_table.py +1182 -0
  465. sage/matrix/special.py +3666 -0
  466. sage/matrix/strassen.cpython-314-x86_64-linux-musl.so +0 -0
  467. sage/matrix/strassen.pyx +851 -0
  468. sage/matrix/symplectic_basis.py +541 -0
  469. sage/matrix/template.pxd +6 -0
  470. sage/matrix/tests.py +71 -0
  471. sage/matroids/advanced.py +77 -0
  472. sage/matroids/all.py +13 -0
  473. sage/matroids/basis_exchange_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  474. sage/matroids/basis_exchange_matroid.pxd +96 -0
  475. sage/matroids/basis_exchange_matroid.pyx +2344 -0
  476. sage/matroids/basis_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  477. sage/matroids/basis_matroid.pxd +45 -0
  478. sage/matroids/basis_matroid.pyx +1217 -0
  479. sage/matroids/catalog.py +44 -0
  480. sage/matroids/chow_ring.py +473 -0
  481. sage/matroids/chow_ring_ideal.py +849 -0
  482. sage/matroids/circuit_closures_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  483. sage/matroids/circuit_closures_matroid.pxd +16 -0
  484. sage/matroids/circuit_closures_matroid.pyx +559 -0
  485. sage/matroids/circuits_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  486. sage/matroids/circuits_matroid.pxd +38 -0
  487. sage/matroids/circuits_matroid.pyx +947 -0
  488. sage/matroids/constructor.py +1086 -0
  489. sage/matroids/database_collections.py +365 -0
  490. sage/matroids/database_matroids.py +5338 -0
  491. sage/matroids/dual_matroid.py +583 -0
  492. sage/matroids/extension.cpython-314-x86_64-linux-musl.so +0 -0
  493. sage/matroids/extension.pxd +34 -0
  494. sage/matroids/extension.pyx +519 -0
  495. sage/matroids/flats_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  496. sage/matroids/flats_matroid.pxd +28 -0
  497. sage/matroids/flats_matroid.pyx +715 -0
  498. sage/matroids/gammoid.py +600 -0
  499. sage/matroids/graphic_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  500. sage/matroids/graphic_matroid.pxd +39 -0
  501. sage/matroids/graphic_matroid.pyx +2024 -0
  502. sage/matroids/lean_matrix.cpython-314-x86_64-linux-musl.so +0 -0
  503. sage/matroids/lean_matrix.pxd +126 -0
  504. sage/matroids/lean_matrix.pyx +3667 -0
  505. sage/matroids/linear_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  506. sage/matroids/linear_matroid.pxd +180 -0
  507. sage/matroids/linear_matroid.pyx +6649 -0
  508. sage/matroids/matroid.cpython-314-x86_64-linux-musl.so +0 -0
  509. sage/matroids/matroid.pxd +243 -0
  510. sage/matroids/matroid.pyx +8759 -0
  511. sage/matroids/matroids_catalog.py +190 -0
  512. sage/matroids/matroids_plot_helpers.py +890 -0
  513. sage/matroids/minor_matroid.py +480 -0
  514. sage/matroids/minorfix.h +9 -0
  515. sage/matroids/named_matroids.py +5 -0
  516. sage/matroids/rank_matroid.py +268 -0
  517. sage/matroids/set_system.cpython-314-x86_64-linux-musl.so +0 -0
  518. sage/matroids/set_system.pxd +38 -0
  519. sage/matroids/set_system.pyx +800 -0
  520. sage/matroids/transversal_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  521. sage/matroids/transversal_matroid.pxd +14 -0
  522. sage/matroids/transversal_matroid.pyx +893 -0
  523. sage/matroids/union_matroid.cpython-314-x86_64-linux-musl.so +0 -0
  524. sage/matroids/union_matroid.pxd +20 -0
  525. sage/matroids/union_matroid.pyx +331 -0
  526. sage/matroids/unpickling.cpython-314-x86_64-linux-musl.so +0 -0
  527. sage/matroids/unpickling.pyx +843 -0
  528. sage/matroids/utilities.py +809 -0
  529. sage/misc/all__sagemath_modules.py +20 -0
  530. sage/misc/c3.cpython-314-x86_64-linux-musl.so +0 -0
  531. sage/misc/c3.pyx +238 -0
  532. sage/misc/compat.py +87 -0
  533. sage/misc/element_with_label.py +173 -0
  534. sage/misc/func_persist.py +79 -0
  535. sage/misc/pickle_old.cpython-314-x86_64-linux-musl.so +0 -0
  536. sage/misc/pickle_old.pyx +19 -0
  537. sage/misc/proof.py +7 -0
  538. sage/misc/replace_dot_all.py +472 -0
  539. sage/misc/sagedoc_conf.py +168 -0
  540. sage/misc/sphinxify.py +167 -0
  541. sage/misc/test_class_pickling.py +85 -0
  542. sage/modules/all.py +42 -0
  543. sage/modules/complex_double_vector.py +25 -0
  544. sage/modules/diamond_cutting.py +380 -0
  545. sage/modules/fg_pid/all.py +1 -0
  546. sage/modules/fg_pid/fgp_element.py +456 -0
  547. sage/modules/fg_pid/fgp_module.py +2091 -0
  548. sage/modules/fg_pid/fgp_morphism.py +550 -0
  549. sage/modules/filtered_vector_space.py +1271 -0
  550. sage/modules/finite_submodule_iter.cpython-314-x86_64-linux-musl.so +0 -0
  551. sage/modules/finite_submodule_iter.pxd +27 -0
  552. sage/modules/finite_submodule_iter.pyx +452 -0
  553. sage/modules/fp_graded/all.py +1 -0
  554. sage/modules/fp_graded/element.py +346 -0
  555. sage/modules/fp_graded/free_element.py +298 -0
  556. sage/modules/fp_graded/free_homspace.py +53 -0
  557. sage/modules/fp_graded/free_module.py +1060 -0
  558. sage/modules/fp_graded/free_morphism.py +217 -0
  559. sage/modules/fp_graded/homspace.py +563 -0
  560. sage/modules/fp_graded/module.py +1340 -0
  561. sage/modules/fp_graded/morphism.py +1990 -0
  562. sage/modules/fp_graded/steenrod/all.py +1 -0
  563. sage/modules/fp_graded/steenrod/homspace.py +65 -0
  564. sage/modules/fp_graded/steenrod/module.py +477 -0
  565. sage/modules/fp_graded/steenrod/morphism.py +404 -0
  566. sage/modules/fp_graded/steenrod/profile.py +241 -0
  567. sage/modules/free_module.py +8447 -0
  568. sage/modules/free_module_element.cpython-314-x86_64-linux-musl.so +0 -0
  569. sage/modules/free_module_element.pxd +22 -0
  570. sage/modules/free_module_element.pyx +5445 -0
  571. sage/modules/free_module_homspace.py +369 -0
  572. sage/modules/free_module_integer.py +896 -0
  573. sage/modules/free_module_morphism.py +823 -0
  574. sage/modules/free_module_pseudohomspace.py +352 -0
  575. sage/modules/free_module_pseudomorphism.py +578 -0
  576. sage/modules/free_quadratic_module.py +1706 -0
  577. sage/modules/free_quadratic_module_integer_symmetric.py +1790 -0
  578. sage/modules/matrix_morphism.py +1745 -0
  579. sage/modules/misc.py +103 -0
  580. sage/modules/module_functors.py +192 -0
  581. sage/modules/multi_filtered_vector_space.py +719 -0
  582. sage/modules/ore_module.py +2208 -0
  583. sage/modules/ore_module_element.py +178 -0
  584. sage/modules/ore_module_homspace.py +147 -0
  585. sage/modules/ore_module_morphism.py +968 -0
  586. sage/modules/quotient_module.py +699 -0
  587. sage/modules/real_double_vector.py +22 -0
  588. sage/modules/submodule.py +255 -0
  589. sage/modules/tensor_operations.py +567 -0
  590. sage/modules/torsion_quadratic_module.py +1352 -0
  591. sage/modules/tutorial_free_modules.py +248 -0
  592. sage/modules/vector_complex_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  593. sage/modules/vector_complex_double_dense.pxd +6 -0
  594. sage/modules/vector_complex_double_dense.pyx +117 -0
  595. sage/modules/vector_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  596. sage/modules/vector_double_dense.pxd +6 -0
  597. sage/modules/vector_double_dense.pyx +604 -0
  598. sage/modules/vector_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
  599. sage/modules/vector_integer_dense.pxd +15 -0
  600. sage/modules/vector_integer_dense.pyx +361 -0
  601. sage/modules/vector_integer_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  602. sage/modules/vector_integer_sparse.pxd +29 -0
  603. sage/modules/vector_integer_sparse.pyx +406 -0
  604. sage/modules/vector_modn_dense.cpython-314-x86_64-linux-musl.so +0 -0
  605. sage/modules/vector_modn_dense.pxd +12 -0
  606. sage/modules/vector_modn_dense.pyx +394 -0
  607. sage/modules/vector_modn_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  608. sage/modules/vector_modn_sparse.pxd +21 -0
  609. sage/modules/vector_modn_sparse.pyx +298 -0
  610. sage/modules/vector_numpy_dense.cpython-314-x86_64-linux-musl.so +0 -0
  611. sage/modules/vector_numpy_dense.pxd +15 -0
  612. sage/modules/vector_numpy_dense.pyx +304 -0
  613. sage/modules/vector_numpy_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
  614. sage/modules/vector_numpy_integer_dense.pxd +7 -0
  615. sage/modules/vector_numpy_integer_dense.pyx +54 -0
  616. sage/modules/vector_rational_dense.cpython-314-x86_64-linux-musl.so +0 -0
  617. sage/modules/vector_rational_dense.pxd +15 -0
  618. sage/modules/vector_rational_dense.pyx +387 -0
  619. sage/modules/vector_rational_sparse.cpython-314-x86_64-linux-musl.so +0 -0
  620. sage/modules/vector_rational_sparse.pxd +30 -0
  621. sage/modules/vector_rational_sparse.pyx +413 -0
  622. sage/modules/vector_real_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
  623. sage/modules/vector_real_double_dense.pxd +6 -0
  624. sage/modules/vector_real_double_dense.pyx +126 -0
  625. sage/modules/vector_space_homspace.py +430 -0
  626. sage/modules/vector_space_morphism.py +989 -0
  627. sage/modules/with_basis/all.py +15 -0
  628. sage/modules/with_basis/cell_module.py +494 -0
  629. sage/modules/with_basis/indexed_element.cpython-314-x86_64-linux-musl.so +0 -0
  630. sage/modules/with_basis/indexed_element.pxd +13 -0
  631. sage/modules/with_basis/indexed_element.pyx +1058 -0
  632. sage/modules/with_basis/invariant.py +1075 -0
  633. sage/modules/with_basis/morphism.py +1636 -0
  634. sage/modules/with_basis/representation.py +2939 -0
  635. sage/modules/with_basis/subquotient.py +685 -0
  636. sage/numerical/all__sagemath_modules.py +6 -0
  637. sage/numerical/gauss_legendre.cpython-314-x86_64-linux-musl.so +0 -0
  638. sage/numerical/gauss_legendre.pyx +381 -0
  639. sage/numerical/optimize.py +910 -0
  640. sage/probability/all.py +10 -0
  641. sage/probability/probability_distribution.cpython-314-x86_64-linux-musl.so +0 -0
  642. sage/probability/probability_distribution.pyx +1242 -0
  643. sage/probability/random_variable.py +411 -0
  644. sage/quadratic_forms/all.py +4 -0
  645. sage/quadratic_forms/all__sagemath_modules.py +15 -0
  646. sage/quadratic_forms/binary_qf.py +2042 -0
  647. sage/quadratic_forms/bqf_class_group.py +748 -0
  648. sage/quadratic_forms/constructions.py +93 -0
  649. sage/quadratic_forms/count_local_2.cpython-314-x86_64-linux-musl.so +0 -0
  650. sage/quadratic_forms/count_local_2.pyx +365 -0
  651. sage/quadratic_forms/extras.py +195 -0
  652. sage/quadratic_forms/quadratic_form.py +1753 -0
  653. sage/quadratic_forms/quadratic_form__count_local_2.py +221 -0
  654. sage/quadratic_forms/quadratic_form__equivalence_testing.py +708 -0
  655. sage/quadratic_forms/quadratic_form__evaluate.cpython-314-x86_64-linux-musl.so +0 -0
  656. sage/quadratic_forms/quadratic_form__evaluate.pyx +139 -0
  657. sage/quadratic_forms/quadratic_form__local_density_congruence.py +977 -0
  658. sage/quadratic_forms/quadratic_form__local_field_invariants.py +1072 -0
  659. sage/quadratic_forms/quadratic_form__neighbors.py +424 -0
  660. sage/quadratic_forms/quadratic_form__reduction_theory.py +488 -0
  661. sage/quadratic_forms/quadratic_form__split_local_covering.py +416 -0
  662. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +657 -0
  663. sage/quadratic_forms/quadratic_form__theta.py +352 -0
  664. sage/quadratic_forms/quadratic_form__variable_substitutions.py +370 -0
  665. sage/quadratic_forms/random_quadraticform.py +209 -0
  666. sage/quadratic_forms/ternary.cpython-314-x86_64-linux-musl.so +0 -0
  667. sage/quadratic_forms/ternary.pyx +1154 -0
  668. sage/quadratic_forms/ternary_qf.py +2027 -0
  669. sage/rings/all__sagemath_modules.py +28 -0
  670. sage/rings/asymptotic/all__sagemath_modules.py +1 -0
  671. sage/rings/asymptotic/misc.py +1252 -0
  672. sage/rings/cc.py +4 -0
  673. sage/rings/cfinite_sequence.py +1306 -0
  674. sage/rings/complex_conversion.cpython-314-x86_64-linux-musl.so +0 -0
  675. sage/rings/complex_conversion.pxd +8 -0
  676. sage/rings/complex_conversion.pyx +23 -0
  677. sage/rings/complex_double.cpython-314-x86_64-linux-musl.so +0 -0
  678. sage/rings/complex_double.pxd +21 -0
  679. sage/rings/complex_double.pyx +2654 -0
  680. sage/rings/complex_mpc.cpython-314-x86_64-linux-musl.so +0 -0
  681. sage/rings/complex_mpc.pxd +21 -0
  682. sage/rings/complex_mpc.pyx +2576 -0
  683. sage/rings/complex_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
  684. sage/rings/complex_mpfr.pxd +18 -0
  685. sage/rings/complex_mpfr.pyx +3602 -0
  686. sage/rings/derivation.py +2334 -0
  687. sage/rings/finite_rings/all__sagemath_modules.py +1 -0
  688. sage/rings/finite_rings/maps_finite_field.py +191 -0
  689. sage/rings/function_field/all__sagemath_modules.py +8 -0
  690. sage/rings/function_field/derivations.py +102 -0
  691. sage/rings/function_field/derivations_rational.py +132 -0
  692. sage/rings/function_field/differential.py +853 -0
  693. sage/rings/function_field/divisor.py +1107 -0
  694. sage/rings/function_field/drinfeld_modules/action.py +199 -0
  695. sage/rings/function_field/drinfeld_modules/all.py +1 -0
  696. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +673 -0
  697. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +2087 -0
  698. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1131 -0
  699. sage/rings/function_field/drinfeld_modules/homset.py +420 -0
  700. sage/rings/function_field/drinfeld_modules/morphism.py +820 -0
  701. sage/rings/function_field/hermite_form_polynomial.cpython-314-x86_64-linux-musl.so +0 -0
  702. sage/rings/function_field/hermite_form_polynomial.pyx +188 -0
  703. sage/rings/function_field/khuri_makdisi.cpython-314-x86_64-linux-musl.so +0 -0
  704. sage/rings/function_field/khuri_makdisi.pyx +935 -0
  705. sage/rings/invariants/all.py +4 -0
  706. sage/rings/invariants/invariant_theory.py +4597 -0
  707. sage/rings/invariants/reconstruction.py +395 -0
  708. sage/rings/polynomial/all__sagemath_modules.py +17 -0
  709. sage/rings/polynomial/integer_valued_polynomials.py +1230 -0
  710. sage/rings/polynomial/laurent_polynomial_mpair.cpython-314-x86_64-linux-musl.so +0 -0
  711. sage/rings/polynomial/laurent_polynomial_mpair.pxd +15 -0
  712. sage/rings/polynomial/laurent_polynomial_mpair.pyx +2023 -0
  713. sage/rings/polynomial/ore_function_element.py +952 -0
  714. sage/rings/polynomial/ore_function_field.py +1028 -0
  715. sage/rings/polynomial/ore_polynomial_element.cpython-314-x86_64-linux-musl.so +0 -0
  716. sage/rings/polynomial/ore_polynomial_element.pxd +48 -0
  717. sage/rings/polynomial/ore_polynomial_element.pyx +3145 -0
  718. sage/rings/polynomial/ore_polynomial_ring.py +1334 -0
  719. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-314-x86_64-linux-musl.so +0 -0
  720. sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +788 -0
  721. sage/rings/polynomial/q_integer_valued_polynomials.py +1264 -0
  722. sage/rings/polynomial/skew_polynomial_element.cpython-314-x86_64-linux-musl.so +0 -0
  723. sage/rings/polynomial/skew_polynomial_element.pxd +9 -0
  724. sage/rings/polynomial/skew_polynomial_element.pyx +684 -0
  725. sage/rings/polynomial/skew_polynomial_finite_field.cpython-314-x86_64-linux-musl.so +0 -0
  726. sage/rings/polynomial/skew_polynomial_finite_field.pxd +19 -0
  727. sage/rings/polynomial/skew_polynomial_finite_field.pyx +1093 -0
  728. sage/rings/polynomial/skew_polynomial_finite_order.cpython-314-x86_64-linux-musl.so +0 -0
  729. sage/rings/polynomial/skew_polynomial_finite_order.pxd +10 -0
  730. sage/rings/polynomial/skew_polynomial_finite_order.pyx +567 -0
  731. sage/rings/polynomial/skew_polynomial_ring.py +908 -0
  732. sage/rings/real_double_element_gsl.cpython-314-x86_64-linux-musl.so +0 -0
  733. sage/rings/real_double_element_gsl.pxd +8 -0
  734. sage/rings/real_double_element_gsl.pyx +794 -0
  735. sage/rings/real_field.py +58 -0
  736. sage/rings/real_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
  737. sage/rings/real_mpfr.pxd +29 -0
  738. sage/rings/real_mpfr.pyx +6122 -0
  739. sage/rings/ring_extension.cpython-314-x86_64-linux-musl.so +0 -0
  740. sage/rings/ring_extension.pxd +42 -0
  741. sage/rings/ring_extension.pyx +2779 -0
  742. sage/rings/ring_extension_conversion.cpython-314-x86_64-linux-musl.so +0 -0
  743. sage/rings/ring_extension_conversion.pxd +16 -0
  744. sage/rings/ring_extension_conversion.pyx +462 -0
  745. sage/rings/ring_extension_element.cpython-314-x86_64-linux-musl.so +0 -0
  746. sage/rings/ring_extension_element.pxd +21 -0
  747. sage/rings/ring_extension_element.pyx +1635 -0
  748. sage/rings/ring_extension_homset.py +64 -0
  749. sage/rings/ring_extension_morphism.cpython-314-x86_64-linux-musl.so +0 -0
  750. sage/rings/ring_extension_morphism.pxd +35 -0
  751. sage/rings/ring_extension_morphism.pyx +920 -0
  752. sage/schemes/all__sagemath_modules.py +1 -0
  753. sage/schemes/projective/all__sagemath_modules.py +1 -0
  754. sage/schemes/projective/coherent_sheaf.py +300 -0
  755. sage/schemes/projective/cohomology.py +510 -0
  756. sage/stats/all.py +15 -0
  757. sage/stats/basic_stats.py +489 -0
  758. sage/stats/distributions/all.py +7 -0
  759. sage/stats/distributions/catalog.py +34 -0
  760. sage/stats/distributions/dgs.h +50 -0
  761. sage/stats/distributions/dgs.pxd +111 -0
  762. sage/stats/distributions/dgs_bern.h +400 -0
  763. sage/stats/distributions/dgs_gauss.h +614 -0
  764. sage/stats/distributions/dgs_misc.h +104 -0
  765. sage/stats/distributions/discrete_gaussian_integer.cpython-314-x86_64-linux-musl.so +0 -0
  766. sage/stats/distributions/discrete_gaussian_integer.pxd +14 -0
  767. sage/stats/distributions/discrete_gaussian_integer.pyx +498 -0
  768. sage/stats/distributions/discrete_gaussian_lattice.py +908 -0
  769. sage/stats/distributions/discrete_gaussian_polynomial.py +141 -0
  770. sage/stats/hmm/all.py +15 -0
  771. sage/stats/hmm/chmm.cpython-314-x86_64-linux-musl.so +0 -0
  772. sage/stats/hmm/chmm.pyx +1595 -0
  773. sage/stats/hmm/distributions.cpython-314-x86_64-linux-musl.so +0 -0
  774. sage/stats/hmm/distributions.pxd +29 -0
  775. sage/stats/hmm/distributions.pyx +531 -0
  776. sage/stats/hmm/hmm.cpython-314-x86_64-linux-musl.so +0 -0
  777. sage/stats/hmm/hmm.pxd +17 -0
  778. sage/stats/hmm/hmm.pyx +1388 -0
  779. sage/stats/hmm/util.cpython-314-x86_64-linux-musl.so +0 -0
  780. sage/stats/hmm/util.pxd +7 -0
  781. sage/stats/hmm/util.pyx +165 -0
  782. sage/stats/intlist.cpython-314-x86_64-linux-musl.so +0 -0
  783. sage/stats/intlist.pxd +14 -0
  784. sage/stats/intlist.pyx +588 -0
  785. sage/stats/r.py +49 -0
  786. sage/stats/time_series.cpython-314-x86_64-linux-musl.so +0 -0
  787. sage/stats/time_series.pxd +6 -0
  788. sage/stats/time_series.pyx +2546 -0
  789. sage/tensor/all.py +2 -0
  790. sage/tensor/modules/all.py +8 -0
  791. sage/tensor/modules/alternating_contr_tensor.py +761 -0
  792. sage/tensor/modules/comp.py +5598 -0
  793. sage/tensor/modules/ext_pow_free_module.py +824 -0
  794. sage/tensor/modules/finite_rank_free_module.py +3589 -0
  795. sage/tensor/modules/format_utilities.py +333 -0
  796. sage/tensor/modules/free_module_alt_form.py +858 -0
  797. sage/tensor/modules/free_module_automorphism.py +1207 -0
  798. sage/tensor/modules/free_module_basis.py +1074 -0
  799. sage/tensor/modules/free_module_element.py +284 -0
  800. sage/tensor/modules/free_module_homset.py +652 -0
  801. sage/tensor/modules/free_module_linear_group.py +564 -0
  802. sage/tensor/modules/free_module_morphism.py +1581 -0
  803. sage/tensor/modules/free_module_tensor.py +3289 -0
  804. sage/tensor/modules/reflexive_module.py +386 -0
  805. sage/tensor/modules/tensor_free_module.py +780 -0
  806. sage/tensor/modules/tensor_free_submodule.py +538 -0
  807. sage/tensor/modules/tensor_free_submodule_basis.py +140 -0
  808. sage/tensor/modules/tensor_with_indices.py +1043 -0
@@ -0,0 +1,2238 @@
1
+ # sage_setup: distribution = sagemath-modules
2
+ # sage.doctest: needs sage.graphs sage.groups sage.modules
3
+ """
4
+ Weyl character rings
5
+ """
6
+ # ****************************************************************************
7
+ # Copyright (C) 2011 Daniel Bump <bump at match.stanford.edu>
8
+ # Nicolas Thiery <nthiery at users.sf.net>
9
+ #
10
+ # Distributed under the terms of the GNU General Public License (GPL)
11
+ # https://www.gnu.org/licenses/
12
+ # ****************************************************************************
13
+
14
+ import sage.combinat.root_system.branching_rules
15
+ from sage.categories.algebras import Algebras
16
+ from sage.categories.algebras_with_basis import AlgebrasWithBasis
17
+ from sage.combinat.free_module import CombinatorialFreeModule
18
+ from sage.combinat.root_system.cartan_type import CartanType
19
+ from sage.combinat.root_system.root_system import RootSystem
20
+ from sage.misc.cachefunc import cached_method
21
+ from sage.misc.lazy_attribute import lazy_attribute
22
+ from sage.sets.recursively_enumerated_set import RecursivelyEnumeratedSet
23
+ from sage.misc.functional import is_even
24
+ from sage.rings.integer import Integer
25
+ from sage.rings.integer_ring import ZZ
26
+
27
+
28
+ class WeylCharacterRing(CombinatorialFreeModule):
29
+ r"""
30
+ A class for rings of Weyl characters.
31
+
32
+ Let `K` be a compact Lie group, which we assume is semisimple and
33
+ simply-connected. Its complexified Lie algebra `L` is the Lie algebra of a
34
+ complex analytic Lie group `G`. The following three categories are
35
+ equivalent: finite-dimensional representations of `K`; finite-dimensional
36
+ representations of `L`; and finite-dimensional analytic representations of
37
+ `G`. In every case, there is a parametrization of the irreducible
38
+ representations by their highest weight vectors. For this theory of Weyl,
39
+ see (for example):
40
+
41
+ * Adams, *Lectures on Lie groups*
42
+ * Broecker and Tom Dieck, *Representations of Compact Lie groups*
43
+ * Bump, *Lie Groups*
44
+ * Fulton and Harris, *Representation Theory*
45
+ * Goodman and Wallach, *Representations and Invariants of the Classical Groups*
46
+ * Hall, *Lie Groups, Lie Algebras and Representations*
47
+ * Humphreys, *Introduction to Lie Algebras and their representations*
48
+ * Procesi, *Lie Groups*
49
+ * Samelson, *Notes on Lie Algebras*
50
+ * Varadarajan, *Lie groups, Lie algebras, and their representations*
51
+ * Zhelobenko, *Compact Lie Groups and their Representations*.
52
+
53
+ Computations that you can do with these include computing their
54
+ weight multiplicities, products (thus decomposing the tensor
55
+ product of a representation into irreducibles) and branching
56
+ rules (restriction to a smaller group).
57
+
58
+ There is associated with `K`, `L` or `G` as above a lattice, the weight
59
+ lattice, whose elements (called weights) are characters of a Cartan
60
+ subgroup or subalgebra. There is an action of the Weyl group `W` on
61
+ the lattice, and elements of a fixed fundamental domain for `W`, the
62
+ positive Weyl chamber, are called dominant. There is for each
63
+ representation a unique highest dominant weight that occurs with
64
+ nonzero multiplicity with respect to a certain partial order, and
65
+ it is called the highest weight vector.
66
+
67
+ EXAMPLES::
68
+
69
+ sage: L = RootSystem("A2").ambient_space()
70
+ sage: [fw1,fw2] = L.fundamental_weights()
71
+ sage: R = WeylCharacterRing(['A',2], prefix='R')
72
+ sage: [R(1),R(fw1),R(fw2)]
73
+ [R(0,0,0), R(1,0,0), R(1,1,0)]
74
+
75
+ Here ``R(1)``, ``R(fw1)``, and ``R(fw2)`` are irreducible representations
76
+ with highest weight vectors `0`, `\Lambda_1`, and `\Lambda_2` respectively
77
+ (the first two fundamental weights).
78
+
79
+ For type `A` (also `G_2`, `F_4`, `E_6` and `E_7`) we will take as the
80
+ weight lattice not the weight lattice of the semisimple group, but for a
81
+ larger one. For type `A`, this means we are concerned with the
82
+ representation theory of `K = U(n)` or `G = GL(n, \CC)` rather than `SU(n)`
83
+ or `SU(n, \CC)`. This is useful since the representation theory of `GL(n)`
84
+ is ubiquitous, and also since we may then represent the fundamental
85
+ weights (in :mod:`sage.combinat.root_system.root_system`) by vectors
86
+ with integer entries. If you are only interested in `SL(3)`, say, use
87
+ ``WeylCharacterRing(['A',2])`` as above but be aware that ``R([a,b,c])``
88
+ and ``R([a+1,b+1,c+1])`` represent the same character of `SL(3)` since
89
+ ``R([1,1,1])`` is the determinant.
90
+
91
+ For more information, see the thematic tutorial *Lie Methods and
92
+ Related Combinatorics in Sage*, available at:
93
+
94
+ https://passagemath.org/docs/latest/html/en/thematic_tutorials/lie.html
95
+ """
96
+ @staticmethod
97
+ def __classcall__(cls, ct, base_ring=ZZ, prefix=None, style='lattice', k=None, conjugate=False, cyclotomic_order=None, fusion_labels=None, inject_variables=False):
98
+ """
99
+ TESTS::
100
+
101
+ sage: R = WeylCharacterRing("G2", style='coroots')
102
+ sage: R.cartan_type() is CartanType("G2")
103
+ True
104
+ sage: R.base_ring() is ZZ
105
+ True
106
+ """
107
+ ct = CartanType(ct)
108
+ if prefix is None:
109
+ if ct.is_atomic():
110
+ prefix = ct[0] + str(ct[1])
111
+ else:
112
+ prefix = repr(ct)
113
+ return super().__classcall__(cls, ct, base_ring=base_ring, prefix=prefix, style=style, k=k, conjugate=conjugate, cyclotomic_order=cyclotomic_order, fusion_labels=fusion_labels, inject_variables=inject_variables)
114
+
115
+ def __init__(self, ct, base_ring=ZZ, prefix=None, style='lattice', k=None, conjugate=False, cyclotomic_order=None, fusion_labels=None, inject_variables=False):
116
+ """
117
+ EXAMPLES::
118
+
119
+ sage: A2 = WeylCharacterRing("A2")
120
+ sage: TestSuite(A2).run()
121
+ """
122
+ ct = CartanType(ct)
123
+ self._cartan_type = ct
124
+ self._rank = ct.rank()
125
+ self._base_ring = base_ring
126
+ self._space = RootSystem(self._cartan_type).ambient_space()
127
+ self._origin = self._space.zero()
128
+ if prefix is None:
129
+ if ct.is_atomic():
130
+ prefix = ct[0] + str(ct[1])
131
+ else:
132
+ prefix = repr(ct)
133
+ self._prefix = prefix
134
+ self._style = style
135
+ self._fusion_labels = None
136
+ self._field = None
137
+ self._basecoer = None
138
+ self._k = k
139
+ if k is not None:
140
+ self._k = Integer(k)
141
+ if ct.is_irreducible():
142
+ self._opposition = ct.opposition_automorphism()
143
+ self._highest = self._space.highest_root()
144
+ self._hip = self._highest.inner_product(self._highest)
145
+ if style == "coroots":
146
+ self._word = self._space.weyl_group().long_element().reduced_word()
147
+
148
+ # Set the basis
149
+ if k is not None:
150
+ self._prefix += str(k)
151
+ fw = self._space.fundamental_weights()
152
+
153
+ def next_level(wt):
154
+ return [wt + la for la in fw if self.level(wt + la) <= k]
155
+ B = list(RecursivelyEnumeratedSet([self._space.zero()], next_level))
156
+ B = [self._space.from_vector_notation(wt, style='coroots') for wt in B]
157
+ else:
158
+ B = self._space
159
+
160
+ cat = AlgebrasWithBasis(base_ring).Commutative()
161
+ if k is None:
162
+ cat = cat.Subobjects().Graded()
163
+ else:
164
+ cat = cat.FiniteDimensional()
165
+ CombinatorialFreeModule.__init__(self, base_ring, B, category=cat)
166
+
167
+ # Register the embedding of self into ambient as a coercion
168
+ self.lift.register_as_coercion()
169
+ # Register the partial inverse as a conversion
170
+ self.register_conversion(self.retract)
171
+
172
+ # Record properties of the FusionRing
173
+ # mg = square of long to short root lengths
174
+ # nf = normalizing factor for the inner product
175
+ # fg = order of the fundamental group (except for Type B)
176
+ if k is not None:
177
+ if ct[0] in ['A', 'D', 'E']:
178
+ self._m_g = 1
179
+ elif ct[0] in ['B', 'C', 'F']:
180
+ self._m_g = 2
181
+ else:
182
+ self._m_g = 3
183
+ if ct[0] in ['B', 'F']:
184
+ self._nf = 2
185
+ else:
186
+ self._nf = 1
187
+ self._h_check = ct.dual_coxeter_number()
188
+ self._l = self._m_g * (self._k + self._h_check)
189
+ if conjugate:
190
+ self._conj = -1
191
+ else:
192
+ self._conj = 1
193
+ if ct[0] == 'A':
194
+ self._fg = ct[1] + 1
195
+ elif ct[0] == 'E' and ct[1] == 6:
196
+ self._fg = 3
197
+ elif ct[0] == 'E' and ct[1] == 7:
198
+ self._fg = 2
199
+ elif ct[0] == 'D':
200
+ self._fg = 2
201
+ else:
202
+ self._fg = 1
203
+ if cyclotomic_order is None:
204
+ self._cyclotomic_order = self._fg * self._l
205
+ else:
206
+ self._cyclotomic_order = cyclotomic_order
207
+ self._fusion_labels = fusion_labels
208
+ if fusion_labels:
209
+ self.fusion_labels(labels=fusion_labels, inject_variables=inject_variables)
210
+
211
+ @cached_method
212
+ def ambient(self):
213
+ """
214
+ Return the weight ring of ``self``.
215
+
216
+ EXAMPLES::
217
+
218
+ sage: WeylCharacterRing("A2").ambient()
219
+ The Weight ring attached to The Weyl Character Ring of Type A2 with Integer Ring coefficients
220
+ """
221
+ return WeightRing(self)
222
+
223
+ # Eventually, one could want to put the cache_method here rather
224
+ # than on _irr_weights. Or just to merge this method and _irr_weights
225
+ def lift_on_basis(self, irr):
226
+ """
227
+ Expand the basis element indexed by the weight ``irr`` into the
228
+ weight ring of ``self``.
229
+
230
+ INPUT:
231
+
232
+ - ``irr`` -- a dominant weight
233
+
234
+ This is used to implement :meth:`lift`.
235
+
236
+ EXAMPLES::
237
+
238
+ sage: A2 = WeylCharacterRing("A2")
239
+ sage: v = A2._space([2,1,0]); v
240
+ (2, 1, 0)
241
+ sage: A2.lift_on_basis(v)
242
+ 2*a2(1,1,1) + a2(1,2,0) + a2(1,0,2) + a2(2,1,0) + a2(2,0,1) + a2(0,1,2) + a2(0,2,1)
243
+
244
+ This is consistent with the analogous calculation with symmetric
245
+ Schur functions::
246
+
247
+ sage: s = SymmetricFunctions(QQ).s()
248
+ sage: s[2,1].expand(3)
249
+ x0^2*x1 + x0*x1^2 + x0^2*x2 + 2*x0*x1*x2 + x1^2*x2 + x0*x2^2 + x1*x2^2
250
+ """
251
+ return self.ambient()._from_dict(self._irr_weights(irr))
252
+
253
+ def demazure_character(self, hwv, word, debug=False):
254
+ r"""
255
+ Compute the Demazure character.
256
+
257
+ INPUT:
258
+
259
+ - ``hwv`` -- a (usually dominant) weight
260
+ - ``word`` -- a Weyl group word
261
+
262
+ Produces the Demazure character with highest weight ``hwv`` and
263
+ ``word`` as an element of the weight ring. Only available if
264
+ ``style="coroots"``. The Demazure operators are also available as
265
+ methods of :class:`WeightRing` elements, and as methods of crystals.
266
+ Given a
267
+ :class:`~sage.combinat.crystals.tensor_product.CrystalOfTableaux`
268
+ with given highest weight vector, the Demazure method on the
269
+ crystal will give the equivalent of this method, except that
270
+ the Demazure character of the crystal is given as a sum of
271
+ monomials instead of an element of the :class:`WeightRing`.
272
+
273
+ See :meth:`WeightRing.Element.demazure` and
274
+ :meth:`sage.categories.classical_crystals.ClassicalCrystals.ParentMethods.demazure_character`
275
+
276
+ EXAMPLES::
277
+
278
+ sage: A2 = WeylCharacterRing("A2",style='coroots')
279
+ sage: h = sum(A2.fundamental_weights()); h
280
+ (2, 1, 0)
281
+ sage: A2.demazure_character(h,word=[1,2])
282
+ a2(0,0) + a2(-2,1) + a2(2,-1) + a2(1,1) + a2(-1,2)
283
+ sage: A2.demazure_character((1,1),word=[1,2])
284
+ a2(0,0) + a2(-2,1) + a2(2,-1) + a2(1,1) + a2(-1,2)
285
+ """
286
+ if self._style != "coroots":
287
+ raise ValueError('demazure method unavailable: use style="coroots"')
288
+ hwv = self._space.from_vector_notation(hwv, style='coroots')
289
+ return self.ambient()._from_dict(self._demazure_weights(hwv, word=word, debug=debug))
290
+
291
+ @lazy_attribute
292
+ def lift(self):
293
+ """
294
+ The embedding of ``self`` into its weight ring.
295
+
296
+ EXAMPLES::
297
+
298
+ sage: A2 = WeylCharacterRing("A2")
299
+ sage: A2.lift
300
+ Generic morphism:
301
+ From: The Weyl Character Ring of Type A2 with Integer Ring coefficients
302
+ To: The Weight ring attached to The Weyl Character Ring of Type A2 with Integer Ring coefficients
303
+
304
+ ::
305
+
306
+ sage: x = -A2(2,1,1) - A2(2,2,0) + A2(3,1,0)
307
+ sage: A2.lift(x)
308
+ a2(1,3,0) + a2(1,0,3) + a2(3,1,0) + a2(3,0,1) + a2(0,1,3) + a2(0,3,1)
309
+
310
+ As a shortcut, you may also do::
311
+
312
+ sage: x.lift()
313
+ a2(1,3,0) + a2(1,0,3) + a2(3,1,0) + a2(3,0,1) + a2(0,1,3) + a2(0,3,1)
314
+
315
+ Or even::
316
+
317
+ sage: a2 = WeightRing(A2)
318
+ sage: a2(x)
319
+ a2(1,3,0) + a2(1,0,3) + a2(3,1,0) + a2(3,0,1) + a2(0,1,3) + a2(0,3,1)
320
+ """
321
+ return self.module_morphism(self.lift_on_basis,
322
+ codomain=self.ambient(),
323
+ category=AlgebrasWithBasis(self.base_ring()))
324
+
325
+ def _retract(self, chi):
326
+ """
327
+ Construct a Weyl character from an invariant element of the weight ring.
328
+
329
+ INPUT:
330
+
331
+ - ``chi`` -- a linear combination of weights which
332
+ shall be invariant under the action of the Weyl group
333
+
334
+ OUTPUT: the corresponding Weyl character
335
+
336
+ Please use instead the morphism :meth:`retract` which is
337
+ implemented using this method.
338
+
339
+ EXAMPLES::
340
+
341
+ sage: A2 = WeylCharacterRing("A2")
342
+ sage: a2 = WeightRing(A2)
343
+
344
+ ::
345
+
346
+ sage: v = A2._space([3,1,0]); v
347
+ (3, 1, 0)
348
+ sage: chi = a2.sum_of_monomials(v.orbit()); chi
349
+ a2(1,3,0) + a2(1,0,3) + a2(3,1,0) + a2(3,0,1) + a2(0,1,3) + a2(0,3,1)
350
+ sage: A2._retract(chi)
351
+ -A2(2,1,1) - A2(2,2,0) + A2(3,1,0)
352
+ """
353
+ return self.char_from_weights(dict(chi))
354
+
355
+ @lazy_attribute
356
+ def retract(self):
357
+ """
358
+ The partial inverse map from the weight ring into ``self``.
359
+
360
+ EXAMPLES::
361
+
362
+ sage: A2 = WeylCharacterRing("A2")
363
+ sage: a2 = WeightRing(A2)
364
+ sage: A2.retract
365
+ Generic morphism:
366
+ From: The Weight ring attached to The Weyl Character Ring of Type A2 with Integer Ring coefficients
367
+ To: The Weyl Character Ring of Type A2 with Integer Ring coefficients
368
+
369
+ ::
370
+
371
+ sage: v = A2._space([3,1,0]); v
372
+ (3, 1, 0)
373
+ sage: chi = a2.sum_of_monomials(v.orbit()); chi
374
+ a2(1,3,0) + a2(1,0,3) + a2(3,1,0) + a2(3,0,1) + a2(0,1,3) + a2(0,3,1)
375
+ sage: A2.retract(chi)
376
+ -A2(2,1,1) - A2(2,2,0) + A2(3,1,0)
377
+
378
+ The input should be invariant::
379
+
380
+ sage: A2.retract(a2.monomial(v))
381
+ Traceback (most recent call last):
382
+ ...
383
+ ValueError: multiplicity dictionary may not be Weyl group invariant
384
+
385
+ As a shortcut, you may use conversion::
386
+
387
+ sage: A2(chi)
388
+ -A2(2,1,1) - A2(2,2,0) + A2(3,1,0)
389
+ sage: A2(a2.monomial(v))
390
+ Traceback (most recent call last):
391
+ ...
392
+ ValueError: multiplicity dictionary may not be Weyl group invariant
393
+ """
394
+ from sage.categories.homset import Hom
395
+ from sage.categories.morphism import SetMorphism
396
+ category = Algebras(self.base_ring())
397
+ return SetMorphism(Hom(self.ambient(), self, category), self._retract)
398
+
399
+ def _repr_(self):
400
+ """
401
+ EXAMPLES::
402
+
403
+ sage: WeylCharacterRing("A3")
404
+ The Weyl Character Ring of Type A3 with Integer Ring coefficients
405
+ """
406
+ if self._k is None:
407
+ return "The Weyl Character Ring of Type {} with {} coefficients".format(self._cartan_type._repr_(compact=True), self._base_ring)
408
+ else:
409
+ return "The Fusion Ring of Type {} and level {} with {} coefficients".format(self._cartan_type._repr_(compact=True), self._k, self._base_ring)
410
+
411
+ def __call__(self, *args):
412
+ """
413
+ Construct an element of ``self``.
414
+
415
+ The input can either be an object that can be coerced or
416
+ converted into ``self`` (an element of ``self``, of the base
417
+ ring, of the weight ring), or a dominant weight. In the later
418
+ case, the basis element indexed by that weight is returned.
419
+
420
+ To specify the weight, you may give it explicitly. Alternatively,
421
+ you may give a tuple of integers. Normally these are the
422
+ components of the vector in the standard realization of
423
+ the weight lattice as a vector space. Alternatively, if
424
+ the ring is constructed with ``style = "coroots"``, you may
425
+ specify the weight by giving a set of integers, one for each
426
+ fundamental weight; the weight is then the linear combination
427
+ of the fundamental weights with these coefficients.
428
+
429
+ As a syntactical shorthand, for tuples of length at least two,
430
+ the parenthesis may be omitted.
431
+
432
+ EXAMPLES::
433
+
434
+ sage: A2 = WeylCharacterRing("A2")
435
+ sage: [A2(x) for x in [-2,-1,0,1,2]]
436
+ [-2*A2(0,0,0), -A2(0,0,0), 0, A2(0,0,0), 2*A2(0,0,0)]
437
+ sage: [A2(2,1,0), A2([2,1,0]), A2(2,1,0)== A2([2,1,0])]
438
+ [A2(2,1,0), A2(2,1,0), True]
439
+ sage: A2([2,1,0]) == A2(2,1,0)
440
+ True
441
+ sage: l = -2*A2(0,0,0) - A2(1,0,0) + A2(2,0,0) + 2*A2(3,0,0)
442
+ sage: [l in A2, A2(l) == l]
443
+ [True, True]
444
+ sage: P.<q> = QQ[]
445
+ sage: A2 = WeylCharacterRing(['A',2], base_ring = P)
446
+ sage: [A2(x) for x in [-2,-1,0,1,2,-2*q,-q,q,2*q,(1-q)]]
447
+ [-2*A2(0,0,0), -A2(0,0,0), 0, A2(0,0,0), 2*A2(0,0,0), -2*q*A2(0,0,0), -q*A2(0,0,0),
448
+ q*A2(0,0,0), 2*q*A2(0,0,0), (-q+1)*A2(0,0,0)]
449
+ sage: R.<q> = ZZ[]
450
+ sage: A2 = WeylCharacterRing(['A',2], base_ring = R, style='coroots')
451
+ sage: q*A2(1)
452
+ q*A2(0,0)
453
+ sage: [A2(x) for x in [-2,-1,0,1,2,-2*q,-q,q,2*q,(1-q)]]
454
+ [-2*A2(0,0), -A2(0,0), 0, A2(0,0), 2*A2(0,0), -2*q*A2(0,0), -q*A2(0,0), q*A2(0,0), 2*q*A2(0,0), (-q+1)*A2(0,0)]
455
+ """
456
+ # The purpose of this __call__ method is only to handle the
457
+ # syntactical shorthand; otherwise it just delegates the work
458
+ # to the coercion model, which itself will call
459
+ # _element_constructor_ if the input is made of exactly one
460
+ # object which can't be coerced into self
461
+ if len(args) > 1:
462
+ args = (args,)
463
+ return super().__call__(*args)
464
+
465
+ def _element_constructor_(self, weight):
466
+ """
467
+ Construct a monomial from a dominant weight.
468
+
469
+ INPUT:
470
+
471
+ - ``weight`` -- an element of the weight space, or a tuple
472
+
473
+ This method is responsible for constructing an appropriate
474
+ dominant weight from ``weight``, and then return the monomial
475
+ indexed by that weight. See :meth:`__call__` and
476
+ :meth:`sage.combinat.root_system.ambient_space.AmbientSpace.from_vector`.
477
+
478
+ TESTS::
479
+
480
+ sage: A2 = WeylCharacterRing("A2")
481
+ sage: A2._element_constructor_([2,1,0])
482
+ A2(2,1,0)
483
+ """
484
+ weight = self._space.from_vector_notation(weight, style=self._style)
485
+ if not weight.is_dominant_weight():
486
+ raise ValueError("{} is not a dominant element of the weight lattice".format(weight))
487
+ if self._k is not None:
488
+ if self.level(weight) > self._k:
489
+ raise ValueError("{} has level greater than {}".format(weight, self._k))
490
+ return self.monomial(weight)
491
+
492
+ def product_on_basis(self, a, b):
493
+ r"""
494
+ Compute the tensor product of two irreducible representations ``a``
495
+ and ``b``.
496
+
497
+ EXAMPLES::
498
+
499
+ sage: D4 = WeylCharacterRing(['D',4])
500
+ sage: spin_plus = D4(1/2,1/2,1/2,1/2)
501
+ sage: spin_minus = D4(1/2,1/2,1/2,-1/2)
502
+ sage: spin_plus * spin_minus # indirect doctest
503
+ D4(1,0,0,0) + D4(1,1,1,0)
504
+ sage: spin_minus * spin_plus
505
+ D4(1,0,0,0) + D4(1,1,1,0)
506
+
507
+ Uses the Brauer-Klimyk method.
508
+ """
509
+ # The method is asymmetrical, and as a rule of thumb
510
+ # it is fastest to switch the factors so that the
511
+ # smaller character is the one that is decomposed
512
+ # into weights.
513
+ if sum(a.coefficients()) > sum(b.coefficients()):
514
+ a, b = b, a
515
+ return self._product_helper(self._irr_weights(a), b)
516
+
517
+ def _product_helper(self, d1, b):
518
+ """
519
+ Helper function for :meth:`product_on_basis`.
520
+
521
+ INPUT:
522
+
523
+ - ``d1`` -- dictionary of weight multiplicities
524
+ - ``b`` -- a dominant weight
525
+
526
+ If ``d1`` is the dictionary of weight multiplicities of a character,
527
+ returns the product of that character by the irreducible character
528
+ with highest weight ``b``.
529
+
530
+ EXAMPLES::
531
+
532
+ sage: A2 = WeylCharacterRing("A2")
533
+ sage: r = A2(1,0,0)
534
+ sage: [A2._product_helper(r.weight_multiplicities(),x) for x in A2.space().fundamental_weights()]
535
+ [A2(1,1,0) + A2(2,0,0), A2(1,1,1) + A2(2,1,0)]
536
+ """
537
+ d = {}
538
+ for k in d1:
539
+ [epsilon, g] = self.dot_reduce(b + k)
540
+ if epsilon == 1:
541
+ d[g] = d.get(g, 0) + d1[k]
542
+ elif epsilon == -1:
543
+ d[g] = d.get(g, 0) - d1[k]
544
+ return self._from_dict(d, coerce=True)
545
+
546
+ def dot_reduce(self, a):
547
+ r"""
548
+ Auxiliary function for :meth:`product_on_basis`.
549
+
550
+ Return a pair `[\epsilon, b]` where `b` is a dominant weight and
551
+ `\epsilon` is 0, 1 or -1. To describe `b`, let `w` be an element of
552
+ the Weyl group such that `w(a + \rho)` is dominant. If
553
+ `w(a + \rho) - \rho` is dominant, then `\epsilon` is the sign of
554
+ `w` and `b` is `w(a + \rho) - \rho`. Otherwise, `\epsilon` is zero.
555
+
556
+ INPUT:
557
+
558
+ - ``a`` -- a weight
559
+
560
+ EXAMPLES::
561
+
562
+ sage: A2 = WeylCharacterRing("A2")
563
+ sage: weights = sorted(A2(2,1,0).weight_multiplicities().keys(), key=str); weights
564
+ [(0, 1, 2), (0, 2, 1), (1, 0, 2), (1, 1, 1), (1, 2, 0), (2, 0, 1), (2, 1, 0)]
565
+ sage: [A2.dot_reduce(x) for x in weights]
566
+ [[0, (0, 0, 0)], [-1, (1, 1, 1)], [-1, (1, 1, 1)], [1, (1, 1, 1)], [0, (0, 0, 0)], [0, (0, 0, 0)], [1, (2, 1, 0)]]
567
+ """
568
+ alphacheck = self._space.simple_coroots()
569
+ alpha = self._space.simple_roots()
570
+ [epsilon, ret] = [1, a]
571
+ done = False
572
+ while not done:
573
+ done = True
574
+ for i in self._space.index_set():
575
+ c = ret.inner_product(alphacheck[i])
576
+ if c == -1:
577
+ return [0, self._space.zero()]
578
+ elif c < -1:
579
+ epsilon = -epsilon
580
+ ret -= (1 + c) * alpha[i]
581
+ done = False
582
+ break
583
+ if self._k is not None:
584
+ l = self.level(ret)
585
+ k = self._k
586
+ if l > k:
587
+ if l == k + 1:
588
+ return [0, self._space.zero()]
589
+ else:
590
+ epsilon = -epsilon
591
+ ret = self.affine_reflect(ret, k + 1)
592
+ done = False
593
+ return [epsilon, ret]
594
+
595
+ def affine_reflect(self, wt, k=0):
596
+ r"""
597
+ Return the reflection of wt in the hyperplane `\theta`.
598
+
599
+ Optionally, this also shifts by a multiple `k` of `\theta`.
600
+
601
+ INPUT:
602
+
603
+ - ``wt`` -- a weight
604
+ - ``k`` -- (optional) a positive integer
605
+
606
+ EXAMPLES::
607
+
608
+ sage: B22 = FusionRing("B2",2)
609
+ sage: fw = B22.fundamental_weights(); fw
610
+ Finite family {1: (1, 0), 2: (1/2, 1/2)}
611
+ sage: [B22.affine_reflect(x,2) for x in fw]
612
+ [(2, 1), (3/2, 3/2)]
613
+ """
614
+ coef = ZZ(2 * wt.inner_product(self._highest) / self._hip)
615
+ return wt + (k - coef) * self._highest
616
+
617
+ def some_elements(self):
618
+ """
619
+ Return some elements of ``self``.
620
+
621
+ EXAMPLES::
622
+
623
+ sage: WeylCharacterRing("A3").some_elements()
624
+ [A3(1,0,0,0), A3(1,1,0,0), A3(1,1,1,0)]
625
+ """
626
+ return [self.monomial(x) for x in self.fundamental_weights()]
627
+
628
+ def one_basis(self):
629
+ """
630
+ Return the index of 1 in ``self``.
631
+
632
+ EXAMPLES::
633
+
634
+ sage: WeylCharacterRing("A3").one_basis()
635
+ (0, 0, 0, 0)
636
+ sage: WeylCharacterRing("A3").one()
637
+ A3(0,0,0,0)
638
+ """
639
+ return self._space.zero()
640
+
641
+ @cached_method
642
+ def _irr_weights(self, hwv):
643
+ """
644
+ Compute the weights of an irreducible as a dictionary.
645
+
646
+ Given a dominant weight ``hwv``, this produces a dictionary of
647
+ weight multiplicities for the irreducible representation
648
+ with highest weight vector ``hwv``. This method is cached
649
+ for efficiency.
650
+
651
+ INPUT:
652
+
653
+ - ``hwv`` -- a dominant weight
654
+
655
+ EXAMPLES::
656
+
657
+ sage: A2 = WeylCharacterRing("A2")
658
+ sage: v = A2.fundamental_weights()[1]; v
659
+ (1, 0, 0)
660
+ sage: A2._irr_weights(v)
661
+ {(1, 0, 0): 1, (0, 1, 0): 1, (0, 0, 1): 1}
662
+ """
663
+ if self._style == "coroots":
664
+ return self._demazure_weights(hwv)
665
+ else:
666
+ return irreducible_character_freudenthal(hwv)
667
+
668
+ def _demazure_weights(self, hwv, word='long', debug=False):
669
+ """
670
+ Compute the weights of a Demazure character.
671
+
672
+ This method duplicates the functionality of :meth:`_irr_weights`, under
673
+ the assumption that ``style = "coroots"``, but allows an optional
674
+ parameter ``word``. (This is not allowed in :meth:`_irr_weights` since
675
+ it would interfere with the ``@cached_method``.) Produces the
676
+ dictionary of weights for the irreducible character with highest
677
+ weight ``hwv`` when ``word`` is omitted, or for the Demazure character
678
+ if ``word`` is included.
679
+
680
+ INPUT:
681
+
682
+ - ``hwv`` -- a dominant weight
683
+
684
+ EXAMPLES::
685
+
686
+ sage: B2 = WeylCharacterRing("B2", style='coroots')
687
+ sage: [B2._demazure_weights(v, word=[1,2]) for v in B2.fundamental_weights()]
688
+ [{(1, 0): 1, (0, 1): 1}, {(-1/2, 1/2): 1, (1/2, -1/2): 1, (1/2, 1/2): 1}]
689
+ """
690
+ alphacheck = self._space.simple_coroots()
691
+ dd = {}
692
+ h = tuple(int(hwv.inner_product(alphacheck[j]))
693
+ for j in self._space.index_set())
694
+ dd[h] = 1
695
+ return self._demazure_helper(dd, word=word, debug=debug)
696
+
697
+ def _demazure_helper(self, dd, word='long', debug=False):
698
+ r"""
699
+ Assumes ``style = "coroots"``. If the optional parameter ``word`` is
700
+ specified, produces a Demazure character (defaults to the long Weyl
701
+ group element.
702
+
703
+ INPUT:
704
+
705
+ - ``dd`` -- dictionary of weights
706
+
707
+ - ``word`` -- (optional) a Weyl group reduced word
708
+
709
+ EXAMPLES::
710
+
711
+ sage: A2 = WeylCharacterRing("A2",style='coroots')
712
+ sage: dd = {}; dd[(1,1)]=int(1)
713
+ sage: A2._demazure_helper(dd,word=[1,2])
714
+ {(0, 0, 0): 1, (-1, 1, 0): 1, (1, -1, 0): 1, (1, 0, -1): 1, (0, 1, -1): 1}
715
+ """
716
+ if self._style != "coroots":
717
+ raise ValueError('_demazure_helper method unavailable: use style="coroots"')
718
+ index_set = self._space.index_set()
719
+ alphacheck = self._space.simple_coroots()
720
+ alpha = self._space.simple_roots()
721
+ r = self.rank()
722
+ cm = {}
723
+ supp = []
724
+ for i in index_set:
725
+ temp = []
726
+ cm[i] = [0] * r
727
+ for ind, j in enumerate(index_set):
728
+ cm[i][ind] = int(alpha[i].inner_product(alphacheck[j]))
729
+ if cm[i][ind]:
730
+ temp.append(ind)
731
+ supp.append(temp)
732
+ if debug:
733
+ print("cm[%s]=%s" % (i, cm[i]))
734
+ accum = dd
735
+ if word == "long":
736
+ word = self._word
737
+ for i in reversed(word):
738
+ if debug:
739
+ print("i=%s" % i)
740
+ next = {}
741
+ for v in accum:
742
+ coroot = v[i - 1]
743
+ if debug:
744
+ print(" v=%s, coroot=%s" % (v, coroot))
745
+ if coroot >= 0:
746
+ mu = v
747
+ for j in range(coroot + 1):
748
+ next[mu] = next.get(mu, 0) + accum[v]
749
+ if debug:
750
+ print(" mu=%s, next[mu]=%s" % (mu, next[mu]))
751
+ mu = list(mu)
752
+ for k in supp[i - 1]:
753
+ mu[k] -= cm[i][k]
754
+ mu = tuple(mu)
755
+ else:
756
+ mu = v
757
+ for j in range(-1 - coroot):
758
+ mu = list(mu)
759
+ for k in supp[i - 1]:
760
+ mu[k] += cm[i][k]
761
+ mu = tuple(mu)
762
+ next[mu] = next.get(mu, 0) - accum[v]
763
+ if debug:
764
+ print(" mu=%s, next[mu]=%s" % (mu, next[mu]))
765
+ accum = dict(next)
766
+ return {self._space.from_vector_notation(v, style='coroots'): val
767
+ for v, val in accum.items() if val}
768
+
769
+ @cached_method
770
+ def _weight_multiplicities(self, x):
771
+ """
772
+ Produce weight multiplicities for the (possibly reducible)
773
+ WeylCharacter ``x``.
774
+
775
+ EXAMPLES::
776
+
777
+ sage: B2 = WeylCharacterRing("B2",style='coroots')
778
+ sage: chi = 2*B2(1,0)
779
+ sage: B2._weight_multiplicities(chi)
780
+ {(0, 0): 2, (-1, 0): 2, (1, 0): 2, (0, -1): 2, (0, 1): 2}
781
+ """
782
+ d = {}
783
+ m = x._monomial_coefficients
784
+ for k in m:
785
+ c = m[k]
786
+ d1 = self._irr_weights(k)
787
+ for l in d1:
788
+ if l in d:
789
+ d[l] += c * d1[l]
790
+ else:
791
+ d[l] = c * d1[l]
792
+ for k in list(d):
793
+ if d[k] == 0:
794
+ del d[k]
795
+ else:
796
+ d[k] = self._base_ring(d[k])
797
+ return d
798
+
799
+ def base_ring(self):
800
+ """
801
+ Return the base ring of ``self``.
802
+
803
+ EXAMPLES::
804
+
805
+ sage: R = WeylCharacterRing(['A',3], base_ring = CC); R.base_ring()
806
+ Complex Field with 53 bits of precision
807
+ """
808
+ return self._base_ring
809
+
810
+ def irr_repr(self, hwv):
811
+ """
812
+ Return a string representing the irreducible character with highest
813
+ weight vector ``hwv``.
814
+
815
+ EXAMPLES::
816
+
817
+ sage: B3 = WeylCharacterRing("B3")
818
+ sage: [B3.irr_repr(v) for v in B3.fundamental_weights()]
819
+ ['B3(1,0,0)', 'B3(1,1,0)', 'B3(1/2,1/2,1/2)']
820
+ sage: B3 = WeylCharacterRing("B3", style='coroots')
821
+ sage: [B3.irr_repr(v) for v in B3.fundamental_weights()]
822
+ ['B3(1,0,0)', 'B3(0,1,0)', 'B3(0,0,1)']
823
+ """
824
+ return self._prefix + self._wt_repr(hwv)
825
+
826
+ def level(self, wt):
827
+ """
828
+ Return the level of the weight, defined to be the value of
829
+ the weight on the coroot associated with the highest root.
830
+
831
+ EXAMPLES::
832
+
833
+ sage: R = FusionRing("F4",2); [R.level(x) for x in R.fundamental_weights()]
834
+ [2, 3, 2, 1]
835
+ sage: [CartanType("F4~").dual().a()[x] for x in [1..4]]
836
+ [2, 3, 2, 1]
837
+ """
838
+ return ZZ(2 * wt.inner_product(self._highest) / self._hip)
839
+
840
+ def _dual_helper(self, wt):
841
+ """
842
+ If `w_0` is the long Weyl group element and `wt` is an
843
+ element of the weight lattice, this returns `-w_0(wt)`.
844
+
845
+ EXAMPLES::
846
+
847
+ sage: A3=WeylCharacterRing("A3")
848
+ sage: [A3._dual_helper(x) for x in A3.fundamental_weights()]
849
+ [(0, 0, 0, -1), (0, 0, -1, -1), (0, -1, -1, -1)]
850
+ """
851
+ if self.cartan_type()[0] == 'A': # handled separately for GL(n) compatibility
852
+ return self.space()([-x for x in reversed(wt.to_vector().list())])
853
+ ret = 0
854
+ alphacheck = self._space.simple_coroots()
855
+ fw = self._space.fundamental_weights()
856
+ for i in self._space.index_set():
857
+ ret += wt.inner_product(alphacheck[i]) * fw[self._opposition[i]]
858
+ return ret
859
+
860
+ def _wt_repr(self, wt):
861
+ """
862
+ Produce a representation of a vector in either coweight or
863
+ lattice notation (following the appendices in Bourbaki, Lie Groups and
864
+ Lie Algebras, Chapters 4,5,6), depending on whether the parent
865
+ :class:`WeylCharacterRing` is created with ``style="coweights"``
866
+ or not.
867
+
868
+ EXAMPLES::
869
+
870
+ sage: [fw1,fw2]=RootSystem("G2").ambient_space().fundamental_weights(); fw1,fw2
871
+ ((1, 0, -1), (2, -1, -1))
872
+ sage: [WeylCharacterRing("G2")._wt_repr(v) for v in [fw1,fw2]]
873
+ ['(1,0,-1)', '(2,-1,-1)']
874
+ sage: [WeylCharacterRing("G2",style='coroots')._wt_repr(v) for v in [fw1,fw2]]
875
+ ['(1,0)', '(0,1)']
876
+ """
877
+ if self._style == "lattice":
878
+ vec = wt.to_vector()
879
+ elif self._style == "coroots":
880
+ vec = [wt.inner_product(x) for x in self.simple_coroots()]
881
+ else:
882
+ raise ValueError("unknown style")
883
+ hstring = str(vec[0])
884
+ for i in range(1, len(vec)):
885
+ hstring = hstring + "," + str(vec[i])
886
+ return "(" + hstring + ")"
887
+
888
+ def _repr_term(self, t):
889
+ """
890
+ Representation of the monomial corresponding to a weight ``t``.
891
+
892
+ EXAMPLES::
893
+
894
+ sage: G2 = WeylCharacterRing("G2") # indirect doctest
895
+ sage: [G2._repr_term(x) for x in G2.fundamental_weights()]
896
+ ['G2(1,0,-1)', 'G2(2,-1,-1)']
897
+ """
898
+ if self._fusion_labels is not None:
899
+ t = tuple([t.inner_product(x) for x in self.simple_coroots()])
900
+ return self._fusion_labels[t]
901
+ else:
902
+ return self.irr_repr(t)
903
+
904
+ def cartan_type(self):
905
+ """
906
+ Return the Cartan type of ``self``.
907
+
908
+ EXAMPLES::
909
+
910
+ sage: WeylCharacterRing("A2").cartan_type()
911
+ ['A', 2]
912
+ """
913
+ return self._cartan_type
914
+
915
+ def fundamental_weights(self):
916
+ """
917
+ Return the fundamental weights.
918
+
919
+ EXAMPLES::
920
+
921
+ sage: WeylCharacterRing("G2").fundamental_weights()
922
+ Finite family {1: (1, 0, -1), 2: (2, -1, -1)}
923
+ """
924
+ return self._space.fundamental_weights()
925
+
926
+ def simple_roots(self):
927
+ """
928
+ Return the simple roots.
929
+
930
+ EXAMPLES::
931
+
932
+ sage: WeylCharacterRing("G2").simple_roots()
933
+ Finite family {1: (0, 1, -1), 2: (1, -2, 1)}
934
+ """
935
+ return self._space.simple_roots()
936
+
937
+ def simple_coroots(self):
938
+ """
939
+ Return the simple coroots.
940
+
941
+ EXAMPLES::
942
+
943
+ sage: WeylCharacterRing("G2").simple_coroots()
944
+ Finite family {1: (0, 1, -1), 2: (1/3, -2/3, 1/3)}
945
+ """
946
+ return self._space.simple_coroots()
947
+
948
+ def highest_root(self):
949
+ """
950
+ Return the highest root.
951
+
952
+ EXAMPLES::
953
+
954
+ sage: WeylCharacterRing("G2").highest_root()
955
+ (2, -1, -1)
956
+ """
957
+ return self._space.highest_root()
958
+
959
+ def positive_roots(self):
960
+ """
961
+ Return the positive roots.
962
+
963
+ EXAMPLES::
964
+
965
+ sage: WeylCharacterRing("G2").positive_roots()
966
+ [(0, 1, -1), (1, -2, 1), (1, -1, 0), (1, 0, -1), (1, 1, -2), (2, -1, -1)]
967
+ """
968
+ return self._space.positive_roots()
969
+
970
+ def dynkin_diagram(self):
971
+ """
972
+ Return the Dynkin diagram of ``self``.
973
+
974
+ EXAMPLES::
975
+
976
+ sage: WeylCharacterRing("E7").dynkin_diagram()
977
+ O 2
978
+ |
979
+ |
980
+ O---O---O---O---O---O
981
+ 1 3 4 5 6 7
982
+ E7
983
+ """
984
+ return self.space().dynkin_diagram()
985
+
986
+ def extended_dynkin_diagram(self):
987
+ """
988
+ Return the extended Dynkin diagram, which is the Dynkin diagram
989
+ of the corresponding untwisted affine type.
990
+
991
+ EXAMPLES::
992
+
993
+ sage: WeylCharacterRing("E7").extended_dynkin_diagram()
994
+ O 2
995
+ |
996
+ |
997
+ O---O---O---O---O---O---O
998
+ 0 1 3 4 5 6 7
999
+ E7~
1000
+ """
1001
+ return self.cartan_type().affine().dynkin_diagram()
1002
+
1003
+ def rank(self):
1004
+ """
1005
+ Return the rank.
1006
+
1007
+ EXAMPLES::
1008
+
1009
+ sage: WeylCharacterRing("G2").rank()
1010
+ 2
1011
+ """
1012
+ return self._rank
1013
+
1014
+ def space(self):
1015
+ """
1016
+ Return the weight space associated to ``self``.
1017
+
1018
+ EXAMPLES::
1019
+
1020
+ sage: WeylCharacterRing(['E',8]).space()
1021
+ Ambient space of the Root system of type ['E', 8]
1022
+ """
1023
+ return self._space
1024
+
1025
+ def char_from_weights(self, mdict):
1026
+ """
1027
+ Construct a Weyl character from an invariant linear combination
1028
+ of weights.
1029
+
1030
+ INPUT:
1031
+
1032
+ - ``mdict`` -- dictionary mapping weights to coefficients,
1033
+ and representing a linear combination of weights which
1034
+ shall be invariant under the action of the Weyl group
1035
+
1036
+ OUTPUT: the corresponding Weyl character
1037
+
1038
+ EXAMPLES::
1039
+
1040
+ sage: A2 = WeylCharacterRing("A2")
1041
+ sage: v = A2._space([3,1,0]); v
1042
+ (3, 1, 0)
1043
+ sage: d = dict([(x,1) for x in v.orbit()]); d
1044
+ {(1, 3, 0): 1,
1045
+ (1, 0, 3): 1,
1046
+ (3, 1, 0): 1,
1047
+ (3, 0, 1): 1,
1048
+ (0, 1, 3): 1,
1049
+ (0, 3, 1): 1}
1050
+ sage: A2.char_from_weights(d)
1051
+ -A2(2,1,1) - A2(2,2,0) + A2(3,1,0)
1052
+ """
1053
+ return self._from_dict(self._char_from_weights(mdict), coerce=True)
1054
+
1055
+ def _char_from_weights(self, mdict):
1056
+ """
1057
+ Helper method for :meth:`char_from_weights`.
1058
+
1059
+ INPUT:
1060
+
1061
+ - ``mdict`` -- dictionary of weight multiplicities
1062
+
1063
+ The output of this method is a dictionary whose keys are dominant
1064
+ weights that is the same as the :meth:`monomial_coefficients` method
1065
+ of ``self.char_from_weights()``.
1066
+
1067
+ EXAMPLES::
1068
+
1069
+ sage: A2 = WeylCharacterRing("A2")
1070
+ sage: v = A2._space([3,1,0])
1071
+ sage: d = dict([(x,1) for x in v.orbit()])
1072
+ sage: A2._char_from_weights(d)
1073
+ {(2, 1, 1): -1, (2, 2, 0): -1, (3, 1, 0): 1}
1074
+ """
1075
+ hdict = {}
1076
+ ddict = mdict.copy()
1077
+ while ddict:
1078
+ highest = max((x.inner_product(self._space.rho()), x) for x in ddict)[1]
1079
+ if not highest.is_dominant():
1080
+ raise ValueError("multiplicity dictionary may not be Weyl group invariant")
1081
+ sdict = self._irr_weights(highest)
1082
+ c = ddict[highest]
1083
+ if highest in hdict:
1084
+ hdict[highest] += c
1085
+ else:
1086
+ hdict[highest] = c
1087
+ for k in sdict:
1088
+ if k in ddict:
1089
+ if ddict[k] == c*sdict[k]:
1090
+ del ddict[k]
1091
+ else:
1092
+ ddict[k] = ddict[k]-c*sdict[k]
1093
+ else:
1094
+ ddict[k] = -c*sdict[k]
1095
+ return hdict
1096
+
1097
+ def adjoint_representation(self):
1098
+ """
1099
+ Return the adjoint representation as an element of the WeylCharacterRing.
1100
+
1101
+ EXAMPLES::
1102
+
1103
+ sage: G2 = WeylCharacterRing("G2",style='coroots')
1104
+ sage: G2.adjoint_representation()
1105
+ G2(0,1)
1106
+ """
1107
+ return self(self.highest_root())
1108
+
1109
+ def maximal_subgroups(self):
1110
+ r"""
1111
+ This method is only available if the Cartan type of
1112
+ ``self`` is irreducible and of rank no greater than 8.
1113
+ This method produces a list of the maximal subgroups
1114
+ of ``self``, up to (possibly outer) automorphisms. Each line
1115
+ in the output gives the Cartan type of a maximal subgroup
1116
+ followed by a command that creates the branching rule.
1117
+
1118
+ EXAMPLES::
1119
+
1120
+ sage: WeylCharacterRing("E6").maximal_subgroups()
1121
+ D5:branching_rule("E6","D5","levi")
1122
+ C4:branching_rule("E6","C4","symmetric")
1123
+ F4:branching_rule("E6","F4","symmetric")
1124
+ A2:branching_rule("E6","A2","miscellaneous")
1125
+ G2:branching_rule("E6","G2","miscellaneous")
1126
+ A2xG2:branching_rule("E6","A2xG2","miscellaneous")
1127
+ A1xA5:branching_rule("E6","A1xA5","extended")
1128
+ A2xA2xA2:branching_rule("E6","A2xA2xA2","extended")
1129
+
1130
+ Note that there are other embeddings of (for example
1131
+ `A_2` into `E_6` as nonmaximal subgroups. These
1132
+ embeddings may be constructed by composing branching
1133
+ rules through various subgroups.
1134
+
1135
+ Once you know which maximal subgroup you are interested
1136
+ in, to create the branching rule, you may either
1137
+ paste the command to the right of the colon from the
1138
+ above output onto the command line, or alternatively
1139
+ invoke the related method :meth:`maximal_subgroup`::
1140
+
1141
+ sage: branching_rule("E6","G2","miscellaneous")
1142
+ miscellaneous branching rule E6 => G2
1143
+ sage: WeylCharacterRing("E6").maximal_subgroup("G2")
1144
+ miscellaneous branching rule E6 => G2
1145
+
1146
+ It is believed that the list of maximal subgroups is complete, except that some
1147
+ subgroups may be not be invariant under outer automorphisms. It is reasonable
1148
+ to want a list of maximal subgroups that is complete up to conjugation,
1149
+ but to obtain such a list you may have to apply outer automorphisms.
1150
+ The group of outer automorphisms modulo inner automorphisms is isomorphic
1151
+ to the group of symmetries of the Dynkin diagram, and these are available
1152
+ as branching rules. The following example shows that while
1153
+ a branching rule from `D_4` to `A_1\times C_2` is supplied,
1154
+ another different one may be obtained by composing it with the
1155
+ triality automorphism of `D_4`::
1156
+
1157
+ sage: [D4,A1xC2]=[WeylCharacterRing(x,style='coroots') for x in ["D4","A1xC2"]]
1158
+ sage: fw = D4.fundamental_weights()
1159
+ sage: b = D4.maximal_subgroup("A1xC2")
1160
+ sage: [D4(fw).branch(A1xC2,rule=b) for fw in D4.fundamental_weights()]
1161
+ [A1xC2(1,1,0),
1162
+ A1xC2(2,0,0) + A1xC2(2,0,1) + A1xC2(0,2,0),
1163
+ A1xC2(1,1,0),
1164
+ A1xC2(2,0,0) + A1xC2(0,0,1)]
1165
+ sage: b1 = branching_rule("D4","D4","triality")*b
1166
+ sage: [D4(fw).branch(A1xC2,rule=b1) for fw in D4.fundamental_weights()]
1167
+ [A1xC2(1,1,0),
1168
+ A1xC2(2,0,0) + A1xC2(2,0,1) + A1xC2(0,2,0),
1169
+ A1xC2(2,0,0) + A1xC2(0,0,1),
1170
+ A1xC2(1,1,0)]
1171
+ """
1172
+ return sage.combinat.root_system.branching_rules.maximal_subgroups(self.cartan_type())
1173
+
1174
+ def maximal_subgroup(self, ct):
1175
+ """
1176
+ Return a branching rule or a list of branching rules.
1177
+
1178
+ INPUT:
1179
+
1180
+ - ``ct`` -- the Cartan type of a maximal subgroup of ``self``
1181
+
1182
+ In rare cases where there is
1183
+ more than one maximal subgroup (up to outer automorphisms)
1184
+ with the given Cartan type, the function returns a list of
1185
+ branching rules.
1186
+
1187
+ EXAMPLES::
1188
+
1189
+ sage: WeylCharacterRing("E7").maximal_subgroup("A2")
1190
+ miscellaneous branching rule E7 => A2
1191
+ sage: WeylCharacterRing("E7").maximal_subgroup("A1")
1192
+ [iii branching rule E7 => A1, iv branching rule E7 => A1]
1193
+
1194
+ For more information, see the related method :meth:`maximal_subgroups`.
1195
+ """
1196
+ return sage.combinat.root_system.branching_rules.maximal_subgroups(self.cartan_type(), mode='get_rule')[ct]
1197
+
1198
+ class Element(CombinatorialFreeModule.Element):
1199
+ """
1200
+ A class for Weyl characters.
1201
+ """
1202
+
1203
+ def cartan_type(self):
1204
+ """
1205
+ Return the Cartan type of ``self``.
1206
+
1207
+ EXAMPLES::
1208
+
1209
+ sage: A2 = WeylCharacterRing("A2")
1210
+ sage: A2([1,0,0]).cartan_type()
1211
+ ['A', 2]
1212
+ """
1213
+ return self.parent()._cartan_type
1214
+
1215
+ def degree(self):
1216
+ """
1217
+ Return the degree of ``self``.
1218
+
1219
+ This is the dimension of the associated module.
1220
+
1221
+ EXAMPLES::
1222
+
1223
+ sage: B3 = WeylCharacterRing(['B',3])
1224
+ sage: [B3(x).degree() for x in B3.fundamental_weights()]
1225
+ [7, 21, 8]
1226
+ """
1227
+ L = self.parent()._space
1228
+ return sum(L.weyl_dimension(k) * c for k, c in self)
1229
+
1230
+ def branch(self, S, rule='default'):
1231
+ """
1232
+ Return the restriction of the character to the subalgebra.
1233
+
1234
+ If no rule is specified, we will try to specify one.
1235
+
1236
+ INPUT:
1237
+
1238
+ - ``S`` -- a Weyl character ring for a Lie subgroup or subalgebra
1239
+
1240
+ - ``rule`` -- a branching rule
1241
+
1242
+ See :func:`~sage.combinat.root_system.branching_rules.branch_weyl_character`
1243
+ for more information about branching rules.
1244
+
1245
+ EXAMPLES::
1246
+
1247
+ sage: B3 = WeylCharacterRing(['B',3])
1248
+ sage: A2 = WeylCharacterRing(['A',2])
1249
+ sage: [B3(w).branch(A2,rule='levi') for w in B3.fundamental_weights()]
1250
+ [A2(0,0,0) + A2(1,0,0) + A2(0,0,-1),
1251
+ A2(0,0,0) + A2(1,0,0) + A2(1,1,0) + A2(1,0,-1) + A2(0,-1,-1) + A2(0,0,-1),
1252
+ A2(-1/2,-1/2,-1/2) + A2(1/2,-1/2,-1/2) + A2(1/2,1/2,-1/2) + A2(1/2,1/2,1/2)]
1253
+ """
1254
+ return sage.combinat.root_system.branching_rules.branch_weyl_character(self, self.parent(), S, rule=rule)
1255
+
1256
+ def dual(self):
1257
+ """
1258
+ The involution that replaces a representation with
1259
+ its contragredient. (For Fusion rings, this is the
1260
+ conjugation map.)
1261
+
1262
+ EXAMPLES::
1263
+
1264
+ sage: A3 = WeylCharacterRing("A3", style='coroots')
1265
+ sage: A3(1,0,0)^2
1266
+ A3(0,1,0) + A3(2,0,0)
1267
+ sage: (A3(1,0,0)^2).dual()
1268
+ A3(0,1,0) + A3(0,0,2)
1269
+ """
1270
+ if not self.parent().cartan_type().is_irreducible():
1271
+ raise NotImplementedError("dual method is not implemented for reducible types")
1272
+ d = self.monomial_coefficients()
1273
+ WCR = self.parent()
1274
+ return sum(d[k] * WCR._element_constructor_(self.parent()._dual_helper(k))
1275
+ for k in d)
1276
+
1277
+ def highest_weight(self):
1278
+ """
1279
+ Return the parametrizing dominant weight
1280
+ of an irreducible character.
1281
+
1282
+ This method is only available for basis elements.
1283
+
1284
+ EXAMPLES::
1285
+
1286
+ sage: G2 = WeylCharacterRing("G2", style='coroots')
1287
+ sage: [x.highest_weight() for x in [G2(1,0),G2(0,1)]]
1288
+ [(1, 0, -1), (2, -1, -1)]
1289
+ """
1290
+ if len(self.monomial_coefficients()) != 1:
1291
+ raise ValueError("fusion weight is valid for basis elements only")
1292
+ return self.leading_support()
1293
+
1294
+ def __pow__(self, n):
1295
+ """
1296
+ Return the `n`-th power of ``self``.
1297
+
1298
+ We override the method in :mod:`sage.monoids.monoids` since
1299
+ using the Brauer-Klimyk algorithm, it is more efficient to
1300
+ compute ``a*(a*(a*a))`` than ``(a*a)*(a*a)``.
1301
+
1302
+ EXAMPLES::
1303
+
1304
+ sage: B4 = WeylCharacterRing("B4",style='coroots')
1305
+ sage: spin = B4(0,0,0,1)
1306
+ sage: [spin^k for k in [0,1,3]]
1307
+ [B4(0,0,0,0), B4(0,0,0,1), 5*B4(0,0,0,1) + 4*B4(1,0,0,1) + 3*B4(0,1,0,1) + 2*B4(0,0,1,1) + B4(0,0,0,3)]
1308
+ sage: spin^-1
1309
+ Traceback (most recent call last):
1310
+ ...
1311
+ ValueError: cannot invert self (= B4(0,0,0,1))
1312
+ sage: x = 2 * B4.one(); x
1313
+ 2*B4(0,0,0,0)
1314
+ sage: x^-3
1315
+ 1/8*B4(0,0,0,0)
1316
+ """
1317
+ n = ZZ(n)
1318
+ if not n:
1319
+ return self.parent().one()
1320
+ if n < 0:
1321
+ self = ~self
1322
+ n = -n
1323
+
1324
+ res = self
1325
+ for i in range(n - 1):
1326
+ res = self * res
1327
+ return res
1328
+
1329
+ def is_irreducible(self):
1330
+ """
1331
+ Return whether ``self`` is an irreducible character.
1332
+
1333
+ EXAMPLES::
1334
+
1335
+ sage: B3 = WeylCharacterRing(['B',3])
1336
+ sage: [B3(x).is_irreducible() for x in B3.fundamental_weights()]
1337
+ [True, True, True]
1338
+ sage: sum(B3(x) for x in B3.fundamental_weights()).is_irreducible()
1339
+ False
1340
+ """
1341
+ return self.coefficients() == [1]
1342
+
1343
+ @cached_method
1344
+ def symmetric_power(self, k):
1345
+ r"""
1346
+ Return the `k`-th symmetric power of ``self``.
1347
+
1348
+ INPUT:
1349
+
1350
+ - ``k`` -- nonnegative integer
1351
+
1352
+ The algorithm is based on the
1353
+ identity `k h_k = \sum_{r=1}^k p_k h_{k-r}` relating the power-sum
1354
+ and complete symmetric polynomials. Applying this to the
1355
+ eigenvalues of an element of the parent Lie group in the
1356
+ representation ``self``, the `h_k` become symmetric powers and
1357
+ the `p_k` become Adams operations, giving an efficient recursive
1358
+ implementation.
1359
+
1360
+ EXAMPLES::
1361
+
1362
+ sage: B3 = WeylCharacterRing("B3",style='coroots')
1363
+ sage: spin = B3(0,0,1)
1364
+ sage: spin.symmetric_power(6)
1365
+ B3(0,0,0) + B3(0,0,2) + B3(0,0,4) + B3(0,0,6)
1366
+ """
1367
+ par = self.parent()
1368
+ if k == 0:
1369
+ return par.one()
1370
+ if k == 1:
1371
+ return self
1372
+ ret = par.zero()
1373
+ for r in range(1, k + 1):
1374
+ adam_r = self._adams_operator_helper(r)
1375
+ ret += par.linear_combination((par._product_helper(adam_r, l), c)
1376
+ for l, c in self.symmetric_power(k - r))
1377
+ m = ret.weight_multiplicities()
1378
+ dd = {key: val / k for key, val in m.items()}
1379
+ return self.parent().char_from_weights(dd)
1380
+
1381
+ @cached_method
1382
+ def exterior_power(self, k):
1383
+ r"""
1384
+ Return the `k`-th exterior power of ``self``.
1385
+
1386
+ INPUT:
1387
+
1388
+ - ``k`` -- nonnegative integer
1389
+
1390
+ The algorithm is based on the
1391
+ identity `k e_k = \sum_{r=1}^k (-1)^{k-1} p_k e_{k-r}` relating the
1392
+ power-sum and elementary symmetric polynomials. Applying this to
1393
+ the eigenvalues of an element of the parent Lie group in the
1394
+ representation ``self``, the `e_k` become exterior powers and
1395
+ the `p_k` become Adams operations, giving an efficient recursive
1396
+ implementation.
1397
+
1398
+ EXAMPLES::
1399
+
1400
+ sage: B3 = WeylCharacterRing("B3",style='coroots')
1401
+ sage: spin = B3(0,0,1)
1402
+ sage: spin.exterior_power(6)
1403
+ B3(1,0,0) + B3(0,1,0)
1404
+ """
1405
+ par = self.parent()
1406
+ if k == 0:
1407
+ return par.one()
1408
+ if k == 1:
1409
+ return self
1410
+ ret = par.zero()
1411
+ for r in range(1, k + 1):
1412
+ adam_r = self._adams_operator_helper(r)
1413
+ if is_even(r):
1414
+ ret -= par.linear_combination((par._product_helper(adam_r, l), c) for (l, c) in self.exterior_power(k-r))
1415
+ else:
1416
+ ret += par.linear_combination((par._product_helper(adam_r, l), c) for (l, c) in self.exterior_power(k-r))
1417
+ dd = {}
1418
+ m = ret.weight_multiplicities()
1419
+ for l in m:
1420
+ dd[l] = m[l]/k
1421
+ return self.parent().char_from_weights(dd)
1422
+
1423
+ def adams_operator(self, r):
1424
+ """
1425
+ Return the `r`-th Adams operation of ``self``.
1426
+
1427
+ INPUT:
1428
+
1429
+ - ``r`` -- positive integer
1430
+
1431
+ This is a virtual character,
1432
+ whose weights are the weights of ``self``, each multiplied by `r`.
1433
+
1434
+ EXAMPLES::
1435
+
1436
+ sage: A2 = WeylCharacterRing("A2")
1437
+ sage: A2(1,1,0).adams_operator(3)
1438
+ A2(2,2,2) - A2(3,2,1) + A2(3,3,0)
1439
+ """
1440
+ return self.parent().char_from_weights(self._adams_operator_helper(r))
1441
+
1442
+ adams_operation = adams_operator
1443
+
1444
+ def _adams_operator_helper(self, r):
1445
+ """
1446
+ Helper function for Adams operations.
1447
+
1448
+ INPUT:
1449
+
1450
+ - ``r`` -- positive integer
1451
+
1452
+ Return the dictionary of weight multiplicities for the Adams
1453
+ operation, needed for internal use by symmetric and exterior powers.
1454
+
1455
+ EXAMPLES::
1456
+
1457
+ sage: A2 = WeylCharacterRing("A2")
1458
+ sage: A2(1,1,0)._adams_operator_helper(3)
1459
+ {(3, 3, 0): 1, (3, 0, 3): 1, (0, 3, 3): 1}
1460
+ """
1461
+ d = self.weight_multiplicities()
1462
+ return {r * key: val for key, val in d.items()}
1463
+
1464
+ def symmetric_square(self):
1465
+ """
1466
+ Return the symmetric square of the character.
1467
+
1468
+ EXAMPLES::
1469
+
1470
+ sage: A2 = WeylCharacterRing("A2",style='coroots')
1471
+ sage: A2(1,0).symmetric_square()
1472
+ A2(2,0)
1473
+ """
1474
+ # Conceptually, this converts self to the weight ring,
1475
+ # computes its square there, and converts the result back.
1476
+ #
1477
+ # This implementation uses that this is a squaring (and not
1478
+ # a generic product) in the weight ring to optimize by
1479
+ # running only through pairs of weights instead of couples.
1480
+ c = self.weight_multiplicities()
1481
+ ckeys = list(c)
1482
+ d = {}
1483
+ for j in range(len(ckeys)):
1484
+ for i in range(j+1):
1485
+ ci = ckeys[i]
1486
+ cj = ckeys[j]
1487
+ t = ci + cj
1488
+ if i < j:
1489
+ coef = c[ci]*c[cj]
1490
+ else:
1491
+ coef = c[ci]*(c[ci]+1)/2
1492
+ if t in d:
1493
+ d[t] += coef
1494
+ else:
1495
+ d[t] = coef
1496
+ for k in list(d):
1497
+ if d[k] == 0:
1498
+ del d[k]
1499
+ return self.parent().char_from_weights(d)
1500
+
1501
+ def exterior_square(self):
1502
+ """
1503
+ Return the exterior square of the character.
1504
+
1505
+ EXAMPLES::
1506
+
1507
+ sage: A2 = WeylCharacterRing("A2",style='coroots')
1508
+ sage: A2(1,0).exterior_square()
1509
+ A2(0,1)
1510
+ """
1511
+ c = self.weight_multiplicities()
1512
+ ckeys = list(c)
1513
+ d = {}
1514
+ for j in range(len(ckeys)):
1515
+ for i in range(j+1):
1516
+ ci = ckeys[i]
1517
+ cj = ckeys[j]
1518
+ t = ci + cj
1519
+ if i < j:
1520
+ coef = c[ci]*c[cj]
1521
+ else:
1522
+ coef = c[ci]*(c[ci]-1)/2
1523
+ if t in d:
1524
+ d[t] += coef
1525
+ else:
1526
+ d[t] = coef
1527
+ for k in list(d):
1528
+ if d[k] == 0:
1529
+ del d[k]
1530
+ return self.parent().char_from_weights(d)
1531
+
1532
+ def frobenius_schur_indicator(self):
1533
+ r"""
1534
+ Return:
1535
+
1536
+ - `1` if the representation is real (orthogonal)
1537
+
1538
+ - `-1` if the representation is quaternionic (symplectic)
1539
+
1540
+ - `0` if the representation is complex (not self dual)
1541
+
1542
+ The Frobenius-Schur indicator of a character `\chi`
1543
+ of a compact group `G` is the Haar integral over the
1544
+ group of `\chi(g^2)`. Its value is 1, -1 or 0. This
1545
+ method computes it for irreducible characters of
1546
+ compact Lie groups by checking whether the symmetric
1547
+ and exterior square characters contain the trivial
1548
+ character.
1549
+
1550
+ .. TODO::
1551
+
1552
+ Try to compute this directly without actually calculating
1553
+ the full symmetric and exterior squares.
1554
+
1555
+ EXAMPLES::
1556
+
1557
+ sage: B2 = WeylCharacterRing("B2",style='coroots')
1558
+ sage: B2(1,0).frobenius_schur_indicator()
1559
+ 1
1560
+ sage: B2(0,1).frobenius_schur_indicator()
1561
+ -1
1562
+ """
1563
+ if not self.is_irreducible():
1564
+ raise ValueError("Frobenius-Schur indicator is only valid for irreducible characters")
1565
+ z = self.parent()._space.zero()
1566
+ if self.symmetric_square().coefficient(z) != 0:
1567
+ return 1
1568
+ if self.exterior_square().coefficient(z) != 0:
1569
+ return -1
1570
+ return 0
1571
+
1572
+ def weight_multiplicities(self):
1573
+ """
1574
+ Return the dictionary of weight multiplicities for the Weyl
1575
+ character ``self``.
1576
+
1577
+ The character does not have to be irreducible.
1578
+
1579
+ EXAMPLES::
1580
+
1581
+ sage: B2 = WeylCharacterRing("B2",style='coroots')
1582
+ sage: B2(0,1).weight_multiplicities()
1583
+ {(-1/2, -1/2): 1, (-1/2, 1/2): 1, (1/2, -1/2): 1, (1/2, 1/2): 1}
1584
+ """
1585
+ return self.parent()._weight_multiplicities(self)
1586
+
1587
+ def inner_product(self, other):
1588
+ """
1589
+ Compute the inner product with another character.
1590
+
1591
+ The irreducible characters are an orthonormal basis with respect
1592
+ to the usual inner product of characters, interpreted as functions
1593
+ on a compact Lie group, by Schur orthogonality.
1594
+
1595
+ INPUT:
1596
+
1597
+ - ``other`` -- another character
1598
+
1599
+ EXAMPLES::
1600
+
1601
+ sage: A2 = WeylCharacterRing("A2")
1602
+ sage: [f1,f2] = A2.fundamental_weights()
1603
+ sage: r1 = A2(f1)*A2(f2); r1
1604
+ A2(1,1,1) + A2(2,1,0)
1605
+ sage: r2 = A2(f1)^3; r2
1606
+ A2(1,1,1) + 2*A2(2,1,0) + A2(3,0,0)
1607
+ sage: r1.inner_product(r2)
1608
+ 3
1609
+ """
1610
+ return sum(self.coefficient(x) * other.coefficient(x)
1611
+ for x in self.monomial_coefficients())
1612
+
1613
+ def invariant_degree(self):
1614
+ """
1615
+ Return the multiplicity of the trivial representation in ``self``.
1616
+
1617
+ Multiplicities of other irreducibles may be obtained
1618
+ using :meth:`multiplicity`.
1619
+
1620
+ EXAMPLES::
1621
+
1622
+ sage: A2 = WeylCharacterRing("A2",style='coroots')
1623
+ sage: rep = A2(1,0)^2*A2(0,1)^2; rep
1624
+ 2*A2(0,0) + A2(0,3) + 4*A2(1,1) + A2(3,0) + A2(2,2)
1625
+ sage: rep.invariant_degree()
1626
+ 2
1627
+ """
1628
+ return self.coefficient(self.parent().space()(0))
1629
+
1630
+ def multiplicity(self, other):
1631
+ """
1632
+ Return the multiplicity of the irreducible ``other`` in ``self``.
1633
+
1634
+ INPUT:
1635
+
1636
+ - ``other`` -- an irreducible character
1637
+
1638
+ EXAMPLES::
1639
+
1640
+ sage: B2 = WeylCharacterRing("B2",style='coroots')
1641
+ sage: rep = B2(1,1)^2; rep
1642
+ B2(0,0) + B2(1,0) + 2*B2(0,2) + B2(2,0) + 2*B2(1,2) + B2(0,4) + B2(3,0) + B2(2,2)
1643
+ sage: rep.multiplicity(B2(0,2))
1644
+ 2
1645
+ """
1646
+ if not other.is_irreducible():
1647
+ raise ValueError("{} is not irreducible".format(other))
1648
+ return self.coefficient(other.support()[0])
1649
+
1650
+
1651
+ def irreducible_character_freudenthal(hwv, debug=False):
1652
+ r"""
1653
+ Return the dictionary of multiplicities for the irreducible
1654
+ character with highest weight `\lambda`.
1655
+
1656
+ The weight multiplicities are computed by the Freudenthal multiplicity
1657
+ formula. The algorithm is based on recursion relation that is stated,
1658
+ for example, in Humphrey's book on Lie Algebras. The multiplicities are
1659
+ invariant under the Weyl group, so to compute them it would be sufficient
1660
+ to compute them for the weights in the positive Weyl chamber. However
1661
+ after some testing it was found to be faster to compute every
1662
+ weight using the recursion, since the use of the Weyl group is
1663
+ expensive in its current implementation.
1664
+
1665
+ INPUT:
1666
+
1667
+ - ``hwv`` -- a dominant weight in a weight lattice
1668
+
1669
+ - ``L`` -- the ambient space
1670
+
1671
+ EXAMPLES::
1672
+
1673
+ sage: WeylCharacterRing("A2")(2,1,0).weight_multiplicities() # indirect doctest
1674
+ {(1, 1, 1): 2, (1, 2, 0): 1, (1, 0, 2): 1, (2, 1, 0): 1,
1675
+ (2, 0, 1): 1, (0, 1, 2): 1, (0, 2, 1): 1}
1676
+ """
1677
+ L = hwv.parent()
1678
+ rho = L.rho()
1679
+ mdict = {}
1680
+ current_layer = {hwv: 1}
1681
+
1682
+ simple_roots = L.simple_roots()
1683
+ positive_roots = L.positive_roots()
1684
+
1685
+ while current_layer:
1686
+ next_layer = {}
1687
+ for mu in current_layer:
1688
+ if current_layer[mu] != 0:
1689
+ mdict[mu] = current_layer[mu]
1690
+ for alpha in simple_roots:
1691
+ next_layer[mu - alpha] = None
1692
+ if debug:
1693
+ print(next_layer)
1694
+
1695
+ for mu in next_layer:
1696
+ if next_layer[mu] is None:
1697
+ accum = 0
1698
+ for alpha in positive_roots:
1699
+ mu_plus_i_alpha = mu + alpha
1700
+ while mu_plus_i_alpha in mdict:
1701
+ accum += mdict[mu_plus_i_alpha] * (mu_plus_i_alpha).inner_product(alpha)
1702
+ mu_plus_i_alpha += alpha
1703
+ if accum == 0:
1704
+ next_layer[mu] = 0
1705
+ else:
1706
+ hwv_plus_rho = hwv + rho
1707
+ mu_plus_rho = mu + rho
1708
+ next_layer[mu] = ZZ(2 * accum) / ZZ((hwv_plus_rho).inner_product(hwv_plus_rho) - (mu_plus_rho).inner_product(mu_plus_rho))
1709
+ current_layer = next_layer
1710
+ return mdict
1711
+
1712
+
1713
+ class WeightRing(CombinatorialFreeModule):
1714
+ """
1715
+ The weight ring, which is the group algebra over a weight lattice.
1716
+
1717
+ A Weyl character may be regarded as an element of the weight ring.
1718
+ In fact, an element of the weight ring is an element of the
1719
+ :class:`Weyl character ring <WeylCharacterRing>` if and only if it is
1720
+ invariant under the action of the Weyl group.
1721
+
1722
+ The advantage of the weight ring over the Weyl character ring
1723
+ is that one may conduct calculations in the weight ring that
1724
+ involve sums of weights that are not Weyl group invariant.
1725
+
1726
+ EXAMPLES::
1727
+
1728
+ sage: A2 = WeylCharacterRing(['A',2])
1729
+ sage: a2 = WeightRing(A2)
1730
+ sage: wd = prod(a2(x/2)-a2(-x/2) for x in a2.space().positive_roots()); wd
1731
+ a2(-1,1,0) - a2(-1,0,1) - a2(1,-1,0) + a2(1,0,-1) + a2(0,-1,1) - a2(0,1,-1)
1732
+ sage: chi = A2([5,3,0]); chi
1733
+ A2(5,3,0)
1734
+ sage: a2(chi)
1735
+ a2(1,2,5) + 2*a2(1,3,4) + 2*a2(1,4,3) + a2(1,5,2) + a2(2,1,5)
1736
+ + 2*a2(2,2,4) + 3*a2(2,3,3) + 2*a2(2,4,2) + a2(2,5,1) + 2*a2(3,1,4)
1737
+ + 3*a2(3,2,3) + 3*a2(3,3,2) + 2*a2(3,4,1) + a2(3,5,0) + a2(3,0,5)
1738
+ + 2*a2(4,1,3) + 2*a2(4,2,2) + 2*a2(4,3,1) + a2(4,4,0) + a2(4,0,4)
1739
+ + a2(5,1,2) + a2(5,2,1) + a2(5,3,0) + a2(5,0,3) + a2(0,3,5)
1740
+ + a2(0,4,4) + a2(0,5,3)
1741
+ sage: a2(chi)*wd
1742
+ -a2(-1,3,6) + a2(-1,6,3) + a2(3,-1,6) - a2(3,6,-1) - a2(6,-1,3) + a2(6,3,-1)
1743
+ sage: sum((-1)^w.length()*a2([6,3,-1]).weyl_group_action(w) for w in a2.space().weyl_group())
1744
+ -a2(-1,3,6) + a2(-1,6,3) + a2(3,-1,6) - a2(3,6,-1) - a2(6,-1,3) + a2(6,3,-1)
1745
+ sage: a2(chi)*wd == sum((-1)^w.length()*a2([6,3,-1]).weyl_group_action(w) for w in a2.space().weyl_group())
1746
+ True
1747
+ """
1748
+ @staticmethod
1749
+ def __classcall__(cls, parent, prefix=None):
1750
+ """
1751
+ TESTS::
1752
+
1753
+ sage: A3 = WeylCharacterRing("A3", style='coroots')
1754
+ sage: a3 = WeightRing(A3)
1755
+ sage: a3.cartan_type(), a3.base_ring(), a3.parent()
1756
+ (['A', 3], Integer Ring, The Weyl Character Ring of Type A3 with Integer Ring coefficients)
1757
+ """
1758
+ return super().__classcall__(cls, parent, prefix=prefix)
1759
+
1760
+ def __init__(self, parent, prefix):
1761
+ """
1762
+ EXAMPLES::
1763
+
1764
+ sage: A2 = WeylCharacterRing("A2")
1765
+ sage: a2 = WeightRing(A2)
1766
+ sage: TestSuite(a2).run()
1767
+
1768
+ TESTS::
1769
+
1770
+ sage: A1xA1 = WeylCharacterRing("A1xA1")
1771
+ sage: a1xa1 = WeightRing(A1xA1)
1772
+ sage: TestSuite(a1xa1).run()
1773
+ sage: a1xa1.an_element()
1774
+ a1xa1(2,2,3,0)
1775
+ """
1776
+ self._parent = parent
1777
+ self._style = parent._style
1778
+ self._prefix = prefix
1779
+ self._space = parent._space
1780
+ self._cartan_type = parent._cartan_type
1781
+ self._rank = parent._rank
1782
+ self._origin = parent._origin
1783
+ self._base_ring = parent._base_ring
1784
+ if prefix is None:
1785
+ # TODO: refactor this fragile logic into CartanType's
1786
+ if self._parent._prefix.replace('x', '_').isupper():
1787
+ # The 'x' workaround above is to support reducible Cartan types like 'A1xB2'
1788
+ prefix = self._parent._prefix.lower()
1789
+ elif self._parent._prefix.islower():
1790
+ prefix = self._parent._prefix.upper()
1791
+ else:
1792
+ # TODO: this only works for irreducible Cartan types!
1793
+ prefix = (self._cartan_type[0].lower() + str(self._rank))
1794
+ self._prefix = prefix
1795
+ category = AlgebrasWithBasis(self._base_ring).Commutative()
1796
+ CombinatorialFreeModule.__init__(self, self._base_ring, self._space, category=category)
1797
+
1798
+ def _repr_(self):
1799
+ """
1800
+ EXAMPLES::
1801
+
1802
+ sage: P.<q>=QQ[]
1803
+ sage: G2 = WeylCharacterRing(['G',2], base_ring = P)
1804
+ sage: WeightRing(G2) # indirect doctest
1805
+ The Weight ring attached to The Weyl Character Ring of Type G2 with Univariate Polynomial Ring in q over Rational Field coefficients
1806
+ """
1807
+ return "The Weight ring attached to %s" % self._parent
1808
+
1809
+ def __call__(self, *args):
1810
+ """
1811
+ Construct an element of ``self``.
1812
+
1813
+ The input can either be an object that can be coerced or
1814
+ converted into ``self`` (an element of ``self``, of the base
1815
+ ring, of the weight ring), or a dominant weight. In the later
1816
+ case, the basis element indexed by that weight is returned.
1817
+
1818
+ To specify the weight, you may give it explicitly. Alternatively,
1819
+ you may give a tuple of integers. Normally these are the
1820
+ components of the vector in the standard realization of
1821
+ the weight lattice as a vector space. Alternatively, if
1822
+ the ring is constructed with style='coroots', you may
1823
+ specify the weight by giving a set of integers, one for each
1824
+ fundamental weight; the weight is then the linear combination
1825
+ of the fundamental weights with these coefficients.
1826
+
1827
+ As a syntactical shorthand, for tuples of length at least two,
1828
+ the parenthesis may be omitted.
1829
+
1830
+ EXAMPLES::
1831
+
1832
+ sage: a2 = WeightRing(WeylCharacterRing(['A',2]))
1833
+ sage: a2(-1)
1834
+ -a2(0,0,0)
1835
+ """
1836
+ # The purpose of this __call__ method is only to handle the
1837
+ # syntactical shorthand; otherwise it just delegates the work
1838
+ # to the coercion model, which itself will call
1839
+ # _element_constructor_ if the input is made of exactly one
1840
+ # object which can't be coerced into self
1841
+ if len(args) > 1:
1842
+ args = (args,)
1843
+ return super().__call__(*args)
1844
+
1845
+ def _element_constructor_(self, weight):
1846
+ """
1847
+ Construct a monomial from a weight.
1848
+
1849
+ INPUT:
1850
+
1851
+ - ``weight`` -- an element of the weight space, or a tuple
1852
+
1853
+ This method is responsible for constructing an appropriate
1854
+ weight from the data in ``weight``, and then return the
1855
+ monomial indexed by that weight. See :meth:`__call__` and
1856
+ :meth:`sage.combinat.root_system.ambient_space.AmbientSpace.from_vector`.
1857
+
1858
+ TESTS::
1859
+
1860
+ sage: A2 = WeylCharacterRing("A2")
1861
+ sage: A2._element_constructor_([2,1,0])
1862
+ A2(2,1,0)
1863
+ """
1864
+ weight = self._space.from_vector_notation(weight, style=self._style)
1865
+ return self.monomial(weight)
1866
+
1867
+ def product_on_basis(self, a, b):
1868
+ """
1869
+ Return the product of basis elements indexed by ``a`` and ``b``.
1870
+
1871
+ EXAMPLES::
1872
+
1873
+ sage: A2 = WeylCharacterRing("A2")
1874
+ sage: a2 = WeightRing(A2)
1875
+ sage: a2(1,0,0) * a2(0,1,0) # indirect doctest
1876
+ a2(1,1,0)
1877
+ """
1878
+ return self(a + b)
1879
+
1880
+ def some_elements(self):
1881
+ """
1882
+ Return some elements of ``self``.
1883
+
1884
+ EXAMPLES::
1885
+
1886
+ sage: A3 = WeylCharacterRing("A3")
1887
+ sage: a3 = WeightRing(A3)
1888
+ sage: a3.some_elements()
1889
+ [a3(1,0,0,0), a3(1,1,0,0), a3(1,1,1,0)]
1890
+ """
1891
+ return [self.monomial(x) for x in self.fundamental_weights()]
1892
+
1893
+ def one_basis(self):
1894
+ """
1895
+ Return the index of `1`.
1896
+
1897
+ EXAMPLES::
1898
+
1899
+ sage: A3 = WeylCharacterRing("A3")
1900
+ sage: WeightRing(A3).one_basis()
1901
+ (0, 0, 0, 0)
1902
+ sage: WeightRing(A3).one()
1903
+ a3(0,0,0,0)
1904
+ """
1905
+ return self._space.zero()
1906
+
1907
+ def parent(self):
1908
+ """
1909
+ Return the parent Weyl character ring.
1910
+
1911
+ EXAMPLES::
1912
+
1913
+ sage: A2 = WeylCharacterRing("A2")
1914
+ sage: a2 = WeightRing(A2)
1915
+ sage: a2.parent()
1916
+ The Weyl Character Ring of Type A2 with Integer Ring coefficients
1917
+ sage: a2.parent() == A2
1918
+ True
1919
+ """
1920
+ return self._parent
1921
+
1922
+ def weyl_character_ring(self):
1923
+ """
1924
+ Return the parent Weyl Character Ring.
1925
+
1926
+ A synonym for ``self.parent()``.
1927
+
1928
+ EXAMPLES::
1929
+
1930
+ sage: A2 = WeylCharacterRing("A2")
1931
+ sage: a2 = WeightRing(A2)
1932
+ sage: a2.weyl_character_ring()
1933
+ The Weyl Character Ring of Type A2 with Integer Ring coefficients
1934
+ """
1935
+ return self._parent
1936
+
1937
+ def cartan_type(self):
1938
+ """
1939
+ Return the Cartan type.
1940
+
1941
+ EXAMPLES::
1942
+
1943
+ sage: A2 = WeylCharacterRing("A2")
1944
+ sage: WeightRing(A2).cartan_type()
1945
+ ['A', 2]
1946
+ """
1947
+ return self._cartan_type
1948
+
1949
+ def space(self):
1950
+ """
1951
+ Return the weight space realization associated to ``self``.
1952
+
1953
+ EXAMPLES::
1954
+
1955
+ sage: E8 = WeylCharacterRing(['E',8])
1956
+ sage: e8 = WeightRing(E8)
1957
+ sage: e8.space()
1958
+ Ambient space of the Root system of type ['E', 8]
1959
+ """
1960
+ return self._space
1961
+
1962
+ def fundamental_weights(self):
1963
+ """
1964
+ Return the fundamental weights.
1965
+
1966
+ EXAMPLES::
1967
+
1968
+ sage: WeightRing(WeylCharacterRing("G2")).fundamental_weights()
1969
+ Finite family {1: (1, 0, -1), 2: (2, -1, -1)}
1970
+ """
1971
+ return self._space.fundamental_weights()
1972
+
1973
+ def simple_roots(self):
1974
+ """
1975
+ Return the simple roots.
1976
+
1977
+ EXAMPLES::
1978
+
1979
+ sage: WeightRing(WeylCharacterRing("G2")).simple_roots()
1980
+ Finite family {1: (0, 1, -1), 2: (1, -2, 1)}
1981
+ """
1982
+ return self._space.simple_roots()
1983
+
1984
+ def positive_roots(self):
1985
+ """
1986
+ Return the positive roots.
1987
+
1988
+ EXAMPLES::
1989
+
1990
+ sage: WeightRing(WeylCharacterRing("G2")).positive_roots()
1991
+ [(0, 1, -1), (1, -2, 1), (1, -1, 0), (1, 0, -1), (1, 1, -2), (2, -1, -1)]
1992
+ """
1993
+ return self._space.positive_roots()
1994
+
1995
+ def wt_repr(self, wt):
1996
+ r"""
1997
+ Return a string representing the irreducible character with
1998
+ highest weight vector ``wt``.
1999
+
2000
+ Uses coroot notation if the associated
2001
+ Weyl character ring is defined with ``style="coroots"``.
2002
+
2003
+ EXAMPLES::
2004
+
2005
+ sage: G2 = WeylCharacterRing("G2")
2006
+ sage: [G2.ambient().wt_repr(x) for x in G2.fundamental_weights()]
2007
+ ['g2(1,0,-1)', 'g2(2,-1,-1)']
2008
+ sage: G2 = WeylCharacterRing("G2",style='coroots')
2009
+ sage: [G2.ambient().wt_repr(x) for x in G2.fundamental_weights()]
2010
+ ['g2(1,0)', 'g2(0,1)']
2011
+ """
2012
+ return self._prefix + self.parent()._wt_repr(wt)
2013
+
2014
+ def _repr_term(self, t):
2015
+ """
2016
+ Representation of the monomial corresponding to a weight ``t``.
2017
+
2018
+ EXAMPLES::
2019
+
2020
+ sage: G2 = WeylCharacterRing("G2")
2021
+ sage: g2 = WeightRing(G2)
2022
+ sage: [g2(x) for x in g2.fundamental_weights()] # indirect doctest
2023
+ [g2(1,0,-1), g2(2,-1,-1)]
2024
+ """
2025
+ return self.wt_repr(t)
2026
+
2027
+ class Element(CombinatorialFreeModule.Element):
2028
+ """
2029
+ A class for weight ring elements.
2030
+ """
2031
+
2032
+ def cartan_type(self):
2033
+ """
2034
+ Return the Cartan type.
2035
+
2036
+ EXAMPLES::
2037
+
2038
+ sage: A2 = WeylCharacterRing("A2")
2039
+ sage: a2 = WeightRing(A2)
2040
+ sage: a2([0,1,0]).cartan_type()
2041
+ ['A', 2]
2042
+ """
2043
+ return self.parent()._cartan_type
2044
+
2045
+ def weyl_group_action(self, w):
2046
+ """
2047
+ Return the action of the Weyl group element ``w`` on ``self``.
2048
+
2049
+ EXAMPLES::
2050
+
2051
+ sage: G2 = WeylCharacterRing(['G',2])
2052
+ sage: g2 = WeightRing(G2)
2053
+ sage: L = g2.space()
2054
+ sage: [fw1, fw2] = L.fundamental_weights()
2055
+ sage: sum(g2(fw2).weyl_group_action(w) for w in L.weyl_group())
2056
+ 2*g2(-2,1,1) + 2*g2(-1,-1,2) + 2*g2(-1,2,-1) + 2*g2(1,-2,1) + 2*g2(1,1,-2) + 2*g2(2,-1,-1)
2057
+ """
2058
+ return self.map_support(w.action)
2059
+
2060
+ def character(self):
2061
+ """
2062
+ Assuming that ``self`` is invariant under the Weyl group, this will
2063
+ express it as a linear combination of characters. If ``self`` is
2064
+ not Weyl group invariant, this method will not terminate.
2065
+
2066
+ EXAMPLES::
2067
+
2068
+ sage: A2 = WeylCharacterRing(['A',2])
2069
+ sage: a2 = WeightRing(A2)
2070
+ sage: W = a2.space().weyl_group()
2071
+ sage: mu = a2(2,1,0)
2072
+ sage: nu = sum(mu.weyl_group_action(w) for w in W) ; nu
2073
+ a2(1,2,0) + a2(1,0,2) + a2(2,1,0) + a2(2,0,1) + a2(0,1,2) + a2(0,2,1)
2074
+ sage: nu.character()
2075
+ -2*A2(1,1,1) + A2(2,1,0)
2076
+ """
2077
+ return self.parent().parent().char_from_weights(self.monomial_coefficients())
2078
+
2079
+ def scale(self, k):
2080
+ """
2081
+ Multiply a weight by `k`.
2082
+
2083
+ The operation is extended by linearity to the weight ring.
2084
+
2085
+ INPUT:
2086
+
2087
+ - ``k`` -- nonzero integer
2088
+
2089
+ EXAMPLES::
2090
+
2091
+ sage: g2 = WeylCharacterRing("G2",style='coroots').ambient()
2092
+ sage: g2(2,3).scale(2)
2093
+ g2(4,6)
2094
+ """
2095
+ if k == 0:
2096
+ raise ValueError("parameter must be nonzero")
2097
+ d1 = self.monomial_coefficients()
2098
+ d2 = {k * mu: coeff for mu, coeff in d1.items()}
2099
+ return self.parent()._from_dict(d2)
2100
+
2101
+ def shift(self, mu):
2102
+ r"""
2103
+ Add `\mu` to any weight.
2104
+
2105
+ Extended by linearity to the weight ring.
2106
+
2107
+ INPUT:
2108
+
2109
+ - ``mu`` -- a weight
2110
+
2111
+ EXAMPLES::
2112
+
2113
+ sage: g2 = WeylCharacterRing("G2",style='coroots').ambient()
2114
+ sage: [g2(1,2).shift(fw) for fw in g2.fundamental_weights()]
2115
+ [g2(2,2), g2(1,3)]
2116
+ """
2117
+ d1 = self.monomial_coefficients()
2118
+ d2 = {mu + nu: val for nu, val in d1.items()}
2119
+ return self.parent()._from_dict(d2)
2120
+
2121
+ def demazure(self, w, debug=False):
2122
+ r"""
2123
+ Return the result of applying the Demazure operator `\partial_w`
2124
+ to ``self``.
2125
+
2126
+ INPUT:
2127
+
2128
+ - ``w`` -- a Weyl group element, or its reduced word
2129
+
2130
+ If `w = s_i` is a simple reflection, the operation `\partial_w`
2131
+ sends the weight `\lambda` to
2132
+
2133
+ .. MATH::
2134
+
2135
+ \frac{\lambda - s_i \cdot \lambda + \alpha_i}{1 + \alpha_i},
2136
+
2137
+ where the numerator is divisible the denominator in the weight
2138
+ ring. This is extended by multiplicativity to all `w` in the
2139
+ Weyl group.
2140
+
2141
+ EXAMPLES::
2142
+
2143
+ sage: B2 = WeylCharacterRing("B2",style='coroots')
2144
+ sage: b2 = WeightRing(B2)
2145
+ sage: b2(1,0).demazure([1])
2146
+ b2(1,0) + b2(-1,2)
2147
+ sage: b2(1,0).demazure([2])
2148
+ b2(1,0)
2149
+ sage: r = b2(1,0).demazure([1,2]); r
2150
+ b2(1,0) + b2(-1,2)
2151
+ sage: r.demazure([1])
2152
+ b2(1,0) + b2(-1,2)
2153
+ sage: r.demazure([2])
2154
+ b2(0,0) + b2(1,0) + b2(1,-2) + b2(-1,2)
2155
+ """
2156
+ if isinstance(w, list):
2157
+ word = w
2158
+ else:
2159
+ word = w.reduced_word()
2160
+ d1 = self.monomial_coefficients()
2161
+ d = {}
2162
+ alphacheck = self.parent()._space.simple_coroots()
2163
+ for v in d1:
2164
+ d[tuple(v.inner_product(alphacheck[j])
2165
+ for j in self.parent().space().index_set())] = d1[v]
2166
+ return self.parent()._from_dict(self.parent().parent()._demazure_helper(d, word, debug=debug))
2167
+
2168
+ def demazure_lusztig(self, i, v):
2169
+ r"""
2170
+ Return the result of applying the Demazure-Lusztig operator
2171
+ `T_i` to ``self``.
2172
+
2173
+ INPUT:
2174
+
2175
+ - ``i`` -- an element of the index set (or a reduced word or
2176
+ Weyl group element)
2177
+ - ``v`` -- an element of the base ring
2178
+
2179
+ If `R` is the parent WeightRing, the Demazure-Lusztig operator
2180
+ `T_i` is the linear map `R \to R` that sends (for a weight
2181
+ `\lambda`) `R(\lambda)` to
2182
+
2183
+ .. MATH::
2184
+
2185
+ (R(\alpha_i)-1)^{-1} \bigl(R(\lambda) - R(s_i\lambda)
2186
+ - v(R(\lambda) - R(\alpha_i + s_i \lambda)) \bigr)
2187
+
2188
+ where the numerator is divisible by the denominator in `R`.
2189
+ The Demazure-Lusztig operators give a representation of the
2190
+ Iwahori--Hecke algebra associated to the Weyl group. See
2191
+
2192
+ * Lusztig, Equivariant `K`-theory and representations of Hecke
2193
+ algebras, Proc. Amer. Math. Soc. 94 (1985), no. 2, 337-342.
2194
+ * Cherednik, *Nonsymmetric Macdonald polynomials*. IMRN 10,
2195
+ 483-515 (1995).
2196
+
2197
+ In the examples, we confirm the braid and quadratic relations
2198
+ for type `B_2`.
2199
+
2200
+ EXAMPLES::
2201
+
2202
+ sage: P.<v> = PolynomialRing(QQ)
2203
+ sage: B2 = WeylCharacterRing("B2",style='coroots',base_ring=P); b2 = B2.ambient()
2204
+ sage: def T1(f): return f.demazure_lusztig(1, v)
2205
+ sage: def T2(f): return f.demazure_lusztig(2, v)
2206
+ sage: T1(T2(T1(T2(b2(1,-1)))))
2207
+ (v^2-v)*b2(0,-1) + v^2*b2(-1,1)
2208
+ sage: [T1(T1(f))==(v-1)*T1(f)+v*f for f in [b2(0,0), b2(1,0), b2(2,3)]]
2209
+ [True, True, True]
2210
+ sage: [T1(T2(T1(T2(b2(i,j))))) == T2(T1(T2(T1(b2(i,j))))) for i in [-2..2] for j in [-1,1]]
2211
+ [True, True, True, True, True, True, True, True, True, True]
2212
+
2213
+ Instead of an index `i` one may use a reduced word or
2214
+ Weyl group element::
2215
+
2216
+ sage: b2(1,0).demazure_lusztig([2,1],v)==T2(T1(b2(1,0)))
2217
+ True
2218
+ sage: W = B2.space().weyl_group(prefix='s')
2219
+ sage: [s1,s2]=W.simple_reflections()
2220
+ sage: b2(1,0).demazure_lusztig(s2*s1,v)==T2(T1(b2(1,0)))
2221
+ True
2222
+ """
2223
+ if i in self.parent().space().index_set():
2224
+ rho = self.parent().space().from_vector_notation(self.parent().space().rho(), style='coroots')
2225
+ inv = self.scale(-1)
2226
+ return (-inv.shift(-rho).demazure([i]).shift(rho) + v * inv.demazure([i])).scale(-1)
2227
+ elif isinstance(i, list):
2228
+ if not i:
2229
+ return self
2230
+ elif len(i) == 1:
2231
+ return self.demazure_lusztig(i[0], v)
2232
+ else:
2233
+ return self.demazure_lusztig(i[1:], v).demazure_lusztig(i[:1], v)
2234
+ else:
2235
+ try:
2236
+ return self.demazure_lusztig(i.reduced_word(), v)
2237
+ except Exception:
2238
+ raise ValueError("unknown index {}".format(i))