passagemath-combinat 10.6.42__cp314-cp314t-win_amd64.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.
Files changed (401) hide show
  1. passagemath_combinat/__init__.py +3 -0
  2. passagemath_combinat-10.6.42.dist-info/DELVEWHEEL +2 -0
  3. passagemath_combinat-10.6.42.dist-info/METADATA +160 -0
  4. passagemath_combinat-10.6.42.dist-info/RECORD +401 -0
  5. passagemath_combinat-10.6.42.dist-info/WHEEL +5 -0
  6. passagemath_combinat-10.6.42.dist-info/top_level.txt +3 -0
  7. passagemath_combinat.libs/libgmp-10-3a5f019e2510aeaad918cab2b57a689d.dll +0 -0
  8. passagemath_combinat.libs/libsymmetrica-3-7dcf900932804d0df5fd0919b4668720.dll +0 -0
  9. sage/algebras/affine_nil_temperley_lieb.py +263 -0
  10. sage/algebras/all.py +24 -0
  11. sage/algebras/all__sagemath_combinat.py +35 -0
  12. sage/algebras/askey_wilson.py +935 -0
  13. sage/algebras/associated_graded.py +345 -0
  14. sage/algebras/cellular_basis.py +350 -0
  15. sage/algebras/cluster_algebra.py +2766 -0
  16. sage/algebras/down_up_algebra.py +860 -0
  17. sage/algebras/free_algebra.py +1698 -0
  18. sage/algebras/free_algebra_element.py +345 -0
  19. sage/algebras/free_algebra_quotient.py +405 -0
  20. sage/algebras/free_algebra_quotient_element.py +295 -0
  21. sage/algebras/free_zinbiel_algebra.py +885 -0
  22. sage/algebras/hall_algebra.py +783 -0
  23. sage/algebras/hecke_algebras/all.py +4 -0
  24. sage/algebras/hecke_algebras/ariki_koike_algebra.py +1796 -0
  25. sage/algebras/hecke_algebras/ariki_koike_specht_modules.py +475 -0
  26. sage/algebras/hecke_algebras/cubic_hecke_algebra.py +3520 -0
  27. sage/algebras/hecke_algebras/cubic_hecke_base_ring.py +1473 -0
  28. sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py +1079 -0
  29. sage/algebras/iwahori_hecke_algebra.py +3095 -0
  30. sage/algebras/jordan_algebra.py +1773 -0
  31. sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py +113 -0
  32. sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py +156 -0
  33. sage/algebras/lie_conformal_algebras/all.py +18 -0
  34. sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py +134 -0
  35. sage/algebras/lie_conformal_algebras/examples.py +43 -0
  36. sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py +131 -0
  37. sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py +139 -0
  38. sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py +174 -0
  39. sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py +167 -0
  40. sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py +107 -0
  41. sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py +135 -0
  42. sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py +353 -0
  43. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py +236 -0
  44. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py +78 -0
  45. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +328 -0
  46. sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py +117 -0
  47. sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py +86 -0
  48. sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py +82 -0
  49. sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py +205 -0
  50. sage/algebras/nil_coxeter_algebra.py +191 -0
  51. sage/algebras/q_commuting_polynomials.py +673 -0
  52. sage/algebras/q_system.py +608 -0
  53. sage/algebras/quantum_clifford.py +959 -0
  54. sage/algebras/quantum_groups/ace_quantum_onsager.py +693 -0
  55. sage/algebras/quantum_groups/all.py +9 -0
  56. sage/algebras/quantum_groups/fock_space.py +2219 -0
  57. sage/algebras/quantum_groups/q_numbers.py +207 -0
  58. sage/algebras/quantum_groups/quantum_group_gap.py +2695 -0
  59. sage/algebras/quantum_groups/representations.py +591 -0
  60. sage/algebras/quantum_matrix_coordinate_algebra.py +1006 -0
  61. sage/algebras/quantum_oscillator.py +623 -0
  62. sage/algebras/quaternion_algebra.py +20 -0
  63. sage/algebras/quaternion_algebra_element.py +55 -0
  64. sage/algebras/rational_cherednik_algebra.py +525 -0
  65. sage/algebras/schur_algebra.py +670 -0
  66. sage/algebras/shuffle_algebra.py +1011 -0
  67. sage/algebras/splitting_algebra.py +779 -0
  68. sage/algebras/tensor_algebra.py +709 -0
  69. sage/algebras/yangian.py +1082 -0
  70. sage/algebras/yokonuma_hecke_algebra.py +1018 -0
  71. sage/all__sagemath_combinat.py +44 -0
  72. sage/combinat/SJT.py +255 -0
  73. sage/combinat/affine_permutation.py +2405 -0
  74. sage/combinat/algebraic_combinatorics.py +55 -0
  75. sage/combinat/all.py +53 -0
  76. sage/combinat/all__sagemath_combinat.py +195 -0
  77. sage/combinat/alternating_sign_matrix.py +2063 -0
  78. sage/combinat/baxter_permutations.py +346 -0
  79. sage/combinat/bijectionist.py +3220 -0
  80. sage/combinat/binary_recurrence_sequences.py +1180 -0
  81. sage/combinat/blob_algebra.py +685 -0
  82. sage/combinat/catalog_partitions.py +27 -0
  83. sage/combinat/chas/all.py +23 -0
  84. sage/combinat/chas/fsym.py +1180 -0
  85. sage/combinat/chas/wqsym.py +2601 -0
  86. sage/combinat/cluster_complex.py +326 -0
  87. sage/combinat/colored_permutations.py +2039 -0
  88. sage/combinat/colored_permutations_representations.py +964 -0
  89. sage/combinat/composition_signed.py +142 -0
  90. sage/combinat/composition_tableau.py +855 -0
  91. sage/combinat/constellation.py +1729 -0
  92. sage/combinat/core.py +751 -0
  93. sage/combinat/counting.py +12 -0
  94. sage/combinat/crystals/affine.py +742 -0
  95. sage/combinat/crystals/affine_factorization.py +518 -0
  96. sage/combinat/crystals/affinization.py +331 -0
  97. sage/combinat/crystals/alcove_path.py +2013 -0
  98. sage/combinat/crystals/all.py +22 -0
  99. sage/combinat/crystals/bkk_crystals.py +141 -0
  100. sage/combinat/crystals/catalog.py +115 -0
  101. sage/combinat/crystals/catalog_elementary_crystals.py +18 -0
  102. sage/combinat/crystals/catalog_infinity_crystals.py +33 -0
  103. sage/combinat/crystals/catalog_kirillov_reshetikhin.py +18 -0
  104. sage/combinat/crystals/crystals.py +257 -0
  105. sage/combinat/crystals/direct_sum.py +260 -0
  106. sage/combinat/crystals/elementary_crystals.py +1251 -0
  107. sage/combinat/crystals/fast_crystals.py +441 -0
  108. sage/combinat/crystals/fully_commutative_stable_grothendieck.py +1205 -0
  109. sage/combinat/crystals/generalized_young_walls.py +1076 -0
  110. sage/combinat/crystals/highest_weight_crystals.py +436 -0
  111. sage/combinat/crystals/induced_structure.py +695 -0
  112. sage/combinat/crystals/infinity_crystals.py +730 -0
  113. sage/combinat/crystals/kac_modules.py +863 -0
  114. sage/combinat/crystals/kirillov_reshetikhin.py +4196 -0
  115. sage/combinat/crystals/kyoto_path_model.py +497 -0
  116. sage/combinat/crystals/letters.cp314t-win_amd64.pyd +0 -0
  117. sage/combinat/crystals/letters.pxd +79 -0
  118. sage/combinat/crystals/letters.pyx +3056 -0
  119. sage/combinat/crystals/littelmann_path.py +1518 -0
  120. sage/combinat/crystals/monomial_crystals.py +1262 -0
  121. sage/combinat/crystals/multisegments.py +462 -0
  122. sage/combinat/crystals/mv_polytopes.py +467 -0
  123. sage/combinat/crystals/pbw_crystal.py +511 -0
  124. sage/combinat/crystals/pbw_datum.cp314t-win_amd64.pyd +0 -0
  125. sage/combinat/crystals/pbw_datum.pxd +4 -0
  126. sage/combinat/crystals/pbw_datum.pyx +487 -0
  127. sage/combinat/crystals/polyhedral_realization.py +372 -0
  128. sage/combinat/crystals/spins.cp314t-win_amd64.pyd +0 -0
  129. sage/combinat/crystals/spins.pxd +21 -0
  130. sage/combinat/crystals/spins.pyx +756 -0
  131. sage/combinat/crystals/star_crystal.py +290 -0
  132. sage/combinat/crystals/subcrystal.py +464 -0
  133. sage/combinat/crystals/tensor_product.py +1177 -0
  134. sage/combinat/crystals/tensor_product_element.cp314t-win_amd64.pyd +0 -0
  135. sage/combinat/crystals/tensor_product_element.pxd +35 -0
  136. sage/combinat/crystals/tensor_product_element.pyx +1870 -0
  137. sage/combinat/crystals/virtual_crystal.py +420 -0
  138. sage/combinat/cyclic_sieving_phenomenon.py +204 -0
  139. sage/combinat/debruijn_sequence.cp314t-win_amd64.pyd +0 -0
  140. sage/combinat/debruijn_sequence.pyx +355 -0
  141. sage/combinat/decorated_permutation.py +270 -0
  142. sage/combinat/degree_sequences.cp314t-win_amd64.pyd +0 -0
  143. sage/combinat/degree_sequences.pyx +588 -0
  144. sage/combinat/derangements.py +527 -0
  145. sage/combinat/descent_algebra.py +1008 -0
  146. sage/combinat/diagram.py +1551 -0
  147. sage/combinat/diagram_algebras.py +5886 -0
  148. sage/combinat/dyck_word.py +4349 -0
  149. sage/combinat/e_one_star.py +1623 -0
  150. sage/combinat/enumerated_sets.py +123 -0
  151. sage/combinat/expnums.cp314t-win_amd64.pyd +0 -0
  152. sage/combinat/expnums.pyx +148 -0
  153. sage/combinat/fast_vector_partitions.cp314t-win_amd64.pyd +0 -0
  154. sage/combinat/fast_vector_partitions.pyx +346 -0
  155. sage/combinat/fqsym.py +1977 -0
  156. sage/combinat/free_dendriform_algebra.py +954 -0
  157. sage/combinat/free_prelie_algebra.py +1141 -0
  158. sage/combinat/fully_commutative_elements.py +1077 -0
  159. sage/combinat/fully_packed_loop.py +1523 -0
  160. sage/combinat/gelfand_tsetlin_patterns.py +1409 -0
  161. sage/combinat/gray_codes.py +311 -0
  162. sage/combinat/grossman_larson_algebras.py +667 -0
  163. sage/combinat/growth.py +4352 -0
  164. sage/combinat/hall_polynomial.py +188 -0
  165. sage/combinat/hillman_grassl.py +866 -0
  166. sage/combinat/integer_matrices.py +329 -0
  167. sage/combinat/integer_vectors_mod_permgroup.py +1238 -0
  168. sage/combinat/k_tableau.py +4564 -0
  169. sage/combinat/kazhdan_lusztig.py +215 -0
  170. sage/combinat/key_polynomial.py +885 -0
  171. sage/combinat/knutson_tao_puzzles.py +2286 -0
  172. sage/combinat/lr_tableau.py +311 -0
  173. sage/combinat/matrices/all.py +24 -0
  174. sage/combinat/matrices/hadamard_matrix.py +3790 -0
  175. sage/combinat/matrices/latin.py +2912 -0
  176. sage/combinat/misc.py +401 -0
  177. sage/combinat/multiset_partition_into_sets_ordered.py +3541 -0
  178. sage/combinat/ncsf_qsym/all.py +21 -0
  179. sage/combinat/ncsf_qsym/combinatorics.py +317 -0
  180. sage/combinat/ncsf_qsym/generic_basis_code.py +1427 -0
  181. sage/combinat/ncsf_qsym/ncsf.py +5637 -0
  182. sage/combinat/ncsf_qsym/qsym.py +4053 -0
  183. sage/combinat/ncsf_qsym/tutorial.py +447 -0
  184. sage/combinat/ncsym/all.py +21 -0
  185. sage/combinat/ncsym/bases.py +855 -0
  186. sage/combinat/ncsym/dual.py +593 -0
  187. sage/combinat/ncsym/ncsym.py +2076 -0
  188. sage/combinat/necklace.py +551 -0
  189. sage/combinat/non_decreasing_parking_function.py +634 -0
  190. sage/combinat/nu_dyck_word.py +1474 -0
  191. sage/combinat/output.py +861 -0
  192. sage/combinat/parallelogram_polyomino.py +4326 -0
  193. sage/combinat/parking_functions.py +1602 -0
  194. sage/combinat/partition_algebra.py +1998 -0
  195. sage/combinat/partition_kleshchev.py +1982 -0
  196. sage/combinat/partition_shifting_algebras.py +584 -0
  197. sage/combinat/partition_tuple.py +3114 -0
  198. sage/combinat/path_tableaux/all.py +13 -0
  199. sage/combinat/path_tableaux/catalog.py +29 -0
  200. sage/combinat/path_tableaux/dyck_path.py +380 -0
  201. sage/combinat/path_tableaux/frieze.py +476 -0
  202. sage/combinat/path_tableaux/path_tableau.py +728 -0
  203. sage/combinat/path_tableaux/semistandard.py +510 -0
  204. sage/combinat/perfect_matching.py +779 -0
  205. sage/combinat/plane_partition.py +3300 -0
  206. sage/combinat/q_bernoulli.cp314t-win_amd64.pyd +0 -0
  207. sage/combinat/q_bernoulli.pyx +128 -0
  208. sage/combinat/quickref.py +81 -0
  209. sage/combinat/recognizable_series.py +2051 -0
  210. sage/combinat/regular_sequence.py +4316 -0
  211. sage/combinat/regular_sequence_bounded.py +543 -0
  212. sage/combinat/restricted_growth.py +81 -0
  213. sage/combinat/ribbon.py +20 -0
  214. sage/combinat/ribbon_shaped_tableau.py +489 -0
  215. sage/combinat/ribbon_tableau.py +1180 -0
  216. sage/combinat/rigged_configurations/all.py +46 -0
  217. sage/combinat/rigged_configurations/bij_abstract_class.py +548 -0
  218. sage/combinat/rigged_configurations/bij_infinity.py +370 -0
  219. sage/combinat/rigged_configurations/bij_type_A.py +163 -0
  220. sage/combinat/rigged_configurations/bij_type_A2_dual.py +338 -0
  221. sage/combinat/rigged_configurations/bij_type_A2_even.py +218 -0
  222. sage/combinat/rigged_configurations/bij_type_A2_odd.py +199 -0
  223. sage/combinat/rigged_configurations/bij_type_B.py +900 -0
  224. sage/combinat/rigged_configurations/bij_type_C.py +267 -0
  225. sage/combinat/rigged_configurations/bij_type_D.py +771 -0
  226. sage/combinat/rigged_configurations/bij_type_D_tri.py +392 -0
  227. sage/combinat/rigged_configurations/bij_type_D_twisted.py +576 -0
  228. sage/combinat/rigged_configurations/bij_type_E67.py +402 -0
  229. sage/combinat/rigged_configurations/bijection.py +143 -0
  230. sage/combinat/rigged_configurations/kleber_tree.py +1475 -0
  231. sage/combinat/rigged_configurations/kr_tableaux.py +1898 -0
  232. sage/combinat/rigged_configurations/rc_crystal.py +461 -0
  233. sage/combinat/rigged_configurations/rc_infinity.py +540 -0
  234. sage/combinat/rigged_configurations/rigged_configuration_element.py +2403 -0
  235. sage/combinat/rigged_configurations/rigged_configurations.py +1918 -0
  236. sage/combinat/rigged_configurations/rigged_partition.cp314t-win_amd64.pyd +0 -0
  237. sage/combinat/rigged_configurations/rigged_partition.pxd +15 -0
  238. sage/combinat/rigged_configurations/rigged_partition.pyx +680 -0
  239. sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py +499 -0
  240. sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py +428 -0
  241. sage/combinat/rsk.py +3438 -0
  242. sage/combinat/schubert_polynomial.py +508 -0
  243. sage/combinat/set_partition.py +3318 -0
  244. sage/combinat/set_partition_iterator.cp314t-win_amd64.pyd +0 -0
  245. sage/combinat/set_partition_iterator.pyx +136 -0
  246. sage/combinat/set_partition_ordered.py +1590 -0
  247. sage/combinat/sf/abreu_nigro.py +346 -0
  248. sage/combinat/sf/all.py +52 -0
  249. sage/combinat/sf/character.py +576 -0
  250. sage/combinat/sf/classical.py +319 -0
  251. sage/combinat/sf/dual.py +996 -0
  252. sage/combinat/sf/elementary.py +549 -0
  253. sage/combinat/sf/hall_littlewood.py +1028 -0
  254. sage/combinat/sf/hecke.py +336 -0
  255. sage/combinat/sf/homogeneous.py +464 -0
  256. sage/combinat/sf/jack.py +1428 -0
  257. sage/combinat/sf/k_dual.py +1458 -0
  258. sage/combinat/sf/kfpoly.py +447 -0
  259. sage/combinat/sf/llt.py +789 -0
  260. sage/combinat/sf/macdonald.py +2019 -0
  261. sage/combinat/sf/monomial.py +525 -0
  262. sage/combinat/sf/multiplicative.py +113 -0
  263. sage/combinat/sf/new_kschur.py +1786 -0
  264. sage/combinat/sf/ns_macdonald.py +964 -0
  265. sage/combinat/sf/orthogonal.py +246 -0
  266. sage/combinat/sf/orthotriang.py +355 -0
  267. sage/combinat/sf/powersum.py +963 -0
  268. sage/combinat/sf/schur.py +880 -0
  269. sage/combinat/sf/sf.py +1653 -0
  270. sage/combinat/sf/sfa.py +7053 -0
  271. sage/combinat/sf/symplectic.py +253 -0
  272. sage/combinat/sf/witt.py +721 -0
  273. sage/combinat/shifted_primed_tableau.py +2735 -0
  274. sage/combinat/shuffle.py +830 -0
  275. sage/combinat/sidon_sets.py +146 -0
  276. sage/combinat/similarity_class_type.py +1721 -0
  277. sage/combinat/sine_gordon.py +618 -0
  278. sage/combinat/six_vertex_model.py +784 -0
  279. sage/combinat/skew_partition.py +2053 -0
  280. sage/combinat/skew_tableau.py +2989 -0
  281. sage/combinat/sloane_functions.py +8935 -0
  282. sage/combinat/specht_module.py +1403 -0
  283. sage/combinat/species/all.py +48 -0
  284. sage/combinat/species/characteristic_species.py +321 -0
  285. sage/combinat/species/composition_species.py +273 -0
  286. sage/combinat/species/cycle_species.py +284 -0
  287. sage/combinat/species/empty_species.py +155 -0
  288. sage/combinat/species/functorial_composition_species.py +148 -0
  289. sage/combinat/species/generating_series.py +673 -0
  290. sage/combinat/species/library.py +148 -0
  291. sage/combinat/species/linear_order_species.py +169 -0
  292. sage/combinat/species/misc.py +83 -0
  293. sage/combinat/species/partition_species.py +290 -0
  294. sage/combinat/species/permutation_species.py +268 -0
  295. sage/combinat/species/product_species.py +423 -0
  296. sage/combinat/species/recursive_species.py +476 -0
  297. sage/combinat/species/set_species.py +192 -0
  298. sage/combinat/species/species.py +820 -0
  299. sage/combinat/species/structure.py +539 -0
  300. sage/combinat/species/subset_species.py +243 -0
  301. sage/combinat/species/sum_species.py +225 -0
  302. sage/combinat/subword.py +564 -0
  303. sage/combinat/subword_complex.py +2122 -0
  304. sage/combinat/subword_complex_c.cp314t-win_amd64.pyd +0 -0
  305. sage/combinat/subword_complex_c.pyx +119 -0
  306. sage/combinat/super_tableau.py +821 -0
  307. sage/combinat/superpartition.py +1154 -0
  308. sage/combinat/symmetric_group_algebra.py +3774 -0
  309. sage/combinat/symmetric_group_representations.py +1830 -0
  310. sage/combinat/t_sequences.py +877 -0
  311. sage/combinat/tableau.py +9506 -0
  312. sage/combinat/tableau_residues.py +860 -0
  313. sage/combinat/tableau_tuple.py +5353 -0
  314. sage/combinat/tiling.py +2432 -0
  315. sage/combinat/triangles_FHM.py +777 -0
  316. sage/combinat/tutorial.py +1857 -0
  317. sage/combinat/vector_partition.py +337 -0
  318. sage/combinat/words/abstract_word.py +1722 -0
  319. sage/combinat/words/all.py +59 -0
  320. sage/combinat/words/alphabet.py +268 -0
  321. sage/combinat/words/finite_word.py +7201 -0
  322. sage/combinat/words/infinite_word.py +113 -0
  323. sage/combinat/words/lyndon_word.py +652 -0
  324. sage/combinat/words/morphic.py +351 -0
  325. sage/combinat/words/morphism.py +3878 -0
  326. sage/combinat/words/paths.py +2932 -0
  327. sage/combinat/words/shuffle_product.py +278 -0
  328. sage/combinat/words/suffix_trees.py +1873 -0
  329. sage/combinat/words/word.py +769 -0
  330. sage/combinat/words/word_char.cp314t-win_amd64.pyd +0 -0
  331. sage/combinat/words/word_char.pyx +847 -0
  332. sage/combinat/words/word_datatypes.cp314t-win_amd64.pyd +0 -0
  333. sage/combinat/words/word_datatypes.pxd +4 -0
  334. sage/combinat/words/word_datatypes.pyx +1067 -0
  335. sage/combinat/words/word_generators.py +2026 -0
  336. sage/combinat/words/word_infinite_datatypes.py +1218 -0
  337. sage/combinat/words/word_options.py +99 -0
  338. sage/combinat/words/words.py +2396 -0
  339. sage/data_structures/all__sagemath_combinat.py +1 -0
  340. sage/databases/all__sagemath_combinat.py +13 -0
  341. sage/databases/findstat.py +4897 -0
  342. sage/databases/oeis.py +2058 -0
  343. sage/databases/sloane.py +393 -0
  344. sage/dynamics/all__sagemath_combinat.py +14 -0
  345. sage/dynamics/cellular_automata/all.py +7 -0
  346. sage/dynamics/cellular_automata/catalog.py +34 -0
  347. sage/dynamics/cellular_automata/elementary.py +612 -0
  348. sage/dynamics/cellular_automata/glca.py +477 -0
  349. sage/dynamics/cellular_automata/solitons.py +1463 -0
  350. sage/dynamics/finite_dynamical_system.py +1249 -0
  351. sage/dynamics/finite_dynamical_system_catalog.py +382 -0
  352. sage/games/all.py +7 -0
  353. sage/games/hexad.py +704 -0
  354. sage/games/quantumino.py +591 -0
  355. sage/games/sudoku.py +889 -0
  356. sage/games/sudoku_backtrack.cp314t-win_amd64.pyd +0 -0
  357. sage/games/sudoku_backtrack.pyx +189 -0
  358. sage/groups/all__sagemath_combinat.py +1 -0
  359. sage/groups/indexed_free_group.py +489 -0
  360. sage/libs/all__sagemath_combinat.py +6 -0
  361. sage/libs/lrcalc/__init__.py +1 -0
  362. sage/libs/lrcalc/lrcalc.py +525 -0
  363. sage/libs/symmetrica/__init__.py +7 -0
  364. sage/libs/symmetrica/all.py +101 -0
  365. sage/libs/symmetrica/kostka.pxi +168 -0
  366. sage/libs/symmetrica/part.pxi +193 -0
  367. sage/libs/symmetrica/plet.pxi +42 -0
  368. sage/libs/symmetrica/sab.pxi +196 -0
  369. sage/libs/symmetrica/sb.pxi +332 -0
  370. sage/libs/symmetrica/sc.pxi +192 -0
  371. sage/libs/symmetrica/schur.pxi +956 -0
  372. sage/libs/symmetrica/symmetrica.cp314t-win_amd64.pyd +0 -0
  373. sage/libs/symmetrica/symmetrica.pxi +1172 -0
  374. sage/libs/symmetrica/symmetrica.pyx +39 -0
  375. sage/monoids/all.py +13 -0
  376. sage/monoids/automatic_semigroup.py +1054 -0
  377. sage/monoids/free_abelian_monoid.py +315 -0
  378. sage/monoids/free_abelian_monoid_element.cp314t-win_amd64.pyd +0 -0
  379. sage/monoids/free_abelian_monoid_element.pxd +16 -0
  380. sage/monoids/free_abelian_monoid_element.pyx +397 -0
  381. sage/monoids/free_monoid.py +335 -0
  382. sage/monoids/free_monoid_element.py +431 -0
  383. sage/monoids/hecke_monoid.py +65 -0
  384. sage/monoids/string_monoid.py +817 -0
  385. sage/monoids/string_monoid_element.py +547 -0
  386. sage/monoids/string_ops.py +143 -0
  387. sage/monoids/trace_monoid.py +972 -0
  388. sage/rings/all__sagemath_combinat.py +2 -0
  389. sage/sat/all.py +4 -0
  390. sage/sat/boolean_polynomials.py +405 -0
  391. sage/sat/converters/__init__.py +6 -0
  392. sage/sat/converters/anf2cnf.py +14 -0
  393. sage/sat/converters/polybori.py +611 -0
  394. sage/sat/solvers/__init__.py +5 -0
  395. sage/sat/solvers/cryptominisat.py +287 -0
  396. sage/sat/solvers/dimacs.py +783 -0
  397. sage/sat/solvers/picosat.py +228 -0
  398. sage/sat/solvers/sat_lp.py +156 -0
  399. sage/sat/solvers/satsolver.cp314t-win_amd64.pyd +0 -0
  400. sage/sat/solvers/satsolver.pxd +3 -0
  401. sage/sat/solvers/satsolver.pyx +405 -0
