passagemath-combinat 10.6.42__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.
Files changed (400) hide show
  1. passagemath_combinat/__init__.py +3 -0
  2. passagemath_combinat-10.6.42.dist-info/METADATA +160 -0
  3. passagemath_combinat-10.6.42.dist-info/RECORD +400 -0
  4. passagemath_combinat-10.6.42.dist-info/WHEEL +5 -0
  5. passagemath_combinat-10.6.42.dist-info/top_level.txt +3 -0
  6. passagemath_combinat.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
  7. passagemath_combinat.libs/libsymmetrica-81fe8739.so.3.0.0 +0 -0
  8. sage/algebras/affine_nil_temperley_lieb.py +263 -0
  9. sage/algebras/all.py +24 -0
  10. sage/algebras/all__sagemath_combinat.py +35 -0
  11. sage/algebras/askey_wilson.py +935 -0
  12. sage/algebras/associated_graded.py +345 -0
  13. sage/algebras/cellular_basis.py +350 -0
  14. sage/algebras/cluster_algebra.py +2766 -0
  15. sage/algebras/down_up_algebra.py +860 -0
  16. sage/algebras/free_algebra.py +1698 -0
  17. sage/algebras/free_algebra_element.py +345 -0
  18. sage/algebras/free_algebra_quotient.py +405 -0
  19. sage/algebras/free_algebra_quotient_element.py +295 -0
  20. sage/algebras/free_zinbiel_algebra.py +885 -0
  21. sage/algebras/hall_algebra.py +783 -0
  22. sage/algebras/hecke_algebras/all.py +4 -0
  23. sage/algebras/hecke_algebras/ariki_koike_algebra.py +1796 -0
  24. sage/algebras/hecke_algebras/ariki_koike_specht_modules.py +475 -0
  25. sage/algebras/hecke_algebras/cubic_hecke_algebra.py +3520 -0
  26. sage/algebras/hecke_algebras/cubic_hecke_base_ring.py +1473 -0
  27. sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py +1079 -0
  28. sage/algebras/iwahori_hecke_algebra.py +3095 -0
  29. sage/algebras/jordan_algebra.py +1773 -0
  30. sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py +113 -0
  31. sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py +156 -0
  32. sage/algebras/lie_conformal_algebras/all.py +18 -0
  33. sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py +134 -0
  34. sage/algebras/lie_conformal_algebras/examples.py +43 -0
  35. sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py +131 -0
  36. sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py +139 -0
  37. sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py +174 -0
  38. sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py +167 -0
  39. sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py +107 -0
  40. sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py +135 -0
  41. sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py +353 -0
  42. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py +236 -0
  43. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py +78 -0
  44. sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +328 -0
  45. sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py +117 -0
  46. sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py +86 -0
  47. sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py +82 -0
  48. sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py +205 -0
  49. sage/algebras/nil_coxeter_algebra.py +191 -0
  50. sage/algebras/q_commuting_polynomials.py +673 -0
  51. sage/algebras/q_system.py +608 -0
  52. sage/algebras/quantum_clifford.py +959 -0
  53. sage/algebras/quantum_groups/ace_quantum_onsager.py +693 -0
  54. sage/algebras/quantum_groups/all.py +9 -0
  55. sage/algebras/quantum_groups/fock_space.py +2219 -0
  56. sage/algebras/quantum_groups/q_numbers.py +207 -0
  57. sage/algebras/quantum_groups/quantum_group_gap.py +2695 -0
  58. sage/algebras/quantum_groups/representations.py +591 -0
  59. sage/algebras/quantum_matrix_coordinate_algebra.py +1006 -0
  60. sage/algebras/quantum_oscillator.py +623 -0
  61. sage/algebras/quaternion_algebra.py +20 -0
  62. sage/algebras/quaternion_algebra_element.py +55 -0
  63. sage/algebras/rational_cherednik_algebra.py +525 -0
  64. sage/algebras/schur_algebra.py +670 -0
  65. sage/algebras/shuffle_algebra.py +1011 -0
  66. sage/algebras/splitting_algebra.py +779 -0
  67. sage/algebras/tensor_algebra.py +709 -0
  68. sage/algebras/yangian.py +1082 -0
  69. sage/algebras/yokonuma_hecke_algebra.py +1018 -0
  70. sage/all__sagemath_combinat.py +35 -0
  71. sage/combinat/SJT.py +255 -0
  72. sage/combinat/affine_permutation.py +2405 -0
  73. sage/combinat/algebraic_combinatorics.py +55 -0
  74. sage/combinat/all.py +53 -0
  75. sage/combinat/all__sagemath_combinat.py +195 -0
  76. sage/combinat/alternating_sign_matrix.py +2063 -0
  77. sage/combinat/baxter_permutations.py +346 -0
  78. sage/combinat/bijectionist.py +3220 -0
  79. sage/combinat/binary_recurrence_sequences.py +1180 -0
  80. sage/combinat/blob_algebra.py +685 -0
  81. sage/combinat/catalog_partitions.py +27 -0
  82. sage/combinat/chas/all.py +23 -0
  83. sage/combinat/chas/fsym.py +1180 -0
  84. sage/combinat/chas/wqsym.py +2601 -0
  85. sage/combinat/cluster_complex.py +326 -0
  86. sage/combinat/colored_permutations.py +2039 -0
  87. sage/combinat/colored_permutations_representations.py +964 -0
  88. sage/combinat/composition_signed.py +142 -0
  89. sage/combinat/composition_tableau.py +855 -0
  90. sage/combinat/constellation.py +1729 -0
  91. sage/combinat/core.py +751 -0
  92. sage/combinat/counting.py +12 -0
  93. sage/combinat/crystals/affine.py +742 -0
  94. sage/combinat/crystals/affine_factorization.py +518 -0
  95. sage/combinat/crystals/affinization.py +331 -0
  96. sage/combinat/crystals/alcove_path.py +2013 -0
  97. sage/combinat/crystals/all.py +22 -0
  98. sage/combinat/crystals/bkk_crystals.py +141 -0
  99. sage/combinat/crystals/catalog.py +115 -0
  100. sage/combinat/crystals/catalog_elementary_crystals.py +18 -0
  101. sage/combinat/crystals/catalog_infinity_crystals.py +33 -0
  102. sage/combinat/crystals/catalog_kirillov_reshetikhin.py +18 -0
  103. sage/combinat/crystals/crystals.py +257 -0
  104. sage/combinat/crystals/direct_sum.py +260 -0
  105. sage/combinat/crystals/elementary_crystals.py +1251 -0
  106. sage/combinat/crystals/fast_crystals.py +441 -0
  107. sage/combinat/crystals/fully_commutative_stable_grothendieck.py +1205 -0
  108. sage/combinat/crystals/generalized_young_walls.py +1076 -0
  109. sage/combinat/crystals/highest_weight_crystals.py +436 -0
  110. sage/combinat/crystals/induced_structure.py +695 -0
  111. sage/combinat/crystals/infinity_crystals.py +730 -0
  112. sage/combinat/crystals/kac_modules.py +863 -0
  113. sage/combinat/crystals/kirillov_reshetikhin.py +4196 -0
  114. sage/combinat/crystals/kyoto_path_model.py +497 -0
  115. sage/combinat/crystals/letters.cpython-314-x86_64-linux-musl.so +0 -0
  116. sage/combinat/crystals/letters.pxd +79 -0
  117. sage/combinat/crystals/letters.pyx +3056 -0
  118. sage/combinat/crystals/littelmann_path.py +1518 -0
  119. sage/combinat/crystals/monomial_crystals.py +1262 -0
  120. sage/combinat/crystals/multisegments.py +462 -0
  121. sage/combinat/crystals/mv_polytopes.py +467 -0
  122. sage/combinat/crystals/pbw_crystal.py +511 -0
  123. sage/combinat/crystals/pbw_datum.cpython-314-x86_64-linux-musl.so +0 -0
  124. sage/combinat/crystals/pbw_datum.pxd +4 -0
  125. sage/combinat/crystals/pbw_datum.pyx +487 -0
  126. sage/combinat/crystals/polyhedral_realization.py +372 -0
  127. sage/combinat/crystals/spins.cpython-314-x86_64-linux-musl.so +0 -0
  128. sage/combinat/crystals/spins.pxd +21 -0
  129. sage/combinat/crystals/spins.pyx +756 -0
  130. sage/combinat/crystals/star_crystal.py +290 -0
  131. sage/combinat/crystals/subcrystal.py +464 -0
  132. sage/combinat/crystals/tensor_product.py +1177 -0
  133. sage/combinat/crystals/tensor_product_element.cpython-314-x86_64-linux-musl.so +0 -0
  134. sage/combinat/crystals/tensor_product_element.pxd +35 -0
  135. sage/combinat/crystals/tensor_product_element.pyx +1870 -0
  136. sage/combinat/crystals/virtual_crystal.py +420 -0
  137. sage/combinat/cyclic_sieving_phenomenon.py +204 -0
  138. sage/combinat/debruijn_sequence.cpython-314-x86_64-linux-musl.so +0 -0
  139. sage/combinat/debruijn_sequence.pyx +355 -0
  140. sage/combinat/decorated_permutation.py +270 -0
  141. sage/combinat/degree_sequences.cpython-314-x86_64-linux-musl.so +0 -0
  142. sage/combinat/degree_sequences.pyx +588 -0
  143. sage/combinat/derangements.py +527 -0
  144. sage/combinat/descent_algebra.py +1008 -0
  145. sage/combinat/diagram.py +1551 -0
  146. sage/combinat/diagram_algebras.py +5886 -0
  147. sage/combinat/dyck_word.py +4349 -0
  148. sage/combinat/e_one_star.py +1623 -0
  149. sage/combinat/enumerated_sets.py +123 -0
  150. sage/combinat/expnums.cpython-314-x86_64-linux-musl.so +0 -0
  151. sage/combinat/expnums.pyx +148 -0
  152. sage/combinat/fast_vector_partitions.cpython-314-x86_64-linux-musl.so +0 -0
  153. sage/combinat/fast_vector_partitions.pyx +346 -0
  154. sage/combinat/fqsym.py +1977 -0
  155. sage/combinat/free_dendriform_algebra.py +954 -0
  156. sage/combinat/free_prelie_algebra.py +1141 -0
  157. sage/combinat/fully_commutative_elements.py +1077 -0
  158. sage/combinat/fully_packed_loop.py +1523 -0
  159. sage/combinat/gelfand_tsetlin_patterns.py +1409 -0
  160. sage/combinat/gray_codes.py +311 -0
  161. sage/combinat/grossman_larson_algebras.py +667 -0
  162. sage/combinat/growth.py +4352 -0
  163. sage/combinat/hall_polynomial.py +188 -0
  164. sage/combinat/hillman_grassl.py +866 -0
  165. sage/combinat/integer_matrices.py +329 -0
  166. sage/combinat/integer_vectors_mod_permgroup.py +1238 -0
  167. sage/combinat/k_tableau.py +4564 -0
  168. sage/combinat/kazhdan_lusztig.py +215 -0
  169. sage/combinat/key_polynomial.py +885 -0
  170. sage/combinat/knutson_tao_puzzles.py +2286 -0
  171. sage/combinat/lr_tableau.py +311 -0
  172. sage/combinat/matrices/all.py +24 -0
  173. sage/combinat/matrices/hadamard_matrix.py +3790 -0
  174. sage/combinat/matrices/latin.py +2912 -0
  175. sage/combinat/misc.py +401 -0
  176. sage/combinat/multiset_partition_into_sets_ordered.py +3541 -0
  177. sage/combinat/ncsf_qsym/all.py +21 -0
  178. sage/combinat/ncsf_qsym/combinatorics.py +317 -0
  179. sage/combinat/ncsf_qsym/generic_basis_code.py +1427 -0
  180. sage/combinat/ncsf_qsym/ncsf.py +5637 -0
  181. sage/combinat/ncsf_qsym/qsym.py +4053 -0
  182. sage/combinat/ncsf_qsym/tutorial.py +447 -0
  183. sage/combinat/ncsym/all.py +21 -0
  184. sage/combinat/ncsym/bases.py +855 -0
  185. sage/combinat/ncsym/dual.py +593 -0
  186. sage/combinat/ncsym/ncsym.py +2076 -0
  187. sage/combinat/necklace.py +551 -0
  188. sage/combinat/non_decreasing_parking_function.py +634 -0
  189. sage/combinat/nu_dyck_word.py +1474 -0
  190. sage/combinat/output.py +861 -0
  191. sage/combinat/parallelogram_polyomino.py +4326 -0
  192. sage/combinat/parking_functions.py +1602 -0
  193. sage/combinat/partition_algebra.py +1998 -0
  194. sage/combinat/partition_kleshchev.py +1982 -0
  195. sage/combinat/partition_shifting_algebras.py +584 -0
  196. sage/combinat/partition_tuple.py +3114 -0
  197. sage/combinat/path_tableaux/all.py +13 -0
  198. sage/combinat/path_tableaux/catalog.py +29 -0
  199. sage/combinat/path_tableaux/dyck_path.py +380 -0
  200. sage/combinat/path_tableaux/frieze.py +476 -0
  201. sage/combinat/path_tableaux/path_tableau.py +728 -0
  202. sage/combinat/path_tableaux/semistandard.py +510 -0
  203. sage/combinat/perfect_matching.py +779 -0
  204. sage/combinat/plane_partition.py +3300 -0
  205. sage/combinat/q_bernoulli.cpython-314-x86_64-linux-musl.so +0 -0
  206. sage/combinat/q_bernoulli.pyx +128 -0
  207. sage/combinat/quickref.py +81 -0
  208. sage/combinat/recognizable_series.py +2051 -0
  209. sage/combinat/regular_sequence.py +4316 -0
  210. sage/combinat/regular_sequence_bounded.py +543 -0
  211. sage/combinat/restricted_growth.py +81 -0
  212. sage/combinat/ribbon.py +20 -0
  213. sage/combinat/ribbon_shaped_tableau.py +489 -0
  214. sage/combinat/ribbon_tableau.py +1180 -0
  215. sage/combinat/rigged_configurations/all.py +46 -0
  216. sage/combinat/rigged_configurations/bij_abstract_class.py +548 -0
  217. sage/combinat/rigged_configurations/bij_infinity.py +370 -0
  218. sage/combinat/rigged_configurations/bij_type_A.py +163 -0
  219. sage/combinat/rigged_configurations/bij_type_A2_dual.py +338 -0
  220. sage/combinat/rigged_configurations/bij_type_A2_even.py +218 -0
  221. sage/combinat/rigged_configurations/bij_type_A2_odd.py +199 -0
  222. sage/combinat/rigged_configurations/bij_type_B.py +900 -0
  223. sage/combinat/rigged_configurations/bij_type_C.py +267 -0
  224. sage/combinat/rigged_configurations/bij_type_D.py +771 -0
  225. sage/combinat/rigged_configurations/bij_type_D_tri.py +392 -0
  226. sage/combinat/rigged_configurations/bij_type_D_twisted.py +576 -0
  227. sage/combinat/rigged_configurations/bij_type_E67.py +402 -0
  228. sage/combinat/rigged_configurations/bijection.py +143 -0
  229. sage/combinat/rigged_configurations/kleber_tree.py +1475 -0
  230. sage/combinat/rigged_configurations/kr_tableaux.py +1898 -0
  231. sage/combinat/rigged_configurations/rc_crystal.py +461 -0
  232. sage/combinat/rigged_configurations/rc_infinity.py +540 -0
  233. sage/combinat/rigged_configurations/rigged_configuration_element.py +2403 -0
  234. sage/combinat/rigged_configurations/rigged_configurations.py +1918 -0
  235. sage/combinat/rigged_configurations/rigged_partition.cpython-314-x86_64-linux-musl.so +0 -0
  236. sage/combinat/rigged_configurations/rigged_partition.pxd +15 -0
  237. sage/combinat/rigged_configurations/rigged_partition.pyx +680 -0
  238. sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py +499 -0
  239. sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py +428 -0
  240. sage/combinat/rsk.py +3438 -0
  241. sage/combinat/schubert_polynomial.py +508 -0
  242. sage/combinat/set_partition.py +3318 -0
  243. sage/combinat/set_partition_iterator.cpython-314-x86_64-linux-musl.so +0 -0
  244. sage/combinat/set_partition_iterator.pyx +136 -0
  245. sage/combinat/set_partition_ordered.py +1590 -0
  246. sage/combinat/sf/abreu_nigro.py +346 -0
  247. sage/combinat/sf/all.py +52 -0
  248. sage/combinat/sf/character.py +576 -0
  249. sage/combinat/sf/classical.py +319 -0
  250. sage/combinat/sf/dual.py +996 -0
  251. sage/combinat/sf/elementary.py +549 -0
  252. sage/combinat/sf/hall_littlewood.py +1028 -0
  253. sage/combinat/sf/hecke.py +336 -0
  254. sage/combinat/sf/homogeneous.py +464 -0
  255. sage/combinat/sf/jack.py +1428 -0
  256. sage/combinat/sf/k_dual.py +1458 -0
  257. sage/combinat/sf/kfpoly.py +447 -0
  258. sage/combinat/sf/llt.py +789 -0
  259. sage/combinat/sf/macdonald.py +2019 -0
  260. sage/combinat/sf/monomial.py +525 -0
  261. sage/combinat/sf/multiplicative.py +113 -0
  262. sage/combinat/sf/new_kschur.py +1786 -0
  263. sage/combinat/sf/ns_macdonald.py +964 -0
  264. sage/combinat/sf/orthogonal.py +246 -0
  265. sage/combinat/sf/orthotriang.py +355 -0
  266. sage/combinat/sf/powersum.py +963 -0
  267. sage/combinat/sf/schur.py +880 -0
  268. sage/combinat/sf/sf.py +1653 -0
  269. sage/combinat/sf/sfa.py +7053 -0
  270. sage/combinat/sf/symplectic.py +253 -0
  271. sage/combinat/sf/witt.py +721 -0
  272. sage/combinat/shifted_primed_tableau.py +2735 -0
  273. sage/combinat/shuffle.py +830 -0
  274. sage/combinat/sidon_sets.py +146 -0
  275. sage/combinat/similarity_class_type.py +1721 -0
  276. sage/combinat/sine_gordon.py +618 -0
  277. sage/combinat/six_vertex_model.py +784 -0
  278. sage/combinat/skew_partition.py +2053 -0
  279. sage/combinat/skew_tableau.py +2989 -0
  280. sage/combinat/sloane_functions.py +8935 -0
  281. sage/combinat/specht_module.py +1403 -0
  282. sage/combinat/species/all.py +48 -0
  283. sage/combinat/species/characteristic_species.py +321 -0
  284. sage/combinat/species/composition_species.py +273 -0
  285. sage/combinat/species/cycle_species.py +284 -0
  286. sage/combinat/species/empty_species.py +155 -0
  287. sage/combinat/species/functorial_composition_species.py +148 -0
  288. sage/combinat/species/generating_series.py +673 -0
  289. sage/combinat/species/library.py +148 -0
  290. sage/combinat/species/linear_order_species.py +169 -0
  291. sage/combinat/species/misc.py +83 -0
  292. sage/combinat/species/partition_species.py +290 -0
  293. sage/combinat/species/permutation_species.py +268 -0
  294. sage/combinat/species/product_species.py +423 -0
  295. sage/combinat/species/recursive_species.py +476 -0
  296. sage/combinat/species/set_species.py +192 -0
  297. sage/combinat/species/species.py +820 -0
  298. sage/combinat/species/structure.py +539 -0
  299. sage/combinat/species/subset_species.py +243 -0
  300. sage/combinat/species/sum_species.py +225 -0
  301. sage/combinat/subword.py +564 -0
  302. sage/combinat/subword_complex.py +2122 -0
  303. sage/combinat/subword_complex_c.cpython-314-x86_64-linux-musl.so +0 -0
  304. sage/combinat/subword_complex_c.pyx +119 -0
  305. sage/combinat/super_tableau.py +821 -0
  306. sage/combinat/superpartition.py +1154 -0
  307. sage/combinat/symmetric_group_algebra.py +3774 -0
  308. sage/combinat/symmetric_group_representations.py +1830 -0
  309. sage/combinat/t_sequences.py +877 -0
  310. sage/combinat/tableau.py +9506 -0
  311. sage/combinat/tableau_residues.py +860 -0
  312. sage/combinat/tableau_tuple.py +5353 -0
  313. sage/combinat/tiling.py +2432 -0
  314. sage/combinat/triangles_FHM.py +777 -0
  315. sage/combinat/tutorial.py +1857 -0
  316. sage/combinat/vector_partition.py +337 -0
  317. sage/combinat/words/abstract_word.py +1722 -0
  318. sage/combinat/words/all.py +59 -0
  319. sage/combinat/words/alphabet.py +268 -0
  320. sage/combinat/words/finite_word.py +7201 -0
  321. sage/combinat/words/infinite_word.py +113 -0
  322. sage/combinat/words/lyndon_word.py +652 -0
  323. sage/combinat/words/morphic.py +351 -0
  324. sage/combinat/words/morphism.py +3878 -0
  325. sage/combinat/words/paths.py +2932 -0
  326. sage/combinat/words/shuffle_product.py +278 -0
  327. sage/combinat/words/suffix_trees.py +1873 -0
  328. sage/combinat/words/word.py +769 -0
  329. sage/combinat/words/word_char.cpython-314-x86_64-linux-musl.so +0 -0
  330. sage/combinat/words/word_char.pyx +847 -0
  331. sage/combinat/words/word_datatypes.cpython-314-x86_64-linux-musl.so +0 -0
  332. sage/combinat/words/word_datatypes.pxd +4 -0
  333. sage/combinat/words/word_datatypes.pyx +1067 -0
  334. sage/combinat/words/word_generators.py +2026 -0
  335. sage/combinat/words/word_infinite_datatypes.py +1218 -0
  336. sage/combinat/words/word_options.py +99 -0
  337. sage/combinat/words/words.py +2396 -0
  338. sage/data_structures/all__sagemath_combinat.py +1 -0
  339. sage/databases/all__sagemath_combinat.py +13 -0
  340. sage/databases/findstat.py +4897 -0
  341. sage/databases/oeis.py +2058 -0
  342. sage/databases/sloane.py +393 -0
  343. sage/dynamics/all__sagemath_combinat.py +14 -0
  344. sage/dynamics/cellular_automata/all.py +7 -0
  345. sage/dynamics/cellular_automata/catalog.py +34 -0
  346. sage/dynamics/cellular_automata/elementary.py +612 -0
  347. sage/dynamics/cellular_automata/glca.py +477 -0
  348. sage/dynamics/cellular_automata/solitons.py +1463 -0
  349. sage/dynamics/finite_dynamical_system.py +1249 -0
  350. sage/dynamics/finite_dynamical_system_catalog.py +382 -0
  351. sage/games/all.py +7 -0
  352. sage/games/hexad.py +704 -0
  353. sage/games/quantumino.py +591 -0
  354. sage/games/sudoku.py +889 -0
  355. sage/games/sudoku_backtrack.cpython-314-x86_64-linux-musl.so +0 -0
  356. sage/games/sudoku_backtrack.pyx +189 -0
  357. sage/groups/all__sagemath_combinat.py +1 -0
  358. sage/groups/indexed_free_group.py +489 -0
  359. sage/libs/all__sagemath_combinat.py +6 -0
  360. sage/libs/lrcalc/__init__.py +1 -0
  361. sage/libs/lrcalc/lrcalc.py +525 -0
  362. sage/libs/symmetrica/__init__.py +7 -0
  363. sage/libs/symmetrica/all.py +101 -0
  364. sage/libs/symmetrica/kostka.pxi +168 -0
  365. sage/libs/symmetrica/part.pxi +193 -0
  366. sage/libs/symmetrica/plet.pxi +42 -0
  367. sage/libs/symmetrica/sab.pxi +196 -0
  368. sage/libs/symmetrica/sb.pxi +332 -0
  369. sage/libs/symmetrica/sc.pxi +192 -0
  370. sage/libs/symmetrica/schur.pxi +956 -0
  371. sage/libs/symmetrica/symmetrica.cpython-314-x86_64-linux-musl.so +0 -0
  372. sage/libs/symmetrica/symmetrica.pxi +1172 -0
  373. sage/libs/symmetrica/symmetrica.pyx +39 -0
  374. sage/monoids/all.py +13 -0
  375. sage/monoids/automatic_semigroup.py +1054 -0
  376. sage/monoids/free_abelian_monoid.py +315 -0
  377. sage/monoids/free_abelian_monoid_element.cpython-314-x86_64-linux-musl.so +0 -0
  378. sage/monoids/free_abelian_monoid_element.pxd +16 -0
  379. sage/monoids/free_abelian_monoid_element.pyx +397 -0
  380. sage/monoids/free_monoid.py +335 -0
  381. sage/monoids/free_monoid_element.py +431 -0
  382. sage/monoids/hecke_monoid.py +65 -0
  383. sage/monoids/string_monoid.py +817 -0
  384. sage/monoids/string_monoid_element.py +547 -0
  385. sage/monoids/string_ops.py +143 -0
  386. sage/monoids/trace_monoid.py +972 -0
  387. sage/rings/all__sagemath_combinat.py +2 -0
  388. sage/sat/all.py +4 -0
  389. sage/sat/boolean_polynomials.py +405 -0
  390. sage/sat/converters/__init__.py +6 -0
  391. sage/sat/converters/anf2cnf.py +14 -0
  392. sage/sat/converters/polybori.py +611 -0
  393. sage/sat/solvers/__init__.py +5 -0
  394. sage/sat/solvers/cryptominisat.py +287 -0
  395. sage/sat/solvers/dimacs.py +783 -0
  396. sage/sat/solvers/picosat.py +228 -0
  397. sage/sat/solvers/sat_lp.py +156 -0
  398. sage/sat/solvers/satsolver.cpython-314-x86_64-linux-musl.so +0 -0
  399. sage/sat/solvers/satsolver.pxd +3 -0
  400. sage/sat/solvers/satsolver.pyx +405 -0