@@ -0,0 +1,963 @@
1
+ # sage_setup: distribution = sagemath-combinat
2
+ # sage.doctest: needs sage.combinat sage.modules
3
+ """
4
+ Power sum symmetric functions
5
+ """
6
+ #*****************************************************************************
7
+ # Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>
8
+ # 2012 Mike Zabrocki <mike.zabrocki@gmail.com>
9
+ # 2012 Anne Schilling <anne at math.ucdavis.edu>
10
+ #
11
+ # Distributed under the terms of the GNU General Public License (GPL)
12
+ #
13
+ # This code is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
+ # General Public License for more details.
17
+ #
18
+ # The full text of the GPL is available at:
19
+ #
20
+ # http://www.gnu.org/licenses/
21
+ #*****************************************************************************
22
+ from sage.arith.misc import divisors
23
+ from sage.combinat.partition import Partition
24
+ from sage.misc.misc_c import prod
25
+ from sage.misc.superseded import deprecated_function_alias
26
+ from sage.rings.infinity import infinity
27
+ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
28
+
29
+ from . import classical, multiplicative, sfa
30
+
31
+
32
+ class SymmetricFunctionAlgebra_power(multiplicative.SymmetricFunctionAlgebra_multiplicative):
33
+ def __init__(self, Sym):
34
+ """
35
+ A class for methods associated to the power sum basis of the symmetric functions.
36
+
37
+ INPUT:
38
+
39
+ - ``self`` -- the power sum basis of the symmetric functions
40
+ - ``Sym`` -- an instance of the ring of symmetric functions
41
+
42
+ TESTS::
43
+
44
+ sage: p = SymmetricFunctions(QQ).p()
45
+ sage: p == loads(dumps(p))
46
+ True
47
+ sage: TestSuite(p).run(skip=['_test_associativity', '_test_distributivity', '_test_prod'])
48
+ sage: TestSuite(p).run(elements = [p[1,1]+p[2], p[1]+2*p[1,1]])
49
+ """
50
+ classical.SymmetricFunctionAlgebra_classical.__init__(self, Sym, "powersum", 'p')
51
+
52
+ def coproduct_on_generators(self, i):
53
+ r"""
54
+ Return coproduct on generators for power sums `p_i`
55
+ (for `i > 0`).
56
+
57
+ The elements `p_i` are primitive elements.
58
+
59
+ INPUT:
60
+
61
+ - ``self`` -- the power sum basis of the symmetric functions
62
+ - ``i`` -- positive integer
63
+
64
+ OUTPUT: the result of the coproduct on the generator `p(i)`
65
+
66
+ EXAMPLES::
67
+
68
+ sage: Sym = SymmetricFunctions(QQ)
69
+ sage: p = Sym.powersum()
70
+ sage: p.coproduct_on_generators(2)
71
+ p[] # p[2] + p[2] # p[]
72
+ """
73
+ Pi = Partition([i])
74
+ P0 = Partition([])
75
+ T = self.tensor_square()
76
+ return T.sum_of_monomials( [(Pi, P0), (P0, Pi)] )
77
+
78
+ def antipode_on_basis(self, partition):
79
+ r"""
80
+ Return the antipode of ``self[partition]``.
81
+
82
+ The antipode on the generator `p_i` (for `i > 0`) is `-p_i`,
83
+ and the antipode on `p_\mu` is `(-1)^{length(\mu)} p_\mu`.
84
+
85
+ INPUT:
86
+
87
+ - ``self`` -- the power sum basis of the symmetric functions
88
+ - ``partition`` -- a partition
89
+
90
+ OUTPUT:
91
+
92
+ - the result of the antipode on ``self(partition)``
93
+
94
+ EXAMPLES::
95
+
96
+ sage: Sym = SymmetricFunctions(QQ)
97
+ sage: p = Sym.p()
98
+ sage: p.antipode_on_basis([2])
99
+ -p[2]
100
+ sage: p.antipode_on_basis([3])
101
+ -p[3]
102
+ sage: p.antipode_on_basis([2,2])
103
+ p[2, 2]
104
+ sage: p.antipode_on_basis([])
105
+ p[]
106
+ """
107
+ if len(partition) % 2 == 0:
108
+ return self[partition]
109
+ return -self[partition]
110
+ #This is slightly faster than: return (-1)**len(partition) * self[partition]
111
+
112
+ def bottom_schur_function(self, partition, degree=None):
113
+ r"""
114
+ Return the least-degree component of ``s[partition]``,
115
+ where ``s`` denotes the Schur basis of the symmetric
116
+ functions, and the grading is not the usual grading on the
117
+ symmetric functions but rather the grading which gives
118
+ every `p_i` degree `1`.
119
+
120
+ This least-degree component has its degree equal to the
121
+ Frobenius rank of ``partition``, while the degree with respect
122
+ to the usual grading is still the size of ``partition``.
123
+
124
+ This method requires the base ring to be a (commutative)
125
+ `\QQ`-algebra. This restriction is unavoidable, since
126
+ the least-degree component (in general) has noninteger
127
+ coefficients in all classical bases of the symmetric
128
+ functions.
129
+
130
+ The optional keyword ``degree`` allows taking any
131
+ homogeneous component rather than merely the least-degree
132
+ one. Specifically, if ``degree`` is set, then the
133
+ ``degree``-th component will be returned.
134
+
135
+ REFERENCES:
136
+
137
+ .. [ClSt03] Peter Clifford, Richard P. Stanley,
138
+ *Bottom Schur functions*.
139
+ :arxiv:`math/0311382v2`.
140
+
141
+ EXAMPLES::
142
+
143
+ sage: Sym = SymmetricFunctions(QQ)
144
+ sage: p = Sym.p()
145
+ sage: p.bottom_schur_function([2,2,1])
146
+ -1/6*p[3, 2] + 1/4*p[4, 1]
147
+ sage: p.bottom_schur_function([2,1])
148
+ -1/3*p[3]
149
+ sage: p.bottom_schur_function([3])
150
+ 1/3*p[3]
151
+ sage: p.bottom_schur_function([1,1,1])
152
+ 1/3*p[3]
153
+ sage: p.bottom_schur_function(Partition([1,1,1]))
154
+ 1/3*p[3]
155
+ sage: p.bottom_schur_function([2,1], degree=1)
156
+ -1/3*p[3]
157
+ sage: p.bottom_schur_function([2,1], degree=2)
158
+ 0
159
+ sage: p.bottom_schur_function([2,1], degree=3)
160
+ 1/3*p[1, 1, 1]
161
+ sage: p.bottom_schur_function([2,2,1], degree=3)
162
+ 1/8*p[2, 2, 1] - 1/6*p[3, 1, 1]
163
+ """
164
+ from sage.combinat.partition import _Partitions
165
+ s = self.realization_of().schur()
166
+ partition = _Partitions(partition)
167
+ if degree is None:
168
+ degree = partition.frobenius_rank()
169
+ s_partition = self(s[partition])
170
+ return self.sum_of_terms([(p, coeff) for p, coeff
171
+ in s_partition if len(p) == degree],
172
+ distinct=True)
173
+
174
+ def eval_at_permutation_roots_on_generators(self, k, rho):
175
+ r"""
176
+ Evaluate `p_k` at eigenvalues of permutation matrix.
177
+
178
+ This function evaluates a symmetric function ``p([k])``
179
+ at the eigenvalues of a permutation matrix with cycle
180
+ structure ``\rho``.
181
+
182
+ This function evaluates a `p_k` at the roots of unity
183
+
184
+ .. MATH::
185
+
186
+ \Xi_{\rho_1},\Xi_{\rho_2},\ldots,\Xi_{\rho_\ell}
187
+
188
+ where
189
+
190
+ .. MATH::
191
+
192
+ \Xi_{m} = 1,\zeta_m,\zeta_m^2,\ldots,\zeta_m^{m-1}
193
+
194
+ and `\zeta_m` is an `m` root of unity.
195
+ This is characterized by `p_k[ A , B ] = p_k[A] + p_k[B]` and
196
+ `p_k[ \Xi_m ] = 0` unless `m` divides `k` and `p_{rm}[\Xi_m]=m`.
197
+
198
+ INPUT:
199
+
200
+ - ``k`` -- nonnegative integer
201
+ - ``rho`` -- a partition or a list of nonnegative integers
202
+
203
+ OUTPUT: an element of the base ring
204
+
205
+ EXAMPLES::
206
+
207
+ sage: p = SymmetricFunctions(QQ).p()
208
+ sage: p.eval_at_permutation_roots_on_generators(3, [6])
209
+ 0
210
+ sage: p.eval_at_permutation_roots_on_generators(3, [3])
211
+ 3
212
+ sage: p.eval_at_permutation_roots_on_generators(3, [1])
213
+ 1
214
+ sage: p.eval_at_permutation_roots_on_generators(3, [3,3])
215
+ 6
216
+ sage: p.eval_at_permutation_roots_on_generators(3, [1,1,1,1,1])
217
+ 5
218
+ """
219
+ return self.base_ring().sum(d*list(rho).count(d) for d in divisors(k))
220
+
221
+ def _magma_init_(self, magma):
222
+ """
223
+ Used in converting this ring to the corresponding ring in MAGMA.
224
+
225
+ EXAMPLES::
226
+
227
+ sage: # optional - magma
228
+ sage: P = SymmetricFunctions(QQ).p()
229
+ sage: t = 4*P[3,2]+9
230
+ sage: mt = magma(t); mt
231
+ 9 + 4*$.[3,2]
232
+ sage: mt.sage()
233
+ 9*p[] + 4*p[3, 2]
234
+ """
235
+ B = magma(self.base_ring())
236
+ Bref = B._ref()
237
+ return f"SymmetricFunctionAlgebraPower({Bref})"
238
+
239
+ class Element(classical.SymmetricFunctionAlgebra_classical.Element):
240
+ def omega(self):
241
+ r"""
242
+ Return the image of ``self`` under the omega automorphism.
243
+
244
+ The *omega automorphism* is defined to be the unique algebra
245
+ endomorphism `\omega` of the ring of symmetric functions that
246
+ satisfies `\omega(e_k) = h_k` for all positive integers `k`
247
+ (where `e_k` stands for the `k`-th elementary symmetric
248
+ function, and `h_k` stands for the `k`-th complete homogeneous
249
+ symmetric function). It furthermore is a Hopf algebra
250
+ endomorphism and an involution, and it is also known as the
251
+ *omega involution*. It sends the power-sum symmetric function
252
+ `p_k` to `(-1)^{k-1} p_k` for every positive integer `k`.
253
+
254
+ The images of some bases under the omega automorphism are given by
255
+
256
+ .. MATH::
257
+
258
+ \omega(e_{\lambda}) = h_{\lambda}, \qquad
259
+ \omega(h_{\lambda}) = e_{\lambda}, \qquad
260
+ \omega(p_{\lambda}) = (-1)^{|\lambda| - \ell(\lambda)}
261
+ p_{\lambda}, \qquad
262
+ \omega(s_{\lambda}) = s_{\lambda^{\prime}},
263
+
264
+ where `\lambda` is any partition, where `\ell(\lambda)` denotes
265
+ the length (:meth:`~sage.combinat.partition.Partition.length`)
266
+ of the partition `\lambda`, where `\lambda^{\prime}` denotes the
267
+ conjugate partition
268
+ (:meth:`~sage.combinat.partition.Partition.conjugate`) of
269
+ `\lambda`, and where the usual notations for bases are used
270
+ (`e` = elementary, `h` = complete homogeneous, `p` = powersum,
271
+ `s` = Schur).
272
+
273
+ :meth:`omega_involution()` is a synonym for the :meth:`omega()`
274
+ method.
275
+
276
+ OUTPUT: the image of ``self`` under the omega automorphism
277
+
278
+ EXAMPLES::
279
+
280
+ sage: p = SymmetricFunctions(QQ).p()
281
+ sage: a = p([2,1]); a
282
+ p[2, 1]
283
+ sage: a.omega()
284
+ -p[2, 1]
285
+ sage: p([]).omega()
286
+ p[]
287
+ sage: p(0).omega()
288
+ 0
289
+ sage: p = SymmetricFunctions(ZZ).p()
290
+ sage: (p([3,1,1]) - 2 * p([2,1])).omega()
291
+ 2*p[2, 1] + p[3, 1, 1]
292
+ """
293
+ f = lambda part, coeff: (part, (-1)**(sum(part)-len(part)) * coeff)
294
+ return self.map_item(f)
295
+
296
+ omega_involution = omega
297
+
298
+ def scalar(self, x, zee=None):
299
+ r"""
300
+ Return the standard scalar product of ``self`` and ``x``.
301
+
302
+ INPUT:
303
+
304
+ - ``x`` -- a power sum symmetric function
305
+ - ``zee`` -- (default: uses standard ``zee`` function) optional
306
+ input specifying the scalar product on the power sum basis with
307
+ normalization `\langle p_{\mu}, p_{\mu} \rangle =
308
+ \mathrm{zee}(\mu)`. ``zee`` should be a function on partitions.
309
+
310
+ Note that the power-sum symmetric functions are orthogonal under
311
+ this scalar product. With the default value of ``zee``, the value
312
+ of `\langle p_{\lambda}, p_{\lambda} \rangle` is given by the
313
+ size of the centralizer in `S_n` of a permutation of cycle
314
+ type `\lambda`.
315
+
316
+ OUTPUT:
317
+
318
+ - the standard scalar product between ``self`` and ``x``, or, if
319
+ the optional parameter ``zee`` is specified, then the scalar
320
+ product with respect to the normalization `\langle p_{\mu},
321
+ p_{\mu} \rangle = \mathrm{zee}(\mu)` with the power sum basis
322
+ elements being orthogonal
323
+
324
+ EXAMPLES::
325
+
326
+ sage: p = SymmetricFunctions(QQ).p()
327
+ sage: p4 = Partitions(4)
328
+ sage: matrix([ [p(a).scalar(p(b)) for a in p4] for b in p4])
329
+ [ 4 0 0 0 0]
330
+ [ 0 3 0 0 0]
331
+ [ 0 0 8 0 0]
332
+ [ 0 0 0 4 0]
333
+ [ 0 0 0 0 24]
334
+ sage: p(0).scalar(p(1))
335
+ 0
336
+ sage: p(1).scalar(p(2))
337
+ 2
338
+
339
+ sage: zee = lambda x : 1
340
+ sage: matrix( [[p[la].scalar(p[mu], zee) for la in Partitions(3)] for mu in Partitions(3)])
341
+ [1 0 0]
342
+ [0 1 0]
343
+ [0 0 1]
344
+ """
345
+ parent = self.parent()
346
+ x = parent(x)
347
+ if zee is None:
348
+ f = lambda part1, part2: sfa.zee(part1)
349
+ else:
350
+ f = lambda part1, part2: zee(part1)
351
+ return parent._apply_multi_module_morphism(self, x, f, orthogonal=True)
352
+
353
+ def _derivative(self, part):
354
+ """
355
+ Return the 'derivative' of ``p([part])`` with respect to ``p([1])``
356
+ (where ``p([part])`` is regarded as a polynomial in the
357
+ indeterminates ``p([i])``).
358
+
359
+ INPUT:
360
+
361
+ - ``part`` -- a partition
362
+
363
+ EXAMPLES::
364
+
365
+ sage: p = SymmetricFunctions(QQ).p()
366
+ sage: a = p([2,1])
367
+ sage: a._derivative(Partition([2,1]))
368
+ p[2]
369
+ sage: a._derivative(Partition([1,1,1]))
370
+ 3*p[1, 1]
371
+ """
372
+ p = self.parent()
373
+ if 1 not in part:
374
+ return p.zero()
375
+ else:
376
+ return len([i for i in part if i == 1]) * p(part[:-1])
377
+
378
+ def _derivative_with_respect_to_p1(self):
379
+ """
380
+ Return the 'derivative' of a symmetric function in the power sum
381
+ basis with respect to ``p([1])`` (where ``p([part])`` is regarded
382
+ as a polynomial in the indeterminates ``p([i])``).
383
+
384
+ On the Frobenius image of an `S_n`-module, the resulting character
385
+ is the Frobenius image of the restriction of this module
386
+ to `S_{n-1}`.
387
+
388
+ OUTPUT:
389
+
390
+ - a symmetric function (in the power sum basis) of degree one
391
+ smaller than ``self``, obtained by differentiating ``self``
392
+ by `p_1`.
393
+
394
+ EXAMPLES::
395
+
396
+ sage: p = SymmetricFunctions(QQ).p()
397
+ sage: a = p([2,1,1,1])
398
+ sage: a._derivative_with_respect_to_p1()
399
+ 3*p[2, 1, 1]
400
+ sage: a = p([3,2])
401
+ sage: a._derivative_with_respect_to_p1()
402
+ 0
403
+ sage: p(0)._derivative_with_respect_to_p1()
404
+ 0
405
+ sage: p(1)._derivative_with_respect_to_p1()
406
+ 0
407
+ sage: p([1])._derivative_with_respect_to_p1()
408
+ p[]
409
+ sage: f = p[1] + p[2,1]
410
+ sage: f._derivative_with_respect_to_p1()
411
+ p[] + p[2]
412
+ """
413
+ p = self.parent()
414
+ if self == p.zero():
415
+ return self
416
+ return p._apply_module_morphism(self, self._derivative)
417
+
418
+ def adams_operator(self, n):
419
+ r"""
420
+ Return the image of the symmetric function ``self`` under the
421
+ `n`-th Adams operator.
422
+
423
+ The `n`-th Adams operator `\mathbf{f}_n` is defined to be the
424
+ map from the ring of symmetric functions to itself that sends
425
+ every symmetric function `P(x_1, x_2, x_3, \ldots)` to
426
+ `P(x_1^n, x_2^n, x_3^n, \ldots)`. This operator `\mathbf{f}_n`
427
+ is a Hopf algebra endomorphism, and satisfies
428
+
429
+ .. MATH::
430
+
431
+ \mathbf{f}_n m_{(\lambda_1, \lambda_2, \lambda_3, \ldots)} =
432
+ m_{(n\lambda_1, n\lambda_2, n\lambda_3, \ldots)}
433
+
434
+ for every partition `(\lambda_1, \lambda_2, \lambda_3, \ldots)`
435
+ (where `m` means the monomial basis). Moreover,
436
+ `\mathbf{f}_n (p_r) = p_{nr}` for every positive integer `r` (where
437
+ `p_k` denotes the `k`-th powersum symmetric function).
438
+
439
+ The `n`-th Adams operator is also called the `n`-th
440
+ Frobenius endomorphism. It is not related to the Frobenius map
441
+ which connects the ring of symmetric functions with the
442
+ representation theory of the symmetric group.
443
+
444
+ The `n`-th Adams operator is the `n`-th Adams operator
445
+ of the `\Lambda`-ring of symmetric functions over the integers.
446
+
447
+ The `n`-th Adams operator can also be described via plethysm:
448
+ Every symmetric function `P` satisfies
449
+ `\mathbf{f}_n(P) = p_n \circ P = P \circ p_n`,
450
+ where `p_n` is the `n`-th powersum symmetric function, and `\circ`
451
+ denotes (outer) plethysm.
452
+
453
+ INPUT:
454
+
455
+ - ``n`` -- positive integer
456
+
457
+ OUTPUT:
458
+
459
+ The result of applying the `n`-th Adams operator (on the ring
460
+ of symmetric functions) to ``self``.
461
+
462
+ EXAMPLES::
463
+
464
+ sage: Sym = SymmetricFunctions(ZZ)
465
+ sage: p = Sym.p()
466
+ sage: p[3].adams_operator(2)
467
+ p[6]
468
+ sage: p[4,2,1].adams_operator(3)
469
+ p[12, 6, 3]
470
+ sage: p([]).adams_operator(4)
471
+ p[]
472
+ sage: p[3].adams_operator(1)
473
+ p[3]
474
+ sage: (p([3]) - p([2]) + p([])).adams_operator(3)
475
+ p[] - p[6] + p[9]
476
+
477
+ TESTS:
478
+
479
+ Let us check that this method on the powersum basis gives the
480
+ same result as the implementation in :mod:`sage.combinat.sf.sfa`
481
+ on the complete homogeneous basis::
482
+
483
+ sage: Sym = SymmetricFunctions(QQ)
484
+ sage: p = Sym.p(); h = Sym.h()
485
+ sage: all( h(p(lam)).adams_operator(3) == h(p(lam).adams_operator(3))
486
+ ....: for lam in Partitions(3) )
487
+ True
488
+ sage: all( p(h(lam)).adams_operator(2) == p(h(lam).adams_operator(2))
489
+ ....: for lam in Partitions(4) )
490
+ True
491
+
492
+ .. SEEALSO::
493
+
494
+ :meth:`~sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.plethysm`
495
+ """
496
+ dct = {lam.stretch(n): coeff
497
+ for lam, coeff in self.monomial_coefficients().items()}
498
+ return self.parent()._from_dict(dct)
499
+
500
+ frobenius = deprecated_function_alias(36396, adams_operator)
501
+
502
+ adams_operation = deprecated_function_alias(36396, adams_operator)
503
+
504
+ def verschiebung(self, n):
505
+ r"""
506
+ Return the image of the symmetric function ``self`` under the
507
+ `n`-th Verschiebung operator.
508
+
509
+ The `n`-th Verschiebung operator `\mathbf{V}_n` is defined to be
510
+ the unique algebra endomorphism `V` of the ring of symmetric
511
+ functions that satisfies `V(h_r) = h_{r/n}` for every positive
512
+ integer `r` divisible by `n`, and satisfies `V(h_r) = 0` for
513
+ every positive integer `r` not divisible by `n`. This operator
514
+ `\mathbf{V}_n` is a Hopf algebra endomorphism. For every
515
+ nonnegative integer `r` with `n \mid r`, it satisfies
516
+
517
+ .. MATH::
518
+
519
+ \mathbf{V}_n(h_r) = h_{r/n},
520
+ \quad \mathbf{V}_n(p_r) = n p_{r/n},
521
+ \quad \mathbf{V}_n(e_r) = (-1)^{r - r/n} e_{r/n}
522
+
523
+ (where `h` is the complete homogeneous basis, `p` is the
524
+ powersum basis, and `e` is the elementary basis). For every
525
+ nonnegative integer `r` with `n \nmid r`, it satisfes
526
+
527
+ .. MATH::
528
+
529
+ \mathbf{V}_n(h_r) = \mathbf{V}_n(p_r) = \mathbf{V}_n(e_r) = 0.
530
+
531
+ The `n`-th Verschiebung operator is also called the `n`-th
532
+ Verschiebung endomorphism. Its name derives from the Verschiebung
533
+ (German for "shift") endomorphism of the Witt vectors.
534
+
535
+ The `n`-th Verschiebung operator is adjoint to the `n`-th
536
+ Adams operator (see :meth:`adams_operator` for its definition)
537
+ with respect to the Hall scalar product (:meth:`scalar`).
538
+
539
+ The action of the `n`-th Verschiebung operator on the Schur basis
540
+ can also be computed explicitly. The following (probably clumsier
541
+ than necessary) description can be obtained by solving exercise
542
+ 7.61 in Stanley's [STA]_.
543
+
544
+ Let `\lambda` be a partition. Let `n` be a positive integer. If
545
+ the `n`-core of `\lambda` is nonempty, then
546
+ `\mathbf{V}_n(s_\lambda) = 0`. Otherwise, the following method
547
+ computes `\mathbf{V}_n(s_\lambda)`: Write the partition `\lambda`
548
+ in the form `(\lambda_1, \lambda_2, \ldots, \lambda_{ns})` for some
549
+ nonnegative integer `s`. (If `n` does not divide the length of
550
+ `\lambda`, then this is achieved by adding trailing zeroes to
551
+ `\lambda`.) Set `\beta_i = \lambda_i + ns - i` for every
552
+ `s \in \{ 1, 2, \ldots, ns \}`. Then,
553
+ `(\beta_1, \beta_2, \ldots, \beta_{ns})` is a strictly decreasing
554
+ sequence of nonnegative integers. Stably sort the list
555
+ `(1, 2, \ldots, ns)` in order of (weakly) increasing remainder of
556
+ `-1 - \beta_i` modulo `n`. Let `\xi` be the sign of the
557
+ permutation that is used for this sorting. Let `\psi` be the sign
558
+ of the permutation that is used to stably sort the list
559
+ `(1, 2, \ldots, ns)` in order of (weakly) increasing remainder of
560
+ `i - 1` modulo `n`. (Notice that `\psi = (-1)^{n(n-1)s(s-1)/4}`.)
561
+ Then, `\mathbf{V}_n(s_\lambda) = \xi \psi \prod_{i = 0}^{n - 1}
562
+ s_{\lambda^{(i)}}`, where
563
+ `(\lambda^{(0)}, \lambda^{(1)}, \ldots, \lambda^{(n - 1)})`
564
+ is the `n`-quotient of `\lambda`.
565
+
566
+ INPUT:
567
+
568
+ - ``n`` -- positive integer
569
+
570
+ OUTPUT:
571
+
572
+ The result of applying the `n`-th Verschiebung operator (on the
573
+ ring of symmetric functions) to ``self``.
574
+
575
+ EXAMPLES::
576
+
577
+ sage: Sym = SymmetricFunctions(ZZ)
578
+ sage: p = Sym.p()
579
+ sage: p[3].verschiebung(2)
580
+ 0
581
+ sage: p[4].verschiebung(4)
582
+ 4*p[1]
583
+
584
+ The Verschiebung endomorphisms are multiplicative::
585
+
586
+ sage: all( all( p(lam).verschiebung(2) * p(mu).verschiebung(2)
587
+ ....: == (p(lam) * p(mu)).verschiebung(2)
588
+ ....: for mu in Partitions(4) )
589
+ ....: for lam in Partitions(4) )
590
+ True
591
+
592
+ Testing the adjointness between the Adams operators
593
+ `\mathbf{f}_n` and the Verschiebung operators
594
+ `\mathbf{V}_n`::
595
+
596
+ sage: Sym = SymmetricFunctions(QQ)
597
+ sage: p = Sym.p()
598
+ sage: all( all( p(lam).verschiebung(2).scalar(p(mu))
599
+ ....: == p(lam).scalar(p(mu).adams_operator(2))
600
+ ....: for mu in Partitions(2) )
601
+ ....: for lam in Partitions(4) )
602
+ True
603
+
604
+ TESTS:
605
+
606
+ Let us check that this method on the powersum basis gives the
607
+ same result as the implementation in :mod:`sage.combinat.sf.sfa`
608
+ on the monomial basis::
609
+
610
+ sage: Sym = SymmetricFunctions(QQ)
611
+ sage: p = Sym.p(); m = Sym.m()
612
+ sage: all( m(p(lam)).verschiebung(3) == m(p(lam).verschiebung(3))
613
+ ....: for lam in Partitions(6) )
614
+ True
615
+ sage: all( p(m(lam)).verschiebung(2) == p(m(lam).verschiebung(2))
616
+ ....: for lam in Partitions(4) )
617
+ True
618
+ """
619
+ parent = self.parent()
620
+ p_coords_of_self = self.monomial_coefficients().items()
621
+ dct = {Partition([i // n for i in lam]): coeff * (n ** len(lam))
622
+ for (lam, coeff) in p_coords_of_self
623
+ if all( i % n == 0 for i in lam )}
624
+ result_in_p_basis = parent._from_dict(dct)
625
+ return parent(result_in_p_basis)
626
+
627
+ def expand(self, n, alphabet='x'):
628
+ """
629
+ Expand the symmetric function ``self`` as a symmetric polynomial
630
+ in ``n`` variables.
631
+
632
+ INPUT:
633
+
634
+ - ``n`` -- nonnegative integer
635
+
636
+ - ``alphabet`` -- (default: ``'x'``) a variable for the expansion
637
+
638
+ OUTPUT:
639
+
640
+ A monomial expansion of ``self`` in the `n` variables
641
+ labelled by ``alphabet``.
642
+
643
+ EXAMPLES::
644
+
645
+ sage: p = SymmetricFunctions(QQ).p()
646
+ sage: a = p([2])
647
+ sage: a.expand(2)
648
+ x0^2 + x1^2
649
+ sage: a.expand(3, alphabet=['a','b','c'])
650
+ a^2 + b^2 + c^2
651
+ sage: p([2,1,1]).expand(2)
652
+ x0^4 + 2*x0^3*x1 + 2*x0^2*x1^2 + 2*x0*x1^3 + x1^4
653
+ sage: p([7]).expand(4)
654
+ x0^7 + x1^7 + x2^7 + x3^7
655
+ sage: p([7]).expand(4,alphabet='t')
656
+ t0^7 + t1^7 + t2^7 + t3^7
657
+ sage: p([7]).expand(4,alphabet='x,y,z,t')
658
+ x^7 + y^7 + z^7 + t^7
659
+ sage: p(1).expand(4)
660
+ 1
661
+ sage: p(0).expand(4)
662
+ 0
663
+ sage: (p([]) + 2*p([1])).expand(3)
664
+ 2*x0 + 2*x1 + 2*x2 + 1
665
+ sage: p([1]).expand(0)
666
+ 0
667
+ sage: (3*p([])).expand(0)
668
+ 3
669
+ """
670
+ if n == 0: # Symmetrica crashes otherwise...
671
+ return self.counit()
672
+ condition = lambda part: False
673
+ return self._expand(condition, n, alphabet)
674
+
675
+ def eval_at_permutation_roots(self, rho):
676
+ r"""
677
+ Evaluate at eigenvalues of a permutation matrix.
678
+
679
+ Evaluate an element of the power sum basis at the eigenvalues
680
+ of a permutation matrix with cycle structure `\rho`.
681
+
682
+ This function evaluates an element at the roots of unity
683
+
684
+ .. MATH::
685
+
686
+ \Xi_{\rho_1},\Xi_{\rho_2},\ldots,\Xi_{\rho_\ell}
687
+
688
+ where
689
+
690
+ .. MATH::
691
+
692
+ \Xi_{m} = 1,\zeta_m,\zeta_m^2,\ldots,\zeta_m^{m-1}
693
+
694
+ and `\zeta_m` is an `m` root of unity.
695
+ These roots of unity represent the eigenvalues of permutation
696
+ matrix with cycle structure `\rho`.
697
+
698
+ INPUT:
699
+
700
+ - ``rho`` -- a partition or a list of nonnegative integers
701
+
702
+ OUTPUT: an element of the base ring
703
+
704
+ EXAMPLES::
705
+
706
+ sage: p = SymmetricFunctions(QQ).p()
707
+ sage: p([3,3]).eval_at_permutation_roots([6])
708
+ 0
709
+ sage: p([3,3]).eval_at_permutation_roots([3])
710
+ 9
711
+ sage: p([3,3]).eval_at_permutation_roots([1])
712
+ 1
713
+ sage: p([3,3]).eval_at_permutation_roots([3,3])
714
+ 36
715
+ sage: p([3,3]).eval_at_permutation_roots([1,1,1,1,1])
716
+ 25
717
+ sage: (p[1]+p[2]+p[3]).eval_at_permutation_roots([3,2])
718
+ 5
719
+ """
720
+ p = self.parent()
721
+ R = self.base_ring()
722
+ on_basis = lambda lam: R.prod(
723
+ p.eval_at_permutation_roots_on_generators(k, rho) for k in lam)
724
+ return p._apply_module_morphism(self, on_basis, R)
725
+
726
+ def principal_specialization(self, n=infinity, q=None):
727
+ r"""
728
+ Return the principal specialization of a symmetric function.
729
+
730
+ The *principal specialization* of order `n` at `q`
731
+ is the ring homomorphism `ps_{n,q}` from the ring of
732
+ symmetric functions to another commutative ring `R`
733
+ given by `x_i \mapsto q^{i-1}` for `i \in \{1,\dots,n\}`
734
+ and `x_i \mapsto 0` for `i > n`.
735
+ Here, `q` is a given element of `R`, and we assume that
736
+ the variables of our symmetric functions are
737
+ `x_1, x_2, x_3, \ldots`.
738
+ (To be more precise, `ps_{n,q}` is a `K`-algebra
739
+ homomorphism, where `K` is the base ring.)
740
+ See Section 7.8 of [EnumComb2]_.
741
+
742
+ The *stable principal specialization* at `q` is the ring
743
+ homomorphism `ps_q` from the ring of symmetric functions
744
+ to another commutative ring `R` given by
745
+ `x_i \mapsto q^{i-1}` for all `i`.
746
+ This is well-defined only if the resulting infinite sums
747
+ converge; thus, in particular, setting `q = 1` in the
748
+ stable principal specialization is an invalid operation.
749
+
750
+ INPUT:
751
+
752
+ - ``n`` -- (default: ``infinity``) a nonnegative integer or
753
+ ``infinity``, specifying whether to compute the principal
754
+ specialization of order ``n`` or the stable principal
755
+ specialization.
756
+
757
+ - ``q`` -- (default: ``None``) the value to use for `q`; the
758
+ default is to create a ring of polynomials in ``q``
759
+ (or a field of rational functions in ``q``) over the
760
+ given coefficient ring.
761
+
762
+ We use the formulas from Proposition 7.8.3 of [EnumComb2]_:
763
+
764
+ .. MATH::
765
+
766
+ ps_{n,q}(p_\lambda) = \prod_i (1-q^{n\lambda_i}) / (1-q^{\lambda_i}),
767
+
768
+ ps_{n,1}(p_\lambda) = n^{\ell(\lambda)},
769
+
770
+ ps_q(p_\lambda) = 1 / \prod_i (1-q^{\lambda_i}),
771
+
772
+ where `\ell(\lambda)` denotes the length of `\lambda`,
773
+ and where the products range from `i=1` to `i=\ell(\lambda)`.
774
+
775
+ EXAMPLES::
776
+
777
+ sage: p = SymmetricFunctions(QQ).p()
778
+ sage: x = p[8,7,3,1]
779
+ sage: x.principal_specialization(3, q=var("q")) # needs sage.symbolic
780
+ (q^24 - 1)*(q^21 - 1)*(q^9 - 1)/((q^8 - 1)*(q^7 - 1)*(q - 1))
781
+
782
+ sage: x = 5*p[1,1,1] + 3*p[2,1] + 1
783
+ sage: x.principal_specialization(3, q=var("q")) # needs sage.symbolic
784
+ 5*(q^3 - 1)^3/(q - 1)^3 + 3*(q^6 - 1)*(q^3 - 1)/((q^2 - 1)*(q - 1)) + 1
785
+
786
+ By default, we return a rational function in `q`::
787
+
788
+ sage: x.principal_specialization(3)
789
+ 8*q^6 + 18*q^5 + 36*q^4 + 38*q^3 + 36*q^2 + 18*q + 9
790
+
791
+ If ``n`` is not given we return the stable principal specialization::
792
+
793
+ sage: x.principal_specialization(q=var("q")) # needs sage.symbolic
794
+ 3/((q^2 - 1)*(q - 1)) - 5/(q - 1)^3 + 1
795
+
796
+ TESTS::
797
+
798
+ sage: p.zero().principal_specialization(3)
799
+ 0
800
+ """
801
+ def get_variable(ring, name):
802
+ try:
803
+ ring(name)
804
+ except TypeError:
805
+ from sage.rings.polynomial.polynomial_ring_constructor import (
806
+ PolynomialRing,
807
+ )
808
+ return PolynomialRing(ring, name).gen()
809
+ else:
810
+ raise ValueError("the variable %s is in the base ring, pass it explicitly" % name)
811
+
812
+ if q is None:
813
+ q = get_variable(self.base_ring(), 'q')
814
+
815
+ if q == 1:
816
+ if n == infinity:
817
+ raise ValueError("the stable principal specialization at q=1 is not defined")
818
+ f = lambda partition: n**len(partition)
819
+ elif n == infinity:
820
+ f = lambda partition: prod(1/(1-q**part) for part in partition)
821
+ else:
822
+ from sage.rings.integer_ring import ZZ
823
+ ZZq = PolynomialRing(ZZ, "q")
824
+ q_lim = ZZq.gen()
825
+
826
+ def f(partition):
827
+ denom = prod((1 - q**part) for part in partition)
828
+ try:
829
+ ~denom
830
+ rational = prod((1 - q**(n*part)) for part in partition) / denom
831
+ return q.parent()(rational)
832
+ except (ZeroDivisionError, NotImplementedError, TypeError):
833
+ # If denom is not invertible, we need to do the
834
+ # computation with universal coefficients instead:
835
+ quotient = ZZq(prod((1-q_lim**(n*part))/(1-q_lim**part) for part in partition))
836
+ return quotient.subs({q_lim: q})
837
+
838
+ return self.parent()._apply_module_morphism(self, f, q.parent())
839
+
840
+ def exponential_specialization(self, t=None, q=1):
841
+ r"""
842
+ Return the exponential specialization of a
843
+ symmetric function (when `q = 1`), or the
844
+ `q`-exponential specialization (when `q \neq 1`).
845
+
846
+ The *exponential specialization* `ex` at `t` is a
847
+ `K`-algebra homomorphism from the `K`-algebra of
848
+ symmetric functions to another `K`-algebra `R`.
849
+ It is defined whenever the base ring `K` is a
850
+ `\QQ`-algebra and `t` is an element of `R`.
851
+ The easiest way to define it is by specifying its
852
+ values on the powersum symmetric functions to be
853
+ `p_1 = t` and `p_n = 0` for `n > 1`.
854
+ Equivalently, on the homogeneous functions it is
855
+ given by `ex(h_n) = t^n / n!`; see Proposition 7.8.4 of
856
+ [EnumComb2]_.
857
+
858
+ By analogy, the `q`-exponential specialization is a
859
+ `K`-algebra homomorphism from the `K`-algebra of
860
+ symmetric functions to another `K`-algebra `R` that
861
+ depends on two elements `t` and `q` of `R` for which
862
+ the elements `1 - q^i` for all positive integers `i`
863
+ are invertible.
864
+ It can be defined by specifying its values on the
865
+ complete homogeneous symmetric functions to be
866
+
867
+ .. MATH::
868
+
869
+ ex_q(h_n) = t^n / [n]_q!,
870
+
871
+ where `[n]_q!` is the `q`-factorial. Equivalently, for
872
+ `q \neq 1` and a homogeneous symmetric function `f` of
873
+ degree `n`, we have
874
+
875
+ .. MATH::
876
+
877
+ ex_q(f) = (1-q)^n t^n ps_q(f),
878
+
879
+ where `ps_q(f)` is the stable principal specialization of `f`
880
+ (see :meth:`principal_specialization`).
881
+ (See (7.29) in [EnumComb2]_.)
882
+
883
+ The limit of `ex_q` as `q \to 1` is `ex`.
884
+
885
+ INPUT:
886
+
887
+ - ``t`` -- (default: ``None``) the value to use for `t`;
888
+ the default is to create a ring of polynomials in ``t``
889
+
890
+ - ``q`` -- (default: `1`) the value to use for `q`. If
891
+ ``q`` is ``None``, then a ring (or fraction field) of
892
+ polynomials in ``q`` is created.
893
+
894
+ EXAMPLES::
895
+
896
+ sage: p = SymmetricFunctions(QQ).p()
897
+ sage: x = p[8,7,3,1]
898
+ sage: x.exponential_specialization()
899
+ 0
900
+ sage: x = p[3] + 5*p[1,1] + 2*p[1] + 1
901
+ sage: x.exponential_specialization(t=var("t")) # needs sage.symbolic
902
+ 5*t^2 + 2*t + 1
903
+
904
+ We also support the `q`-exponential_specialization::
905
+
906
+ sage: factor(p[3].exponential_specialization(q=var("q"), t=var("t"))) # needs sage.symbolic
907
+ (q - 1)^2*t^3/(q^2 + q + 1)
908
+
909
+ TESTS::
910
+
911
+ sage: p.zero().exponential_specialization()
912
+ 0
913
+ """
914
+ def get_variable(ring, name):
915
+ try:
916
+ ring(name)
917
+ except TypeError:
918
+ from sage.rings.polynomial.polynomial_ring_constructor import (
919
+ PolynomialRing,
920
+ )
921
+ return PolynomialRing(ring, name).gen()
922
+ else:
923
+ raise ValueError("the variable %s is in the base ring, pass it explicitly" % name)
924
+
925
+ if q == 1:
926
+ if t is None:
927
+ t = get_variable(self.base_ring(), 't')
928
+
929
+ def f(partition):
930
+ n = 0
931
+ for part in partition:
932
+ if part != 1:
933
+ return 0
934
+ n += 1
935
+ return t**n
936
+
937
+ return self.parent()._apply_module_morphism(self, f, t.parent())
938
+
939
+ if q is None and t is None:
940
+ q = get_variable(self.base_ring(), 'q')
941
+ t = get_variable(q.parent(), 't')
942
+ elif q is None:
943
+ q = get_variable(t.parent(), 'q')
944
+ elif t is None:
945
+ t = get_variable(q.parent(), 't')
946
+
947
+ def f(partition):
948
+ n = 0
949
+ m = 1
950
+ for part in partition:
951
+ n += part
952
+ m *= 1-q**part
953
+ return (1-q)**n * t**n / m
954
+
955
+ return self.parent()._apply_module_morphism(self, f, t.parent())
956
+
957
+
958
+ # Backward compatibility for unpickling
959
+ from sage.misc.persist import register_unpickle_override
960
+
961
+ register_unpickle_override('sage.combinat.sf.powersum',
962
+ 'SymmetricFunctionAlgebraElement_power',
963
+ SymmetricFunctionAlgebra_power.Element)