@@ -0,0 +1,1458 @@
1
+ # sage_setup: distribution = sagemath-combinat
2
+ # sage.doctest: needs sage.combinat sage.modules
3
+ r"""
4
+ Quotient of symmetric function space by ideal generated by Hall-Littlewood symmetric functions
5
+
6
+ The quotient of symmetric functions by the ideal generated by the Hall-Littlewood P
7
+ symmetric functions indexed by partitions with first part greater than `k`. When `t=1`
8
+ this space is the quotient of the symmetric functions by the ideal generated by the
9
+ monomial symmetric functions indexed by partitions with first part greater than `k`.
10
+
11
+ AUTHORS:
12
+
13
+ - Chris Berg (2012-12-01)
14
+
15
+ - Mike Zabrocki - `k`-bounded Hall Littlewood P and dual `k`-Schur functions (2012-12-02)
16
+ """
17
+ # ****************************************************************************
18
+ # Copyright (C) 2012 Chris Berg <chrisjamesberg@gmail.com>
19
+ # Based off of similar code of Jason Bandlow, Anne Schilling
20
+ # and Mike Zabrocki
21
+ #
22
+ # Distributed under the terms of the GNU General Public License (GPL)
23
+ #
24
+ # This code is distributed in the hope that it will be useful,
25
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
+ # General Public License for more details.
28
+ #
29
+ # The full text of the GPL is available at:
30
+ #
31
+ # https://www.gnu.org/licenses/
32
+ # ****************************************************************************
33
+
34
+ from sage.categories.graded_hopf_algebras import GradedHopfAlgebras
35
+ from sage.categories.graded_hopf_algebras_with_basis import GradedHopfAlgebrasWithBasis
36
+ from sage.categories.realizations import Category_realization_of_parent, Realizations
37
+ from sage.combinat.free_module import CombinatorialFreeModule
38
+ from sage.combinat.partition import (
39
+ Partition,
40
+ Partitions,
41
+ Partitions_all_bounded,
42
+ PartitionsGreatestLE,
43
+ )
44
+ from sage.cpython.getattr import raw_getattr
45
+ from sage.misc.cachefunc import cached_method
46
+ from sage.misc.constant_function import ConstantFunction
47
+ from sage.rings.integer import Integer
48
+ from sage.rings.integer_ring import ZZ
49
+ from sage.structure.parent import Parent
50
+ from sage.structure.unique_representation import UniqueRepresentation
51
+
52
+
53
+ class KBoundedQuotient(UniqueRepresentation, Parent):
54
+
55
+ def __init__(self, Sym, k, t='t'):
56
+ r"""
57
+ Initialization of the ring of Symmetric functions modulo the ideal of monomial
58
+ symmetric functions which are indexed by partitions whose first part is greater
59
+ than `k`.
60
+
61
+ INPUT:
62
+
63
+ - ``Sym`` -- an element of class :class:`sage.combinat.sf.sf.SymmetricFunctions`
64
+
65
+ - ``k`` -- positive integer
66
+
67
+ - ``R`` -- a ring
68
+
69
+ EXAMPLES::
70
+
71
+ sage: Sym = SymmetricFunctions(QQ)
72
+ sage: Q = Sym.kBoundedQuotient(3,t=1)
73
+ sage: Q
74
+ 3-Bounded Quotient of Symmetric Functions over Rational Field with t=1
75
+ sage: km = Q.km()
76
+ sage: km
77
+ 3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded monomial basis
78
+ sage: F = Q.affineSchur()
79
+ sage: F(km(F[3,1,1])) == F[3,1,1] # needs lrcalc_python
80
+ True
81
+ sage: km(F(km([3,2]))) == km[3,2] # needs lrcalc_python
82
+ True
83
+ sage: F[3,2].lift()
84
+ m[1, 1, 1, 1, 1] + m[2, 1, 1, 1] + m[2, 2, 1] + m[3, 1, 1] + m[3, 2]
85
+ sage: F[2,1]*F[2,1] # needs lrcalc_python
86
+ 2*F3[1, 1, 1, 1, 1, 1] + 4*F3[2, 1, 1, 1, 1] + 4*F3[2, 2, 1, 1] + 4*F3[2, 2, 2] + 2*F3[3, 1, 1, 1] + 4*F3[3, 2, 1] + 2*F3[3, 3]
87
+ sage: F[1,2]
88
+ Traceback (most recent call last):
89
+ ...
90
+ ValueError: [1, 2] is not an element of 3-Bounded Partitions
91
+ sage: F[4,2]
92
+ Traceback (most recent call last):
93
+ ...
94
+ ValueError: [4, 2] is not an element of 3-Bounded Partitions
95
+ sage: km[2,1]*km[2,1]
96
+ 4*m3[2, 2, 1, 1] + 6*m3[2, 2, 2] + 2*m3[3, 2, 1] + 2*m3[3, 3]
97
+ sage: HLPk = Q.kHallLittlewoodP()
98
+ sage: HLPk[2,1]*HLPk[2,1] # needs lrcalc_python
99
+ 4*HLP3[2, 2, 1, 1] + 6*HLP3[2, 2, 2] + 2*HLP3[3, 2, 1] + 2*HLP3[3, 3]
100
+ sage: dks = Q.dual_k_Schur()
101
+ sage: dks[2,1]*dks[2,1] # needs lrcalc_python
102
+ 2*dks3[1, 1, 1, 1, 1, 1] + 4*dks3[2, 1, 1, 1, 1] + 4*dks3[2, 2, 1, 1] + 4*dks3[2, 2, 2] + 2*dks3[3, 1, 1, 1] + 4*dks3[3, 2, 1] + 2*dks3[3, 3]
103
+
104
+ ::
105
+
106
+ sage: Q = Sym.kBoundedQuotient(3)
107
+ Traceback (most recent call last):
108
+ ...
109
+ TypeError: unable to convert 't' to a rational
110
+ sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
111
+ sage: Q = Sym.kBoundedQuotient(3)
112
+ sage: km = Q.km()
113
+ sage: F = Q.affineSchur()
114
+ sage: F(km(F[3,1,1])) == F[3,1,1] # needs lrcalc_python
115
+ True
116
+ sage: km(F(km([3,2]))) == km[3,2] # needs lrcalc_python
117
+ True
118
+ sage: dks = Q.dual_k_Schur()
119
+ sage: HLPk = Q.kHallLittlewoodP()
120
+ sage: dks(HLPk(dks[3,1,1])) == dks[3,1,1]
121
+ True
122
+ sage: km(dks(km([3,2]))) == km[3,2]
123
+ True
124
+ sage: dks[2,1]*dks[2,1] # needs lrcalc_python
125
+ (t^3+t^2)*dks3[1, 1, 1, 1, 1, 1] + (2*t^2+2*t)*dks3[2, 1, 1, 1, 1] + (t^2+2*t+1)*dks3[2, 2, 1, 1] + (t^2+2*t+1)*dks3[2, 2, 2] + (t+1)*dks3[3, 1, 1, 1] + (2*t+2)*dks3[3, 2, 1] + (t+1)*dks3[3, 3]
126
+
127
+ TESTS::
128
+
129
+ sage: TestSuite(Q).run() # needs lrcalc_python
130
+ """
131
+ R = Sym.base_ring()
132
+ self.k = k
133
+ self.t = R(t)
134
+ self._base = R # Won't be needed when CategoryObject won't override anymore base_ring
135
+ self._sym = Sym
136
+ if t == 1:
137
+ self._quotient_basis = Sym.m()
138
+ else:
139
+ self._quotient_basis = Sym.hall_littlewood(t=self.t).P()
140
+ Parent.__init__(self, category=GradedHopfAlgebras(R).Quotients().WithRealizations())
141
+ self.indices = ConstantFunction(Partitions_all_bounded(k))
142
+
143
+ def ambient(self):
144
+ r"""
145
+
146
+ Returns the Symmetric Functions over the same ring as ``self``. This is needed to
147
+ realize our ring as a quotient.
148
+
149
+ TESTS::
150
+
151
+ sage: Sym = SymmetricFunctions(QQ)
152
+ sage: Q = Sym.kBoundedQuotient(3,t=1)
153
+ sage: Q.ambient()
154
+ Symmetric Functions over Rational Field
155
+ """
156
+ return self._sym
157
+
158
+ def a_realization(self):
159
+ r"""
160
+ Return a particular realization of ``self`` (the basis of `k`-bounded monomials
161
+ if `t=1` and the basis of `k`-bounded Hall-Littlewood functions otherwise).
162
+
163
+ EXAMPLES::
164
+
165
+ sage: Sym = SymmetricFunctions(QQ)
166
+ sage: Q = Sym.kBoundedQuotient(3,t=1)
167
+ sage: Q.a_realization()
168
+ 3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded monomial basis
169
+ sage: Q = Sym.kBoundedQuotient(3,t=2)
170
+ sage: Q.a_realization()
171
+ 3-Bounded Quotient of Symmetric Functions over Rational Field with t=2 in the 3-bounded Hall-Littlewood P basis
172
+ """
173
+ if self.t == 1:
174
+ return self.kmonomial()
175
+ else:
176
+ return self.kHallLittlewoodP()
177
+
178
+ def _repr_(self):
179
+ r"""
180
+ Representation of ``self``.
181
+
182
+ TESTS::
183
+
184
+ sage: Sym = SymmetricFunctions(RR) # indirect doctest
185
+ sage: Sym.kBoundedQuotient(4,t=1)
186
+ 4-Bounded Quotient of Symmetric Functions over Real Field with 53 bits of precision with t=1.00000000000000
187
+ """
188
+ ending = ""
189
+ if str(self.t) != 't':
190
+ ending = ' with t=%s' % (self.t)
191
+ return "%s-Bounded Quotient of Symmetric Functions over %s" % (self.k, self.base_ring())+ending
192
+
193
+ def kmonomial(self):
194
+ r"""
195
+ The monomial basis of the `k`-bounded quotient of symmetric functions, indexed by
196
+ `k`-bounded partitions.
197
+
198
+ EXAMPLES::
199
+
200
+ sage: SymmetricFunctions(QQ).kBoundedQuotient(2,t=1).kmonomial()
201
+ 2-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 2-bounded monomial basis
202
+ """
203
+ return kMonomial(self)
204
+
205
+ km = kmonomial
206
+
207
+ def kHallLittlewoodP(self):
208
+ r"""
209
+ The Hall-Littlewood P basis of the `k`-bounded quotient of symmetric functions,
210
+ indexed by `k`-bounded partitions. At `t=1` this basis is equal to the
211
+ `k`-bounded monomial basis and calculations will be faster using elements in the
212
+ `k`-bounded monomial basis (see :meth:`kmonomial`).
213
+
214
+ EXAMPLES::
215
+
216
+ sage: SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(2).kHallLittlewoodP()
217
+ 2-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the 2-bounded Hall-Littlewood P basis
218
+ """
219
+ return kbounded_HallLittlewoodP(self)
220
+
221
+ kHLP = kHallLittlewoodP
222
+
223
+ def dual_k_Schur(self):
224
+ r"""
225
+ The dual `k`-Schur basis of the `k`-bounded quotient of symmetric functions,
226
+ indexed by `k`-bounded partitions. At `t=1` this is also equal to the affine
227
+ Schur basis and calculations will be faster using elements in the :meth:`affineSchur`
228
+ basis.
229
+
230
+ EXAMPLES::
231
+
232
+ sage: SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(2).dual_k_Schur()
233
+ 2-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the dual 2-Schur basis
234
+ """
235
+ return DualkSchurFunctions(self)
236
+
237
+ dks = dual_k_Schur
238
+
239
+ def affineSchur(self):
240
+ r"""
241
+ The affine Schur basis of the `k`-bounded quotient of symmetric functions,
242
+ indexed by `k`-bounded partitions. This is also equal to the affine Stanley
243
+ symmetric functions (see :meth:`WeylGroups.ElementMethods.stanley_symmetric_function`)
244
+ indexed by an affine Grassmannian permutation.
245
+
246
+ EXAMPLES::
247
+
248
+ sage: SymmetricFunctions(QQ).kBoundedQuotient(2,t=1).affineSchur()
249
+ 2-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 2-bounded affine Schur basis
250
+ """
251
+ return AffineSchurFunctions(self)
252
+
253
+ F = affineSchur
254
+
255
+ @cached_method
256
+ def _G_to_km_on_basis_single_level(self, w, m):
257
+ r"""
258
+ Return the `m`-th level of the affine Grothendieck
259
+ polynomial indexed by the affine Permutation ``w``. This code could be
260
+ significantly sped up if it didn't depend on the Iwahori Hecke algebra
261
+ code.
262
+
263
+ INPUT:
264
+
265
+ - ``w`` -- an affine permutation (an element of the affine type `A` Weyl group)
266
+
267
+ - ``m`` -- integer
268
+
269
+ OUTPUT: an element of the `k`-bounded quotient
270
+
271
+ EXAMPLES::
272
+
273
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
274
+ sage: W = WeylGroup(['A',3,1])
275
+ sage: Q._G_to_km_on_basis_single_level(W.an_element(), 3)
276
+ 0
277
+ sage: Q._G_to_km_on_basis_single_level(W.an_element(), 4)
278
+ m3[1, 1, 1, 1]
279
+ sage: Q._G_to_km_on_basis_single_level(W.an_element(), 5)
280
+ -4*m3[1, 1, 1, 1, 1]
281
+ """
282
+ kB = self._sym.kBoundedSubspace(self.k,t=1)
283
+ g = kB.K_kschur()
284
+ mon = self.km()
285
+ if m < w.length():
286
+ return 0
287
+ ans = self.zero()
288
+ for la in Partitions(m, max_part=self.k):
289
+ ans += g.homogeneous_basis_noncommutative_variables_zero_Hecke(la).coefficient(w) * mon(la)
290
+ return ans
291
+
292
+ def _AffineGrothendieck(self, w, m):
293
+ r"""
294
+ Return the affine Grothendieck polynomial indexed by the affine permutation
295
+ ``w``. Because this belongs to the completion of the algebra, and hence is an
296
+ infinite sum, it computes only up to those symmetric functions of degree at most
297
+ ``m``.
298
+
299
+ INPUT:
300
+
301
+ - ``w`` -- an affine permutation (an element of the affine type `A` Weyl group)
302
+
303
+ - ``m`` -- integer
304
+
305
+ OUTPUT: an element of the `k`-bounded quotient
306
+
307
+ EXAMPLES::
308
+
309
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
310
+ sage: W = WeylGroup(['A',3,1])
311
+ sage: Q._AffineGrothendieck(W.an_element(), 5)
312
+ m3[1, 1, 1, 1] - 4*m3[1, 1, 1, 1, 1]
313
+ """
314
+ return sum(self._G_to_km_on_basis_single_level(w,j) for j in range(w.length(),m+1))
315
+
316
+ @cached_method
317
+ def _AffineGrothendieckPolynomial(self, la, m):
318
+ r"""
319
+ Return the affine Grothendieck polynomial indexed by the partition ``la``.
320
+ Because this belongs to the completion of the algebra, and hence is an infinite
321
+ sum, it computes only up to those symmetric functions of degree at most ``m``.
322
+ This method is here to cache the polynomials.
323
+
324
+ INPUT:
325
+
326
+ - ``la`` -- a `k`-bounded partition
327
+
328
+ - ``m`` -- integer
329
+
330
+ EXAMPLES::
331
+
332
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
333
+ sage: Q._AffineGrothendieckPolynomial(Partition([2,1]),4)
334
+ 2*m3[1, 1, 1] - 8*m3[1, 1, 1, 1] + m3[2, 1] - 3*m3[2, 1, 1] - m3[2, 2]
335
+ """
336
+ return self._AffineGrothendieck(la.to_core(self.k).to_grassmannian(),m)
337
+
338
+ def AffineGrothendieckPolynomial(self, la, m):
339
+ r"""
340
+ Return the affine Grothendieck polynomial indexed by the partition ``la``.
341
+ Because this belongs to the completion of the algebra, and hence is an infinite
342
+ sum, it computes only up to those symmetric functions of degree at most ``m``.
343
+ See :meth:`_AffineGrothendieckPolynomial` for the code.
344
+
345
+ INPUT:
346
+
347
+ - ``la`` -- a `k`-bounded partition
348
+
349
+ - ``m`` -- integer
350
+
351
+ EXAMPLES::
352
+
353
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
354
+ sage: Q.AffineGrothendieckPolynomial([2,1],4)
355
+ 2*m3[1, 1, 1] - 8*m3[1, 1, 1, 1] + m3[2, 1] - 3*m3[2, 1, 1] - m3[2, 2]
356
+ """
357
+ if la == []:
358
+ return self.a_realization().one()
359
+ return self._AffineGrothendieckPolynomial(Partition(la),m)
360
+
361
+ def _an_element_(self):
362
+ r"""
363
+ Return an element of the quotient ring of `k`-bounded symmetric functions.
364
+
365
+ This method is here to make the TestSuite run properly.
366
+
367
+ EXAMPLES::
368
+
369
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
370
+ sage: Q.an_element()
371
+ 2*m3[] + 2*m3[1] + 3*m3[2]
372
+ """
373
+ return self.a_realization().an_element()
374
+
375
+ def one(self):
376
+ r"""
377
+ Return the unit of the quotient ring of `k`-bounded symmetric functions. This
378
+ method is here to make the TestSuite run properly.
379
+
380
+ EXAMPLES::
381
+
382
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
383
+ sage: Q.one()
384
+ m3[]
385
+ """
386
+ return self.a_realization().one()
387
+
388
+ def retract(self, la):
389
+ r"""
390
+ Give the retract map from the symmetric functions to the quotient ring of
391
+ `k`-bounded symmetric functions. This method is here to make the TestSuite run
392
+ properly.
393
+
394
+ INPUT:
395
+
396
+ - ``la`` -- a partition
397
+
398
+ OUTPUT: the monomial element of the `k`-bounded quotient indexed by ``la``
399
+
400
+ EXAMPLES::
401
+
402
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
403
+ sage: Q.retract([2,1])
404
+ m3[2, 1]
405
+ """
406
+ km = self.a_realization()
407
+ return km.retract(la)
408
+
409
+ def lift(self, la):
410
+ r"""
411
+ Give the lift map from the quotient ring of `k`-bounded symmetric functions to
412
+ the symmetric functions. This method is here to make the TestSuite run properly.
413
+
414
+ INPUT:
415
+
416
+ - ``la`` -- a `k`-bounded partition
417
+
418
+ OUTPUT:
419
+
420
+ - The monomial element or a Hall-Littlewood P element of the symmetric functions
421
+ indexed by the partition ``la``.
422
+
423
+ EXAMPLES::
424
+
425
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
426
+ sage: Q.lift([2,1])
427
+ m[2, 1]
428
+ sage: Q = SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(3)
429
+ sage: Q.lift([2,1])
430
+ HLP[2, 1]
431
+ """
432
+ km = self.a_realization()
433
+ return km.lift(la)
434
+
435
+ def realizations(self):
436
+ """
437
+ A list of realizations of the `k`-bounded quotient.
438
+
439
+ EXAMPLES::
440
+
441
+ sage: kQ = SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(3)
442
+ sage: kQ.realizations()
443
+ [3-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the 3-bounded monomial basis, 3-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the 3-bounded Hall-Littlewood P basis, 3-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the 3-bounded affine Schur basis, 3-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the dual 3-Schur basis]
444
+ sage: HLP = kQ.ambient().hall_littlewood().P()
445
+ sage: all( rzn(HLP[3,2,1]).lift() == HLP[3,2,1] for rzn in kQ.realizations()) # needs lrcalc_python
446
+ True
447
+ sage: kQ = SymmetricFunctions(QQ).kBoundedQuotient(3,1)
448
+ sage: kQ.realizations()
449
+ [3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded monomial basis, 3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded Hall-Littlewood P basis, 3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded affine Schur basis, 3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the dual 3-Schur basis]
450
+ sage: m = kQ.ambient().m()
451
+ sage: all( rzn(m[3,2,1]).lift() == m[3,2,1] for rzn in kQ.realizations()) # needs lrcalc_python
452
+ True
453
+ """
454
+ return [ self.km(), self.kHLP(), self.affineSchur(), self.dual_k_Schur()]
455
+
456
+
457
+ class KBoundedQuotientBases(Category_realization_of_parent):
458
+ r"""
459
+ The category of bases for the `k`-bounded subspace of symmetric functions.
460
+ """
461
+
462
+ def __init__(self, base):
463
+ """
464
+ Initialization of the bases of the `k`-bounded subspace.
465
+
466
+ INPUT:
467
+
468
+ - ``base`` -- a basis in the `k`-bounded subspace
469
+
470
+ TESTS::
471
+
472
+ sage: Sym = SymmetricFunctions(QQ['t'])
473
+ sage: from sage.combinat.sf.k_dual import KBoundedQuotientBases
474
+ sage: Q = Sym.kBoundedQuotient(3,t=1)
475
+ sage: KQB = KBoundedQuotientBases(Q); KQB
476
+ Category of k bounded quotient bases of 3-Bounded Quotient of Symmetric Functions over Univariate Polynomial Ring in t over Rational Field with t=1
477
+ """
478
+ Category_realization_of_parent.__init__(self, base)
479
+
480
+ def super_categories(self):
481
+ r"""
482
+ The super categories of ``self``.
483
+
484
+ EXAMPLES::
485
+
486
+ sage: Sym = SymmetricFunctions(QQ['t'])
487
+ sage: from sage.combinat.sf.k_dual import KBoundedQuotientBases
488
+ sage: Q = Sym.kBoundedQuotient(3,t=1)
489
+ sage: KQB = KBoundedQuotientBases(Q)
490
+ sage: KQB.super_categories()
491
+ [Category of realizations of 3-Bounded Quotient of Symmetric Functions over Univariate Polynomial Ring in t over Rational Field with t=1,
492
+ Join of Category of graded Hopf algebras with basis over Univariate Polynomial Ring in t over Rational Field
493
+ and Category of quotients of algebras over Univariate Polynomial Ring in t over Rational Field
494
+ and Category of quotients of graded modules with basis over Univariate Polynomial Ring in t over Rational Field]
495
+ """
496
+ R = self.base().base_ring()
497
+ category = GradedHopfAlgebrasWithBasis(R)
498
+ return [Realizations(self.base()), category.Quotients()]
499
+
500
+ class ParentMethods:
501
+
502
+ def retract(self, la):
503
+ r"""
504
+ Give the retract map from the symmetric functions to the quotient ring of
505
+ `k`-bounded symmetric functions. This method is here to make the TestSuite run
506
+ properly.
507
+
508
+ INPUT:
509
+
510
+ - ``la`` -- a partition
511
+
512
+ OUTPUT: the monomial element of the `k`-bounded quotient indexed by ``la``
513
+
514
+ EXAMPLES::
515
+
516
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
517
+ sage: Q.retract([2,1])
518
+ m3[2, 1]
519
+ """
520
+ kmhlp = self.realization_of().a_realization()
521
+ return kmhlp.retract(la)
522
+
523
+ def _element_constructor_(self, x):
524
+ r"""
525
+ Needed to rewrite the element constructor because of a bug in free_module.py.
526
+ Ideally :meth:`_element_constructor_` would be inherited from free_module.py,
527
+ but it allows for bad inputs.
528
+
529
+ INPUT:
530
+
531
+ - ``x`` -- a `k`-bounded partition
532
+
533
+ OUTPUT: an element of the `k`-bounded basis
534
+
535
+ EXAMPLES::
536
+
537
+ sage: Q = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
538
+ sage: F = Q.affineSchur()
539
+ sage: F([2,1])
540
+ F3[2, 1]
541
+ sage: F(Partition([4,1]))
542
+ Traceback (most recent call last):
543
+ ...
544
+ TypeError: do not know how to make x (= [4, 1]) an element of self (=3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded affine Schur basis)
545
+ """
546
+ R = self.base_ring()
547
+
548
+ #Coerce ints to Integers
549
+ if isinstance(x, int):
550
+ x = Integer(x)
551
+ if x in R:
552
+ if x == 0:
553
+ return self.zero()
554
+ else:
555
+ raise TypeError("do not know how to make x (= %s) an element of %s" % (x, self))
556
+ #x is an element of the basis enumerated set;
557
+ elif x in self._indices:
558
+ return self.monomial(self._indices(x))
559
+ raise TypeError("do not know how to make x (= %s) an element of self (=%s)" % (x, self))
560
+
561
+ def ambient(self):
562
+ r"""
563
+ Return the symmetric functions.
564
+
565
+ EXAMPLES::
566
+
567
+ sage: km = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).km()
568
+ sage: km.ambient()
569
+ Symmetric Functions over Rational Field
570
+ """
571
+ return self.realization_of()._sym
572
+
573
+ def __getitem__(self, c):
574
+ r"""
575
+ Implement shorthand for accessing basis elements.
576
+
577
+ For a basis `X` indexed by partitions, this method allows for
578
+ `X[[3,2]]` and `X[3,2]` to be equivalent to `X[Partition([3,2])]`.
579
+
580
+ Due to limitations in Python syntax, one must use `X[[]]` and not
581
+ `X[]` for the basis element indexed by the empty partition.
582
+
583
+ EXAMPLES::
584
+
585
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
586
+ sage: F[3,2]
587
+ F3[3, 2]
588
+ sage: F[[]]
589
+ F3[]
590
+ """
591
+ if c in ZZ:
592
+ c = self._kbounded_partitions([c])
593
+ else:
594
+ c = self._kbounded_partitions(c)
595
+ return self.monomial(c)
596
+
597
+ def _repr_term(self, c):
598
+ """
599
+ Display elements with single brackets.
600
+
601
+ The default implementation of CombinatorialFreeModule gives double
602
+ brackets for basis elements indexed by partitions, i.e.,
603
+ `X[[3,2]]`.
604
+
605
+ EXAMPLES::
606
+
607
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
608
+ sage: F[3,2] # indirect doctest
609
+ F3[3, 2]
610
+ """
611
+ return self.prefix()+str(c)
612
+
613
+ @cached_method
614
+ def one_basis(self):
615
+ r"""
616
+ Return the basis element indexing ``1``.
617
+
618
+ EXAMPLES::
619
+
620
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
621
+ sage: F.one() # indirect doctest
622
+ F3[]
623
+ """
624
+ return self._kbounded_partitions([])
625
+
626
+ # This is sufficient for degree to work
627
+
628
+ def degree_on_basis(self, b):
629
+ r"""
630
+ Return the degree of the basis element indexed by ``b``.
631
+
632
+ INPUT:
633
+
634
+ - ``b`` -- a partition
635
+
636
+ EXAMPLES::
637
+
638
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
639
+ sage: F.degree_on_basis(Partition([3,2]))
640
+ 5
641
+ """
642
+ return sum(b)
643
+
644
+ def indices(self):
645
+ r"""
646
+ The set of `k`-bounded partitions of all nonnegative integers.
647
+
648
+ EXAMPLES::
649
+
650
+ sage: km = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).km()
651
+ sage: km.indices()
652
+ 3-Bounded Partitions
653
+ """
654
+ return self._kbounded_partitions
655
+
656
+ def lift(self, la):
657
+ r"""
658
+ Implement the lift map from the basis ``self`` to the monomial basis of
659
+ symmetric functions.
660
+
661
+ INPUT:
662
+
663
+ - ``la`` -- a `k`-bounded partition
664
+
665
+ OUTPUT: a symmetric function in the monomial basis
666
+
667
+ EXAMPLES::
668
+
669
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
670
+ sage: F.lift([3,1])
671
+ m[1, 1, 1, 1] + m[2, 1, 1] + m[2, 2] + m[3, 1]
672
+ sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
673
+ sage: dks = Sym.kBoundedQuotient(3).dual_k_Schur()
674
+ sage: dks.lift([3,1])
675
+ t^5*HLP[1, 1, 1, 1] + t^2*HLP[2, 1, 1] + t*HLP[2, 2] + HLP[3, 1]
676
+ sage: dks = Sym.kBoundedQuotient(3,t=1).dual_k_Schur()
677
+ sage: dks.lift([3,1]) # needs lrcalc_python
678
+ m[1, 1, 1, 1] + m[2, 1, 1] + m[2, 2] + m[3, 1]
679
+ """
680
+ kmhlp = self.realization_of().a_realization()
681
+ return kmhlp(self(la)).lift()
682
+
683
+ def product(self, x, y):
684
+ r"""
685
+ Return the product of two elements ``x`` and ``y``.
686
+
687
+ INPUT:
688
+
689
+ - ``x``, ``y`` -- elements of the `k`-bounded quotient of symmetric functions
690
+
691
+ OUTPUT: a `k`-bounded symmetric function in the dual `k`-Schur function basis
692
+
693
+ EXAMPLES::
694
+
695
+ sage: # needs lrcalc_python
696
+ sage: dks3 = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).dual_k_Schur()
697
+ sage: dks3.product(dks3[2,1],dks3[1,1])
698
+ 2*dks3[1, 1, 1, 1, 1] + 2*dks3[2, 1, 1, 1] + 2*dks3[2, 2, 1] + dks3[3, 1, 1] + dks3[3, 2]
699
+ sage: dks3.product(dks3[2,1]+dks3[1], dks3[1,1])
700
+ dks3[1, 1, 1] + 2*dks3[1, 1, 1, 1, 1] + dks3[2, 1] + 2*dks3[2, 1, 1, 1] + 2*dks3[2, 2, 1] + dks3[3, 1, 1] + dks3[3, 2]
701
+ sage: dks3.product(dks3[2,1]+dks3[1], dks3([]))
702
+ dks3[1] + dks3[2, 1]
703
+ sage: dks3.product(dks3([]), dks3([]))
704
+ dks3[]
705
+ sage: dks3.product(dks3([]), dks3([4,1]))
706
+ Traceback (most recent call last):
707
+ ...
708
+ TypeError: do not know how to make x (= [4, 1]) an element of self (=3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the dual 3-Schur basis)
709
+
710
+ ::
711
+
712
+ sage: # needs lrcalc_python
713
+ sage: dks3 = SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(3).dual_k_Schur()
714
+ sage: dks3.product(dks3[2,1],dks3[1,1])
715
+ (t^2+t)*dks3[1, 1, 1, 1, 1] + (t+1)*dks3[2, 1, 1, 1] + (t+1)*dks3[2, 2, 1] + dks3[3, 1, 1] + dks3[3, 2]
716
+ sage: dks3.product(dks3[2,1]+dks3[1], dks3[1,1])
717
+ dks3[1, 1, 1] + (t^2+t)*dks3[1, 1, 1, 1, 1] + dks3[2, 1] + (t+1)*dks3[2, 1, 1, 1] + (t+1)*dks3[2, 2, 1] + dks3[3, 1, 1] + dks3[3, 2]
718
+ sage: dks3.product(dks3[2,1]+dks3[1], dks3([]))
719
+ dks3[1] + dks3[2, 1]
720
+ sage: dks3.product(dks3([]), dks3([]))
721
+ dks3[]
722
+
723
+ ::
724
+
725
+ sage: # needs lrcalc_python
726
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
727
+ sage: F.product(F[2,1],F[1,1])
728
+ 2*F3[1, 1, 1, 1, 1] + 2*F3[2, 1, 1, 1] + 2*F3[2, 2, 1] + F3[3, 1, 1] + F3[3, 2]
729
+ sage: F.product(F[2,1]+F[1], F[1,1])
730
+ F3[1, 1, 1] + 2*F3[1, 1, 1, 1, 1] + F3[2, 1] + 2*F3[2, 1, 1, 1] + 2*F3[2, 2, 1] + F3[3, 1, 1] + F3[3, 2]
731
+ sage: F.product(F[2,1]+F[1], F([]))
732
+ F3[1] + F3[2, 1]
733
+ sage: F.product(F([]), F([]))
734
+ F3[]
735
+ sage: F.product(F([]), F([4,1]))
736
+ Traceback (most recent call last):
737
+ ...
738
+ TypeError: do not know how to make x (= [4, 1]) an element of self (=3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded affine Schur basis)
739
+
740
+ ::
741
+
742
+ sage: # needs lrcalc_python
743
+ sage: F = SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(3).affineSchur()
744
+ sage: F.product(F[2,1],F[1,1])
745
+ 2*F3[1, 1, 1, 1, 1] + 2*F3[2, 1, 1, 1] + 2*F3[2, 2, 1] + F3[3, 1, 1] + F3[3, 2]
746
+ sage: F.product(F[2,1],F[2])
747
+ (t^4+t^3-2*t^2+1)*F3[1, 1, 1, 1, 1] + (-t^2+t+1)*F3[2, 1, 1, 1] + (-t^2+t+2)*F3[2, 2, 1] + (t+1)*F3[3, 1, 1] + (t+1)*F3[3, 2]
748
+ sage: F.product(F[2,1]+F[1], F[1,1])
749
+ F3[1, 1, 1] + 2*F3[1, 1, 1, 1, 1] + F3[2, 1] + 2*F3[2, 1, 1, 1] + 2*F3[2, 2, 1] + F3[3, 1, 1] + F3[3, 2]
750
+ sage: F.product(F[2,1]+F[1], F([]))
751
+ F3[1] + F3[2, 1]
752
+ sage: F.product(F([]), F([]))
753
+ F3[]
754
+
755
+ ::
756
+
757
+ sage: # needs lrcalc_python
758
+ sage: km = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).km()
759
+ sage: km.product(km[2,1],km[2,1])
760
+ 4*m3[2, 2, 1, 1] + 6*m3[2, 2, 2] + 2*m3[3, 2, 1] + 2*m3[3, 3]
761
+ sage: Q3 = SymmetricFunctions(FractionField(QQ['t'])).kBoundedQuotient(3)
762
+ sage: km = Q3.km()
763
+ sage: km.product(km[2,1],km[2,1])
764
+ (t^5+7*t^4-8*t^3-28*t^2+47*t-19)*m3[1, 1, 1, 1, 1, 1] + (t^4-3*t^3-9*t^2+23*t-12)*m3[2, 1, 1, 1, 1] + (-t^3-3*t^2+11*t-3)*m3[2, 2, 1, 1] + (-t^2+5*t+2)*m3[2, 2, 2] + (6*t-6)*m3[3, 1, 1, 1] + (3*t-1)*m3[3, 2, 1] + (t+1)*m3[3, 3]
765
+ sage: dks = Q3.dual_k_Schur()
766
+ sage: km.product(dks[2,1],dks[1,1])
767
+ 20*m3[1, 1, 1, 1, 1] + 9*m3[2, 1, 1, 1] + 4*m3[2, 2, 1] + 2*m3[3, 1, 1] + m3[3, 2]
768
+ """
769
+ return self( x.lift() * y.lift() )
770
+
771
+ def antipode(self, element):
772
+ r"""
773
+ Return the antipode of ``element`` via lifting to the symmetric
774
+ functions and then retracting into the `k`-bounded quotient basis.
775
+
776
+ INPUT:
777
+
778
+ - ``element`` -- an element in a basis of the ring of symmetric
779
+ functions
780
+
781
+ EXAMPLES::
782
+
783
+ sage: # needs lrcalc_python
784
+ sage: dks3 = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).dual_k_Schur()
785
+ sage: dks3[3,2].antipode()
786
+ -dks3[1, 1, 1, 1, 1]
787
+ sage: km = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).km()
788
+ sage: km[3,2].antipode()
789
+ m3[3, 2]
790
+ sage: km.antipode(km[3,2])
791
+ m3[3, 2]
792
+ sage: m = SymmetricFunctions(QQ).m()
793
+ sage: m[3,2].antipode()
794
+ m[3, 2] + 2*m[5]
795
+
796
+ ::
797
+
798
+ sage: # needs lrcalc_python
799
+ sage: km = SymmetricFunctions(FractionField(QQ['t'])).kBoundedQuotient(3).km()
800
+ sage: km[1,1,1,1].antipode()
801
+ (t^3-3*t^2+3*t)*m3[1, 1, 1, 1] + (-t^2+2*t)*m3[2, 1, 1] + t*m3[2, 2] + t*m3[3, 1]
802
+ sage: kHP = SymmetricFunctions(FractionField(QQ['t'])).kBoundedQuotient(3).kHLP()
803
+ sage: kHP[2,2].antipode()
804
+ (t^9-t^6-t^5+t^2)*HLP3[1, 1, 1, 1] + (t^6-t^3-t^2+t)*HLP3[2, 1, 1] + (t^5-t^2+1)*HLP3[2, 2] + (t^4-t)*HLP3[3, 1]
805
+ sage: dks = SymmetricFunctions(FractionField(QQ['t'])).kBoundedQuotient(3).dks()
806
+ sage: dks[2,2].antipode()
807
+ dks3[2, 2]
808
+ sage: dks[3,2].antipode()
809
+ -t^2*dks3[1, 1, 1, 1, 1] + (t^2-1)*dks3[2, 2, 1] + (-t^5+t)*dks3[3, 2]
810
+ """
811
+ return self(element.lift().antipode())
812
+
813
+ def coproduct(self, element):
814
+ r"""
815
+ Return the coproduct of ``element`` via lifting to the symmetric
816
+ functions and then returning to the `k`-bounded quotient basis.
817
+ This method is implemented for all `t` but is (weakly) conjectured
818
+ to not be the correct operation for arbitrary `t` because the
819
+ coproduct on dual-`k`-Schur functions does not have a positive
820
+ expansion.
821
+
822
+ INPUT:
823
+
824
+ - ``element`` -- an element in a basis of the ring of symmetric
825
+ functions
826
+
827
+ EXAMPLES::
828
+
829
+ sage: # needs lrcalc_python
830
+ sage: Q3 = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1)
831
+ sage: km = Q3.km()
832
+ sage: km[3,2].coproduct()
833
+ m3[] # m3[3, 2] + m3[2] # m3[3] + m3[3] # m3[2] + m3[3, 2] # m3[]
834
+ sage: dks3 = Q3.dual_k_Schur()
835
+ sage: dks3[2,2].coproduct()
836
+ dks3[] # dks3[2, 2] + dks3[1] # dks3[2, 1] + dks3[1, 1] # dks3[1, 1] + dks3[2] # dks3[2] + dks3[2, 1] # dks3[1] + dks3[2, 2] # dks3[]
837
+
838
+ ::
839
+
840
+ sage: # needs lrcalc_python
841
+ sage: Q3t = SymmetricFunctions(FractionField(QQ['t'])).kBoundedQuotient(3)
842
+ sage: km = Q3t.km()
843
+ sage: km[3,2].coproduct()
844
+ m3[] # m3[3, 2] + m3[2] # m3[3] + m3[3] # m3[2] + m3[3, 2] # m3[]
845
+ sage: dks = Q3t.dks()
846
+ sage: dks[2,1,1].coproduct()
847
+ dks3[] # dks3[2, 1, 1] + (-t+1)*dks3[1] # dks3[1, 1, 1] + dks3[1] # dks3[2, 1] + (-t+1)*dks3[1, 1] # dks3[1, 1] + dks3[1, 1] # dks3[2] + (-t+1)*dks3[1, 1, 1] # dks3[1] + dks3[2] # dks3[1, 1] + dks3[2, 1] # dks3[1] + dks3[2, 1, 1] # dks3[]
848
+ sage: kHLP = Q3t.kHLP()
849
+ sage: kHLP[2,1].coproduct()
850
+ HLP3[] # HLP3[2, 1] + (-t^2+1)*HLP3[1] # HLP3[1, 1] + HLP3[1] # HLP3[2] + (-t^2+1)*HLP3[1, 1] # HLP3[1] + HLP3[2] # HLP3[1] + HLP3[2, 1] # HLP3[]
851
+ sage: km.coproduct(km[3,2])
852
+ m3[] # m3[3, 2] + m3[2] # m3[3] + m3[3] # m3[2] + m3[3, 2] # m3[]
853
+ """
854
+ from sage.categories.tensor import tensor
855
+ base = element.lift().parent()
856
+ return self.tensor_square().sum(coeff * tensor([self(base[x]), self(base[y])])
857
+ for ((x,y), coeff) in element.lift().coproduct())
858
+
859
+ def counit(self, element):
860
+ r"""
861
+ Return the counit of ``element``.
862
+
863
+ The counit is the constant term of ``element``.
864
+
865
+ INPUT:
866
+
867
+ - ``element`` -- an element in a basis
868
+
869
+ EXAMPLES::
870
+
871
+ sage: km = SymmetricFunctions(FractionField(QQ['t'])).kBoundedQuotient(3).km()
872
+ sage: f = 2*km[2,1] - 3*km([])
873
+ sage: f.counit()
874
+ -3
875
+ sage: km.counit(f)
876
+ -3
877
+ """
878
+ return element.coefficient([])
879
+
880
+ class ElementMethods:
881
+ pass
882
+
883
+
884
+ class KBoundedQuotientBasis(CombinatorialFreeModule):
885
+ r"""
886
+ Abstract base class for the bases of the `k`-bounded quotient.
887
+ """
888
+
889
+ def __init__(self, kBoundedRing, prefix):
890
+ r"""
891
+ Initialize ``self``.
892
+
893
+ INPUT:
894
+
895
+ - ``kBoundedRing`` -- an element which is of class :class:`KBoundedQuotient`
896
+ - ``prefix`` -- string used to distinguish this basis, and used in printing
897
+
898
+ EXAMPLES::
899
+
900
+ sage: from sage.combinat.sf.k_dual import kMonomial
901
+ sage: km = kMonomial(SymmetricFunctions(QQ).kBoundedQuotient(4,t=1))
902
+ sage: km.prefix() # indirect doctest
903
+ 'm4'
904
+ sage: isinstance(km, sage.combinat.sf.k_dual.KBoundedQuotientBasis)
905
+ True
906
+ """
907
+ CombinatorialFreeModule.__init__(self, kBoundedRing.base_ring(),
908
+ kBoundedRing.indices(),
909
+ category=KBoundedQuotientBases(kBoundedRing),
910
+ prefix='%s%d' % (prefix, kBoundedRing.k))
911
+
912
+ self._kBoundedRing = kBoundedRing
913
+ self.k = kBoundedRing.k
914
+ self.t = kBoundedRing.t
915
+ self._kbounded_partitions = Partitions_all_bounded(kBoundedRing.k)
916
+
917
+ # The following are meant to be inherited with the category framework, but
918
+ # this fails because they are methods of Parent. The trick below overcomes
919
+ # this problem.
920
+ __getitem__ = raw_getattr(KBoundedQuotientBases.ParentMethods, "__getitem__")
921
+ _repr_term = raw_getattr(KBoundedQuotientBases.ParentMethods, "_repr_term")
922
+ _element_constructor_ = raw_getattr(KBoundedQuotientBases.ParentMethods, "_element_constructor_")
923
+
924
+
925
+ class kMonomial(KBoundedQuotientBasis):
926
+ r"""
927
+ The basis of monomial symmetric functions indexed by partitions with first
928
+ part less than or equal to `k`.
929
+ """
930
+
931
+ def __init__(self, kBoundedRing):
932
+ r"""
933
+ Initialize the ring which is the `k`-Bounded monomial quotient basis.
934
+
935
+ INPUT:
936
+
937
+ - ``kBoundedRing`` -- an element which is of class :class:`KBoundedQuotient`
938
+
939
+ EXAMPLES::
940
+
941
+ sage: from sage.combinat.sf.k_dual import kMonomial
942
+ sage: km = kMonomial(SymmetricFunctions(QQ).kBoundedQuotient(4,t=1))
943
+ sage: km
944
+ 4-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 4-bounded monomial basis
945
+ sage: TestSuite(km).run()
946
+ """
947
+ KBoundedQuotientBasis.__init__(self, kBoundedRing, 'm')
948
+ Sym = kBoundedRing.ambient()
949
+ Sym.m().module_morphism(self.retract,codomain=self).register_as_coercion() # coercion of monomial to k-bounded monomial
950
+
951
+ def _repr_(self):
952
+ """
953
+ TESTS::
954
+
955
+ sage: Sym = SymmetricFunctions(QQ)
956
+ sage: km = Sym.kBoundedQuotient(3,t=1).km()
957
+ sage: km._repr_()
958
+ '3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded monomial basis'
959
+ """
960
+ return self.realization_of()._repr_() + ' in the %s-bounded monomial basis' % (self.k)
961
+
962
+ def retract(self, la):
963
+ r"""
964
+ Implement the retract function on the monomial basis. Given a partition ``la``,
965
+ the retract will return the corresponding `k`-bounded monomial basis element if
966
+ ``la`` is `k`-bounded; zero otherwise.
967
+
968
+ INPUT:
969
+
970
+ - ``la`` -- a partition
971
+
972
+ OUTPUT: a `k`-bounded monomial symmetric function in the `k`-quotient of symmetric
973
+ functions
974
+
975
+ EXAMPLES::
976
+
977
+ sage: km = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).km()
978
+ sage: km.retract(Partition([3,1]))
979
+ m3[3, 1]
980
+ sage: km.retract(Partition([4,1]))
981
+ 0
982
+ sage: km.retract([])
983
+ m3[]
984
+ sage: m = SymmetricFunctions(QQ).m()
985
+ sage: km(m[3, 1])
986
+ m3[3, 1]
987
+ sage: km(m[4, 1])
988
+ 0
989
+
990
+ ::
991
+
992
+ sage: km = SymmetricFunctions(FractionField(QQ['t'])).kBoundedQuotient(3).km()
993
+ sage: km.retract(Partition([3,1]))
994
+ m3[3, 1]
995
+ sage: km.retract(Partition([4,1]))
996
+ (t^4+t^3-9*t^2+11*t-4)*m3[1, 1, 1, 1, 1] + (-3*t^2+6*t-3)*m3[2, 1, 1, 1] + (-t^2+3*t-2)*m3[2, 2, 1] + (2*t-2)*m3[3, 1, 1] + (t-1)*m3[3, 2]
997
+ sage: m = SymmetricFunctions(FractionField(QQ['t'])).m()
998
+ sage: km(m[3, 1])
999
+ m3[3, 1]
1000
+ sage: km(m[4, 1])
1001
+ (t^4+t^3-9*t^2+11*t-4)*m3[1, 1, 1, 1, 1] + (-3*t^2+6*t-3)*m3[2, 1, 1, 1] + (-t^2+3*t-2)*m3[2, 2, 1] + (2*t-2)*m3[3, 1, 1] + (t-1)*m3[3, 2]
1002
+ """
1003
+ if la == []:
1004
+ return self([])
1005
+ if la[0] <= self.k:
1006
+ return self(la)
1007
+ if self.t == 1:
1008
+ return self.zero()
1009
+ else:
1010
+ kHLP = self._kBoundedRing.kHallLittlewoodP()
1011
+ return self(kHLP._m_to_kHLP_on_basis(la))
1012
+
1013
+ def lift(self, la):
1014
+ r"""
1015
+ Implement the lift function on the monomial basis. Given a `k`-bounded partition
1016
+ ``la``, the lift will return the corresponding monomial basis element.
1017
+
1018
+ INPUT:
1019
+
1020
+ - ``la`` -- a `k`-bounded partition
1021
+
1022
+ OUTPUT: a monomial symmetric function
1023
+
1024
+ EXAMPLES::
1025
+
1026
+ sage: km = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).km()
1027
+ sage: km.lift(Partition([3,1]))
1028
+ m[3, 1]
1029
+ sage: km.lift([])
1030
+ m[]
1031
+ sage: km.lift(Partition([4,1]))
1032
+ Traceback (most recent call last):
1033
+ ...
1034
+ TypeError: do not know how to make x (= [4, 1]) an element of self (=3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded monomial basis)
1035
+ """
1036
+ m = self._kBoundedRing.ambient().m()
1037
+ return m._from_dict(dict(self(la)))
1038
+
1039
+
1040
+ class kbounded_HallLittlewoodP(KBoundedQuotientBasis):
1041
+ r"""
1042
+ The basis of P Hall-Littlewood symmetric functions indexed by partitions with first
1043
+ part less than or equal to `k`.
1044
+ """
1045
+
1046
+ def __init__(self, kBoundedRing):
1047
+ r"""
1048
+ Initialize the ring which is the `k`-Bounded Hall-Littlewood P quotient basis.
1049
+
1050
+ INPUT:
1051
+
1052
+ - ``kBoundedRing`` -- an element which is of class :class:`KBoundedQuotient`
1053
+
1054
+ EXAMPLES::
1055
+
1056
+ sage: from sage.combinat.sf.k_dual import kbounded_HallLittlewoodP
1057
+ sage: kP = kbounded_HallLittlewoodP(SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(4))
1058
+ sage: kP
1059
+ 4-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the 4-bounded Hall-Littlewood P basis
1060
+ sage: TestSuite(kP).run()
1061
+ """
1062
+ KBoundedQuotientBasis.__init__(self, kBoundedRing, 'HLP')
1063
+
1064
+ Sym = kBoundedRing.ambient()
1065
+ Sym.hall_littlewood(kBoundedRing.t).P().module_morphism(self.retract,codomain=self).register_as_coercion() # morphism from HLP to k-bounded HLP
1066
+ km = kBoundedRing.km()
1067
+ self.module_morphism(self._HLP_to_mk_on_basis, codomain=km, triangular='lower', unitriangular=True).register_as_coercion() # morphism from k-bounded-HLP to k-bounded-m
1068
+ km.module_morphism(self._m_to_kHLP_on_basis, codomain=self, triangular='lower', unitriangular=True).register_as_coercion() # morphism from k-bounded-m to k-bounded-HLP
1069
+
1070
+ def _repr_(self):
1071
+ """
1072
+ TESTS::
1073
+
1074
+ sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
1075
+ sage: kHLP = Sym.kBoundedQuotient(3).kHallLittlewoodP()
1076
+ sage: kHLP._repr_()
1077
+ '3-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the 3-bounded Hall-Littlewood P basis'
1078
+ """
1079
+ return self.realization_of()._repr_() + ' in the %s-bounded Hall-Littlewood P basis' % (self.k)
1080
+
1081
+ def _m_to_kHLP_on_basis(self, la):
1082
+ r"""
1083
+ Convert from the monomial basis to the `k`-bounded Hall-Littlewood
1084
+ P basis. If ``la`` is not `k`-bounded then it returns the projection of
1085
+ the monomial by the ideal generated by the Hall-Littlewood P basis indexed
1086
+ by partitions whose first part is greater than `k`.
1087
+
1088
+ INPUT:
1089
+
1090
+ - ``la`` -- a partition
1091
+
1092
+ OUTPUT: an element of the `k`-bounded Hall-Littlewood P basis
1093
+
1094
+ EXAMPLES::
1095
+
1096
+ sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
1097
+ sage: kHLP = Sym.kBoundedQuotient(3).kHallLittlewoodP()
1098
+ sage: kHLP._m_to_kHLP_on_basis([3,1])
1099
+ (t^5-2*t^2-t+2)*HLP3[1, 1, 1, 1] + (t^2-1)*HLP3[2, 1, 1] + (t-1)*HLP3[2, 2] + HLP3[3, 1]
1100
+ sage: kHLP._m_to_kHLP_on_basis([4])
1101
+ (t^6-t^5-t^4+t^2+t-1)*HLP3[1, 1, 1, 1] + (t^3-t^2-t+1)*HLP3[2, 1, 1] + (t^2-t)*HLP3[2, 2] + (t-1)*HLP3[3, 1]
1102
+ sage: mk = kHLP.realization_of().km()
1103
+ sage: kHLP(mk([1,1])^2)
1104
+ (t^4+t^3+2*t^2+t+1)*HLP3[1, 1, 1, 1] + (t+1)*HLP3[2, 1, 1] + HLP3[2, 2]
1105
+ sage: kHLP._m_to_kHLP_on_basis([])
1106
+ HLP3[]
1107
+ sage: kHLP = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).kHallLittlewoodP()
1108
+ sage: kHLP._m_to_kHLP_on_basis([3,1])
1109
+ HLP3[3, 1]
1110
+ sage: kHLP._m_to_kHLP_on_basis([4])
1111
+ 0
1112
+ sage: mk = kHLP.realization_of().km()
1113
+ sage: kHLP(mk([1,1])^2)
1114
+ 6*HLP3[1, 1, 1, 1] + 2*HLP3[2, 1, 1] + HLP3[2, 2]
1115
+ sage: kHLP(mk([2,1])^2)
1116
+ 4*HLP3[2, 2, 1, 1] + 6*HLP3[2, 2, 2] + 2*HLP3[3, 2, 1] + 2*HLP3[3, 3]
1117
+ """
1118
+ if self.t == 1:
1119
+ if la in self._kbounded_partitions:
1120
+ return self(la)
1121
+ else:
1122
+ return self.zero()
1123
+ else:
1124
+ HLP = self._kBoundedRing._quotient_basis
1125
+ m = self._kBoundedRing._sym.m()
1126
+ elt = dict(x for x in dict(HLP(m(la))).items()
1127
+ if x[0] in self._kbounded_partitions)
1128
+ return self._from_dict(elt)
1129
+
1130
+ def _HLP_to_mk_on_basis(self, la):
1131
+ r"""
1132
+ Convert from the Hall-Littlewood P basis to the `k`-bounded monomial basis and
1133
+ projects into the `k`-bounded quotient if ``la`` is not a bounded partition.
1134
+
1135
+ INPUT:
1136
+
1137
+ - ``la`` -- a partition
1138
+
1139
+ OUTPUT: an element of the `k`-bounded monomial basis
1140
+
1141
+ EXAMPLES::
1142
+
1143
+ sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
1144
+ sage: kHLP = Sym.kBoundedQuotient(3).kHallLittlewoodP()
1145
+ sage: kHLP._HLP_to_mk_on_basis([3,1])
1146
+ (t^3+t^2-5*t+3)*m3[1, 1, 1, 1] + (-2*t+2)*m3[2, 1, 1] + (-t+1)*m3[2, 2] + m3[3, 1]
1147
+ sage: kHLP._HLP_to_mk_on_basis([4,1])
1148
+ 0
1149
+ sage: kHLP._HLP_to_mk_on_basis([])
1150
+ m3[]
1151
+ sage: kHLP = Sym.kBoundedQuotient(3,t=1).kHallLittlewoodP()
1152
+ sage: kHLP._HLP_to_mk_on_basis([3,1])
1153
+ m3[3, 1]
1154
+ sage: kHLP._HLP_to_mk_on_basis([4,1])
1155
+ 0
1156
+ sage: kHLP._HLP_to_mk_on_basis([])
1157
+ m3[]
1158
+ """
1159
+ mk = self._kBoundedRing.km()
1160
+ if la not in self._kbounded_partitions:
1161
+ return mk.zero()
1162
+ if self.t == 1:
1163
+ return mk(la)
1164
+ else:
1165
+ HLP = self._kBoundedRing._quotient_basis
1166
+ return mk(HLP(la))
1167
+
1168
+ def retract(self, la):
1169
+ r"""
1170
+ Implement the retract function on the Hall-Littlewood P basis. Given a partition
1171
+ ``la``, the retract will return the corresponding `k`-bounded Hall-Littlewood P
1172
+ basis element if ``la`` is `k`-bounded; zero otherwise.
1173
+
1174
+ INPUT:
1175
+
1176
+ - ``la`` -- a partition
1177
+
1178
+ OUTPUT: a `k`-bounded Hall-Littlewood P symmetric function in the `k`-quotient of
1179
+ symmetric functions
1180
+
1181
+ EXAMPLES::
1182
+
1183
+ sage: kHLP = SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(3).kHallLittlewoodP()
1184
+ sage: kHLP.retract(Partition([3,1]))
1185
+ HLP3[3, 1]
1186
+ sage: kHLP.retract(Partition([4,1]))
1187
+ 0
1188
+ sage: kHLP.retract([])
1189
+ HLP3[]
1190
+ sage: m = kHLP.realization_of().ambient().m()
1191
+ sage: kHLP(m[2,2])
1192
+ (t^4-t^3-t+1)*HLP3[1, 1, 1, 1] + (t-1)*HLP3[2, 1, 1] + HLP3[2, 2]
1193
+ """
1194
+ if la == []:
1195
+ return self([])
1196
+ if la[0] > self.k:
1197
+ return self.zero()
1198
+ hlp = self._kBoundedRing.ambient().hall_littlewood(self.t).P()
1199
+ f = hlp(la)
1200
+ return sum(self(x)*f.coefficient(x) for x in f.support() if x in self._kbounded_partitions)
1201
+
1202
+ def lift(self, la):
1203
+ r"""
1204
+ Implement the lift function on the Hall-Littlewood P basis. Given a `k`-bounded
1205
+ partition ``la``, the lift will return the corresponding Hall-Littlewood P basis
1206
+ element.
1207
+
1208
+ INPUT:
1209
+
1210
+ - ``la`` -- a `k`-bounded partition
1211
+
1212
+ OUTPUT: a Hall-Littlewood symmetric function
1213
+
1214
+ EXAMPLES::
1215
+
1216
+ sage: kHLP = SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(3).kHallLittlewoodP()
1217
+ sage: kHLP.lift(Partition([3,1]))
1218
+ HLP[3, 1]
1219
+ sage: kHLP.lift([])
1220
+ HLP[]
1221
+ sage: kHLP.lift(Partition([4,1]))
1222
+ Traceback (most recent call last):
1223
+ ...
1224
+ TypeError: do not know how to make x (= [4, 1]) an element of self (=3-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the 3-bounded Hall-Littlewood P basis)
1225
+ """
1226
+ HLP = self._kBoundedRing.ambient().hall_littlewood(t=self.t).P()
1227
+ return HLP._from_dict(dict(self(la)))
1228
+
1229
+
1230
+ class DualkSchurFunctions(KBoundedQuotientBasis):
1231
+ r"""
1232
+ This basis is dual to the `k`-Schur functions. The expansion is given
1233
+ in Section 4.12 of [LLMSSZ]_. When `t=1` this basis is equal to the
1234
+ :class:`AffineSchurFunctions` and that basis is more efficient in this case.
1235
+
1236
+ REFERENCES:
1237
+
1238
+ .. [LLMSSZ] \T. Lam, L. Lapointe, J. Morse, A. Schilling, M. Shimozono, M. Zabrocki,
1239
+ k-Schur functions and affine Schubert calculus.
1240
+ """
1241
+
1242
+ def __init__(self, kBoundedRing):
1243
+ r"""
1244
+ Initialize the ring which is the dual `k`-Schur function basis.
1245
+
1246
+ INPUT:
1247
+
1248
+ - ``kBoundedRing`` -- an element which is of class :class:`KBoundedQuotient`
1249
+
1250
+ EXAMPLES::
1251
+
1252
+ sage: from sage.combinat.sf.k_dual import DualkSchurFunctions
1253
+ sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
1254
+ sage: dks4 = DualkSchurFunctions(Sym.kBoundedQuotient(4))
1255
+ sage: dks4
1256
+ 4-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the dual 4-Schur basis
1257
+ sage: TestSuite(dks4).run() # long time (7s on sage.math, 2013)
1258
+ sage: dks4 = DualkSchurFunctions(Sym.kBoundedQuotient(4,t=1))
1259
+ sage: TestSuite(dks4).run() # long time (7s on sage.math, 2013)
1260
+ """
1261
+ KBoundedQuotientBasis.__init__(self, kBoundedRing, 'dks')
1262
+
1263
+ kHLP = kBoundedRing.kHallLittlewoodP()
1264
+ self.module_morphism(self._dks_to_khlp_on_basis,codomain=kHLP).register_as_coercion() # morphism from dual-k-Schurs to k-bounded-HLP
1265
+ kHLP.module_morphism(self._khlp_to_dks_on_basis,codomain=self).register_as_coercion() # morphism from k-bounded-HLP to dual-k-Schurs
1266
+
1267
+ def _repr_(self):
1268
+ """
1269
+ TESTS::
1270
+
1271
+ sage: Sym = SymmetricFunctions(QQ['t'].fraction_field())
1272
+ sage: dks3 = Sym.kBoundedQuotient(3).dual_k_Schur()
1273
+ sage: dks3._repr_()
1274
+ '3-Bounded Quotient of Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the dual 3-Schur basis'
1275
+ """
1276
+ return self.realization_of()._repr_() + ' in the dual %s-Schur basis' % (self.k)
1277
+
1278
+ def _dks_to_khlp_on_basis(self, la):
1279
+ r"""
1280
+ Give the expansion of the dual `k`-Schur basis element indexed by ``la`` into
1281
+ the Hall-Littlewood P basis.
1282
+
1283
+ INPUT:
1284
+
1285
+ - ``la`` -- a `k`-bounded partition
1286
+
1287
+ OUTPUT: a symmetric function in the Hall-Littlewood P basis
1288
+
1289
+ EXAMPLES::
1290
+
1291
+ sage: # needs lrcalc_python
1292
+ sage: dks3 = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).dual_k_Schur()
1293
+ sage: dks3._dks_to_khlp_on_basis(Partition([2,1]))
1294
+ 2*HLP3[1, 1, 1] + HLP3[2, 1]
1295
+ sage: dks3._dks_to_khlp_on_basis(Partition([]))
1296
+ HLP3[]
1297
+ sage: dks3._dks_to_khlp_on_basis(Partition([4,1]))
1298
+ Traceback (most recent call last):
1299
+ ...
1300
+ AssertionError: [4, 1] should be an element of 3-Bounded Partitions
1301
+ """
1302
+ Sym = self._kBoundedRing.ambient()
1303
+ kB = Sym.kBoundedSubspace(self.k, t=self.t)
1304
+ Qp = Sym.hall_littlewood(t=self.t).Qp()
1305
+ ks = kB.kschur()
1306
+ kHLP = self._kBoundedRing.kHallLittlewoodP()
1307
+ return sum( ks(Qp(x)).coefficient(la) * kHLP(x) for x in PartitionsGreatestLE(sum(la), self.k))
1308
+
1309
+ def _khlp_to_dks_on_basis(self, la):
1310
+ r"""
1311
+ Give the expansion of the `k`-bounded Hall-Littlewood P basis element indexed by
1312
+ ``la`` into the dual `k`-Schur basis.
1313
+
1314
+ INPUT:
1315
+
1316
+ - ``la`` -- a `k`-bounded partition
1317
+
1318
+ OUTPUT: a `k`-bounded quotient symmetric function in the dual `k`-Schur basis
1319
+
1320
+ EXAMPLES::
1321
+
1322
+ sage: # needs lrcalc_python
1323
+ sage: dks3 = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).dual_k_Schur()
1324
+ sage: dks3._khlp_to_dks_on_basis(Partition([2,1]))
1325
+ -2*dks3[1, 1, 1] + dks3[2, 1]
1326
+ sage: dks3._khlp_to_dks_on_basis([2,1])
1327
+ -2*dks3[1, 1, 1] + dks3[2, 1]
1328
+ sage: dks3._khlp_to_dks_on_basis(Partition([]))
1329
+ dks3[]
1330
+ sage: dks3._khlp_to_dks_on_basis(Partition([4,1]))
1331
+ 0
1332
+
1333
+ ::
1334
+
1335
+ sage: # needs lrcalc_python
1336
+ sage: dks3 = SymmetricFunctions(QQ['t'].fraction_field()).kBoundedQuotient(3).dual_k_Schur()
1337
+ sage: dks3._khlp_to_dks_on_basis(Partition([2,1]))
1338
+ (-t^2-t)*dks3[1, 1, 1] + dks3[2, 1]
1339
+ sage: dks3._khlp_to_dks_on_basis(Partition([2,2]))
1340
+ (t^3-t^2)*dks3[1, 1, 1, 1] - t*dks3[2, 1, 1] + dks3[2, 2]
1341
+ sage: dks3._khlp_to_dks_on_basis(Partition([]))
1342
+ dks3[]
1343
+ sage: dks3._khlp_to_dks_on_basis(Partition([4,1]))
1344
+ 0
1345
+ """
1346
+ Sym = self._kBoundedRing.ambient()
1347
+ kB = Sym.kBoundedSubspace(self.k, t=self.t)
1348
+ Qp = Sym.hall_littlewood(t=self.t).Qp()
1349
+ ks = kB.kschur()
1350
+ return sum( Qp(ks(x)).coefficient(la) * self(x) for x in PartitionsGreatestLE(sum(la), self.k))
1351
+
1352
+
1353
+ class AffineSchurFunctions(KBoundedQuotientBasis):
1354
+ r"""
1355
+ This basis is dual to the `k`-Schur functions at `t=1`. This realization
1356
+ follows the monomial expansion given by Lam [Lam2006]_.
1357
+
1358
+ REFERENCES:
1359
+
1360
+ .. [Lam2006] \T. Lam, Schubert polynomials for the affine Grassmannian, J. Amer.
1361
+ Math. Soc., 21 (2008), 259-281.
1362
+ """
1363
+
1364
+ def __init__(self, kBoundedRing):
1365
+ r"""
1366
+ Initialize the ring which is the `k`-Bounded affine Schur quotient basis.
1367
+
1368
+ INPUT:
1369
+
1370
+ - ``kBoundedRing`` -- an element which is of class :class:`KBoundedQuotient`
1371
+
1372
+ EXAMPLES::
1373
+
1374
+ sage: from sage.combinat.sf.k_dual import AffineSchurFunctions
1375
+ sage: F = AffineSchurFunctions(SymmetricFunctions(QQ['t']).kBoundedQuotient(4,t=1))
1376
+ sage: F
1377
+ 4-Bounded Quotient of Symmetric Functions over Univariate Polynomial Ring in t over Rational Field with t=1 in the 4-bounded affine Schur basis
1378
+ sage: TestSuite(F).run() # long time (5s on sage.math, 2013)
1379
+ """
1380
+ KBoundedQuotientBasis.__init__(self, kBoundedRing, 'F')
1381
+
1382
+ from sage.combinat.root_system.weyl_group import WeylGroup
1383
+ self._weyl = WeylGroup(['A', kBoundedRing.k, 1])
1384
+
1385
+ km = kBoundedRing.km()
1386
+ self.module_morphism(self._F_to_m_on_basis,codomain=km).register_as_coercion() # morphism from affine Schur functions to k-bounded-m
1387
+ km.module_morphism(self._m_to_F_on_basis,codomain=self).register_as_coercion() # morphism from k-bounded-m basis to affine-Schur basis
1388
+
1389
+ def _repr_(self):
1390
+ """
1391
+ TESTS::
1392
+
1393
+ sage: Sym = SymmetricFunctions(QQ)
1394
+ sage: F = Sym.kBoundedQuotient(3,t=1).affineSchur()
1395
+ sage: F._repr_()
1396
+ '3-Bounded Quotient of Symmetric Functions over Rational Field with t=1 in the 3-bounded affine Schur basis'
1397
+ """
1398
+ return self.realization_of()._repr_() + ' in the %s-bounded affine Schur basis' % (self.k)
1399
+
1400
+ def _F_to_m_on_basis(self, la):
1401
+ r"""
1402
+ Give the expansion of the affine Schur basis element indexed by ``la`` into
1403
+ the monomial basis.
1404
+
1405
+ INPUT:
1406
+
1407
+ - ``la`` -- a `k`-bounded partition
1408
+
1409
+ OUTPUT: a symmetric function in the monomial basis
1410
+
1411
+ EXAMPLES::
1412
+
1413
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
1414
+ sage: F._F_to_m_on_basis(Partition([2,1]))
1415
+ 2*m[1, 1, 1] + m[2, 1]
1416
+ sage: F._F_to_m_on_basis(Partition([]))
1417
+ m[]
1418
+ sage: km = F.realization_of().km()
1419
+ sage: km( F[2,2] )
1420
+ 2*m3[1, 1, 1, 1] + m3[2, 1, 1] + m3[2, 2]
1421
+ sage: F._F_to_m_on_basis(Partition([4,1]))
1422
+ Traceback (most recent call last):
1423
+ ...
1424
+ ValueError: the partition must be 3-bounded
1425
+ """
1426
+ return self._weyl.from_reduced_word(Partition(la).from_kbounded_to_reduced_word(self.k)).stanley_symmetric_function()
1427
+
1428
+ def _m_to_F_on_basis(self, la):
1429
+ r"""
1430
+ Give the expansion of the `k`-monomial basis element indexed by ``la`` into
1431
+ the affine Schur basis.
1432
+
1433
+ INPUT:
1434
+
1435
+ - ``la`` -- a `k`-bounded partition
1436
+
1437
+ OUTPUT: a `k`-bounded quotient symmetric function in the affine Schur basis
1438
+
1439
+ EXAMPLES::
1440
+
1441
+ sage: # needs lrcalc_python
1442
+ sage: F = SymmetricFunctions(QQ).kBoundedQuotient(3,t=1).affineSchur()
1443
+ sage: F._m_to_F_on_basis(Partition([2,1]))
1444
+ -2*F3[1, 1, 1] + F3[2, 1]
1445
+ sage: F._m_to_F_on_basis([2,1])
1446
+ -2*F3[1, 1, 1] + F3[2, 1]
1447
+ sage: F._m_to_F_on_basis(Partition([]))
1448
+ F3[]
1449
+ sage: F._m_to_F_on_basis(Partition([4,1]))
1450
+ Traceback (most recent call last):
1451
+ ...
1452
+ AssertionError: [4, 1] should be an element of 3-Bounded Partitions
1453
+ """
1454
+ Sym = self._kBoundedRing.ambient()
1455
+ kB = Sym.kBoundedSubspace(self.k, t=1)
1456
+ h = kB.khomogeneous()
1457
+ ks = kB.kschur()
1458
+ return sum( h(ks(x)).coefficient(la) * self(x) for x in PartitionsGreatestLE(sum(la), self.k))