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.
- passagemath_combinat/__init__.py +3 -0
- passagemath_combinat-10.6.42.dist-info/METADATA +160 -0
- passagemath_combinat-10.6.42.dist-info/RECORD +400 -0
- passagemath_combinat-10.6.42.dist-info/WHEEL +5 -0
- passagemath_combinat-10.6.42.dist-info/top_level.txt +3 -0
- passagemath_combinat.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
- passagemath_combinat.libs/libsymmetrica-81fe8739.so.3.0.0 +0 -0
- sage/algebras/affine_nil_temperley_lieb.py +263 -0
- sage/algebras/all.py +24 -0
- sage/algebras/all__sagemath_combinat.py +35 -0
- sage/algebras/askey_wilson.py +935 -0
- sage/algebras/associated_graded.py +345 -0
- sage/algebras/cellular_basis.py +350 -0
- sage/algebras/cluster_algebra.py +2766 -0
- sage/algebras/down_up_algebra.py +860 -0
- sage/algebras/free_algebra.py +1698 -0
- sage/algebras/free_algebra_element.py +345 -0
- sage/algebras/free_algebra_quotient.py +405 -0
- sage/algebras/free_algebra_quotient_element.py +295 -0
- sage/algebras/free_zinbiel_algebra.py +885 -0
- sage/algebras/hall_algebra.py +783 -0
- sage/algebras/hecke_algebras/all.py +4 -0
- sage/algebras/hecke_algebras/ariki_koike_algebra.py +1796 -0
- sage/algebras/hecke_algebras/ariki_koike_specht_modules.py +475 -0
- sage/algebras/hecke_algebras/cubic_hecke_algebra.py +3520 -0
- sage/algebras/hecke_algebras/cubic_hecke_base_ring.py +1473 -0
- sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py +1079 -0
- sage/algebras/iwahori_hecke_algebra.py +3095 -0
- sage/algebras/jordan_algebra.py +1773 -0
- sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py +113 -0
- sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py +156 -0
- sage/algebras/lie_conformal_algebras/all.py +18 -0
- sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py +134 -0
- sage/algebras/lie_conformal_algebras/examples.py +43 -0
- sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py +131 -0
- sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py +139 -0
- sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py +174 -0
- sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py +167 -0
- sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py +107 -0
- sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py +135 -0
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py +353 -0
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py +236 -0
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py +78 -0
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +328 -0
- sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py +117 -0
- sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py +86 -0
- sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py +82 -0
- sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py +205 -0
- sage/algebras/nil_coxeter_algebra.py +191 -0
- sage/algebras/q_commuting_polynomials.py +673 -0
- sage/algebras/q_system.py +608 -0
- sage/algebras/quantum_clifford.py +959 -0
- sage/algebras/quantum_groups/ace_quantum_onsager.py +693 -0
- sage/algebras/quantum_groups/all.py +9 -0
- sage/algebras/quantum_groups/fock_space.py +2219 -0
- sage/algebras/quantum_groups/q_numbers.py +207 -0
- sage/algebras/quantum_groups/quantum_group_gap.py +2695 -0
- sage/algebras/quantum_groups/representations.py +591 -0
- sage/algebras/quantum_matrix_coordinate_algebra.py +1006 -0
- sage/algebras/quantum_oscillator.py +623 -0
- sage/algebras/quaternion_algebra.py +20 -0
- sage/algebras/quaternion_algebra_element.py +55 -0
- sage/algebras/rational_cherednik_algebra.py +525 -0
- sage/algebras/schur_algebra.py +670 -0
- sage/algebras/shuffle_algebra.py +1011 -0
- sage/algebras/splitting_algebra.py +779 -0
- sage/algebras/tensor_algebra.py +709 -0
- sage/algebras/yangian.py +1082 -0
- sage/algebras/yokonuma_hecke_algebra.py +1018 -0
- sage/all__sagemath_combinat.py +35 -0
- sage/combinat/SJT.py +255 -0
- sage/combinat/affine_permutation.py +2405 -0
- sage/combinat/algebraic_combinatorics.py +55 -0
- sage/combinat/all.py +53 -0
- sage/combinat/all__sagemath_combinat.py +195 -0
- sage/combinat/alternating_sign_matrix.py +2063 -0
- sage/combinat/baxter_permutations.py +346 -0
- sage/combinat/bijectionist.py +3220 -0
- sage/combinat/binary_recurrence_sequences.py +1180 -0
- sage/combinat/blob_algebra.py +685 -0
- sage/combinat/catalog_partitions.py +27 -0
- sage/combinat/chas/all.py +23 -0
- sage/combinat/chas/fsym.py +1180 -0
- sage/combinat/chas/wqsym.py +2601 -0
- sage/combinat/cluster_complex.py +326 -0
- sage/combinat/colored_permutations.py +2039 -0
- sage/combinat/colored_permutations_representations.py +964 -0
- sage/combinat/composition_signed.py +142 -0
- sage/combinat/composition_tableau.py +855 -0
- sage/combinat/constellation.py +1729 -0
- sage/combinat/core.py +751 -0
- sage/combinat/counting.py +12 -0
- sage/combinat/crystals/affine.py +742 -0
- sage/combinat/crystals/affine_factorization.py +518 -0
- sage/combinat/crystals/affinization.py +331 -0
- sage/combinat/crystals/alcove_path.py +2013 -0
- sage/combinat/crystals/all.py +22 -0
- sage/combinat/crystals/bkk_crystals.py +141 -0
- sage/combinat/crystals/catalog.py +115 -0
- sage/combinat/crystals/catalog_elementary_crystals.py +18 -0
- sage/combinat/crystals/catalog_infinity_crystals.py +33 -0
- sage/combinat/crystals/catalog_kirillov_reshetikhin.py +18 -0
- sage/combinat/crystals/crystals.py +257 -0
- sage/combinat/crystals/direct_sum.py +260 -0
- sage/combinat/crystals/elementary_crystals.py +1251 -0
- sage/combinat/crystals/fast_crystals.py +441 -0
- sage/combinat/crystals/fully_commutative_stable_grothendieck.py +1205 -0
- sage/combinat/crystals/generalized_young_walls.py +1076 -0
- sage/combinat/crystals/highest_weight_crystals.py +436 -0
- sage/combinat/crystals/induced_structure.py +695 -0
- sage/combinat/crystals/infinity_crystals.py +730 -0
- sage/combinat/crystals/kac_modules.py +863 -0
- sage/combinat/crystals/kirillov_reshetikhin.py +4196 -0
- sage/combinat/crystals/kyoto_path_model.py +497 -0
- sage/combinat/crystals/letters.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/crystals/letters.pxd +79 -0
- sage/combinat/crystals/letters.pyx +3056 -0
- sage/combinat/crystals/littelmann_path.py +1518 -0
- sage/combinat/crystals/monomial_crystals.py +1262 -0
- sage/combinat/crystals/multisegments.py +462 -0
- sage/combinat/crystals/mv_polytopes.py +467 -0
- sage/combinat/crystals/pbw_crystal.py +511 -0
- sage/combinat/crystals/pbw_datum.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/crystals/pbw_datum.pxd +4 -0
- sage/combinat/crystals/pbw_datum.pyx +487 -0
- sage/combinat/crystals/polyhedral_realization.py +372 -0
- sage/combinat/crystals/spins.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/crystals/spins.pxd +21 -0
- sage/combinat/crystals/spins.pyx +756 -0
- sage/combinat/crystals/star_crystal.py +290 -0
- sage/combinat/crystals/subcrystal.py +464 -0
- sage/combinat/crystals/tensor_product.py +1177 -0
- sage/combinat/crystals/tensor_product_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/crystals/tensor_product_element.pxd +35 -0
- sage/combinat/crystals/tensor_product_element.pyx +1870 -0
- sage/combinat/crystals/virtual_crystal.py +420 -0
- sage/combinat/cyclic_sieving_phenomenon.py +204 -0
- sage/combinat/debruijn_sequence.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/debruijn_sequence.pyx +355 -0
- sage/combinat/decorated_permutation.py +270 -0
- sage/combinat/degree_sequences.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/degree_sequences.pyx +588 -0
- sage/combinat/derangements.py +527 -0
- sage/combinat/descent_algebra.py +1008 -0
- sage/combinat/diagram.py +1551 -0
- sage/combinat/diagram_algebras.py +5886 -0
- sage/combinat/dyck_word.py +4349 -0
- sage/combinat/e_one_star.py +1623 -0
- sage/combinat/enumerated_sets.py +123 -0
- sage/combinat/expnums.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/expnums.pyx +148 -0
- sage/combinat/fast_vector_partitions.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/fast_vector_partitions.pyx +346 -0
- sage/combinat/fqsym.py +1977 -0
- sage/combinat/free_dendriform_algebra.py +954 -0
- sage/combinat/free_prelie_algebra.py +1141 -0
- sage/combinat/fully_commutative_elements.py +1077 -0
- sage/combinat/fully_packed_loop.py +1523 -0
- sage/combinat/gelfand_tsetlin_patterns.py +1409 -0
- sage/combinat/gray_codes.py +311 -0
- sage/combinat/grossman_larson_algebras.py +667 -0
- sage/combinat/growth.py +4352 -0
- sage/combinat/hall_polynomial.py +188 -0
- sage/combinat/hillman_grassl.py +866 -0
- sage/combinat/integer_matrices.py +329 -0
- sage/combinat/integer_vectors_mod_permgroup.py +1238 -0
- sage/combinat/k_tableau.py +4564 -0
- sage/combinat/kazhdan_lusztig.py +215 -0
- sage/combinat/key_polynomial.py +885 -0
- sage/combinat/knutson_tao_puzzles.py +2286 -0
- sage/combinat/lr_tableau.py +311 -0
- sage/combinat/matrices/all.py +24 -0
- sage/combinat/matrices/hadamard_matrix.py +3790 -0
- sage/combinat/matrices/latin.py +2912 -0
- sage/combinat/misc.py +401 -0
- sage/combinat/multiset_partition_into_sets_ordered.py +3541 -0
- sage/combinat/ncsf_qsym/all.py +21 -0
- sage/combinat/ncsf_qsym/combinatorics.py +317 -0
- sage/combinat/ncsf_qsym/generic_basis_code.py +1427 -0
- sage/combinat/ncsf_qsym/ncsf.py +5637 -0
- sage/combinat/ncsf_qsym/qsym.py +4053 -0
- sage/combinat/ncsf_qsym/tutorial.py +447 -0
- sage/combinat/ncsym/all.py +21 -0
- sage/combinat/ncsym/bases.py +855 -0
- sage/combinat/ncsym/dual.py +593 -0
- sage/combinat/ncsym/ncsym.py +2076 -0
- sage/combinat/necklace.py +551 -0
- sage/combinat/non_decreasing_parking_function.py +634 -0
- sage/combinat/nu_dyck_word.py +1474 -0
- sage/combinat/output.py +861 -0
- sage/combinat/parallelogram_polyomino.py +4326 -0
- sage/combinat/parking_functions.py +1602 -0
- sage/combinat/partition_algebra.py +1998 -0
- sage/combinat/partition_kleshchev.py +1982 -0
- sage/combinat/partition_shifting_algebras.py +584 -0
- sage/combinat/partition_tuple.py +3114 -0
- sage/combinat/path_tableaux/all.py +13 -0
- sage/combinat/path_tableaux/catalog.py +29 -0
- sage/combinat/path_tableaux/dyck_path.py +380 -0
- sage/combinat/path_tableaux/frieze.py +476 -0
- sage/combinat/path_tableaux/path_tableau.py +728 -0
- sage/combinat/path_tableaux/semistandard.py +510 -0
- sage/combinat/perfect_matching.py +779 -0
- sage/combinat/plane_partition.py +3300 -0
- sage/combinat/q_bernoulli.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/q_bernoulli.pyx +128 -0
- sage/combinat/quickref.py +81 -0
- sage/combinat/recognizable_series.py +2051 -0
- sage/combinat/regular_sequence.py +4316 -0
- sage/combinat/regular_sequence_bounded.py +543 -0
- sage/combinat/restricted_growth.py +81 -0
- sage/combinat/ribbon.py +20 -0
- sage/combinat/ribbon_shaped_tableau.py +489 -0
- sage/combinat/ribbon_tableau.py +1180 -0
- sage/combinat/rigged_configurations/all.py +46 -0
- sage/combinat/rigged_configurations/bij_abstract_class.py +548 -0
- sage/combinat/rigged_configurations/bij_infinity.py +370 -0
- sage/combinat/rigged_configurations/bij_type_A.py +163 -0
- sage/combinat/rigged_configurations/bij_type_A2_dual.py +338 -0
- sage/combinat/rigged_configurations/bij_type_A2_even.py +218 -0
- sage/combinat/rigged_configurations/bij_type_A2_odd.py +199 -0
- sage/combinat/rigged_configurations/bij_type_B.py +900 -0
- sage/combinat/rigged_configurations/bij_type_C.py +267 -0
- sage/combinat/rigged_configurations/bij_type_D.py +771 -0
- sage/combinat/rigged_configurations/bij_type_D_tri.py +392 -0
- sage/combinat/rigged_configurations/bij_type_D_twisted.py +576 -0
- sage/combinat/rigged_configurations/bij_type_E67.py +402 -0
- sage/combinat/rigged_configurations/bijection.py +143 -0
- sage/combinat/rigged_configurations/kleber_tree.py +1475 -0
- sage/combinat/rigged_configurations/kr_tableaux.py +1898 -0
- sage/combinat/rigged_configurations/rc_crystal.py +461 -0
- sage/combinat/rigged_configurations/rc_infinity.py +540 -0
- sage/combinat/rigged_configurations/rigged_configuration_element.py +2403 -0
- sage/combinat/rigged_configurations/rigged_configurations.py +1918 -0
- sage/combinat/rigged_configurations/rigged_partition.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/rigged_configurations/rigged_partition.pxd +15 -0
- sage/combinat/rigged_configurations/rigged_partition.pyx +680 -0
- sage/combinat/rigged_configurations/tensor_product_kr_tableaux.py +499 -0
- sage/combinat/rigged_configurations/tensor_product_kr_tableaux_element.py +428 -0
- sage/combinat/rsk.py +3438 -0
- sage/combinat/schubert_polynomial.py +508 -0
- sage/combinat/set_partition.py +3318 -0
- sage/combinat/set_partition_iterator.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/set_partition_iterator.pyx +136 -0
- sage/combinat/set_partition_ordered.py +1590 -0
- sage/combinat/sf/abreu_nigro.py +346 -0
- sage/combinat/sf/all.py +52 -0
- sage/combinat/sf/character.py +576 -0
- sage/combinat/sf/classical.py +319 -0
- sage/combinat/sf/dual.py +996 -0
- sage/combinat/sf/elementary.py +549 -0
- sage/combinat/sf/hall_littlewood.py +1028 -0
- sage/combinat/sf/hecke.py +336 -0
- sage/combinat/sf/homogeneous.py +464 -0
- sage/combinat/sf/jack.py +1428 -0
- sage/combinat/sf/k_dual.py +1458 -0
- sage/combinat/sf/kfpoly.py +447 -0
- sage/combinat/sf/llt.py +789 -0
- sage/combinat/sf/macdonald.py +2019 -0
- sage/combinat/sf/monomial.py +525 -0
- sage/combinat/sf/multiplicative.py +113 -0
- sage/combinat/sf/new_kschur.py +1786 -0
- sage/combinat/sf/ns_macdonald.py +964 -0
- sage/combinat/sf/orthogonal.py +246 -0
- sage/combinat/sf/orthotriang.py +355 -0
- sage/combinat/sf/powersum.py +963 -0
- sage/combinat/sf/schur.py +880 -0
- sage/combinat/sf/sf.py +1653 -0
- sage/combinat/sf/sfa.py +7053 -0
- sage/combinat/sf/symplectic.py +253 -0
- sage/combinat/sf/witt.py +721 -0
- sage/combinat/shifted_primed_tableau.py +2735 -0
- sage/combinat/shuffle.py +830 -0
- sage/combinat/sidon_sets.py +146 -0
- sage/combinat/similarity_class_type.py +1721 -0
- sage/combinat/sine_gordon.py +618 -0
- sage/combinat/six_vertex_model.py +784 -0
- sage/combinat/skew_partition.py +2053 -0
- sage/combinat/skew_tableau.py +2989 -0
- sage/combinat/sloane_functions.py +8935 -0
- sage/combinat/specht_module.py +1403 -0
- sage/combinat/species/all.py +48 -0
- sage/combinat/species/characteristic_species.py +321 -0
- sage/combinat/species/composition_species.py +273 -0
- sage/combinat/species/cycle_species.py +284 -0
- sage/combinat/species/empty_species.py +155 -0
- sage/combinat/species/functorial_composition_species.py +148 -0
- sage/combinat/species/generating_series.py +673 -0
- sage/combinat/species/library.py +148 -0
- sage/combinat/species/linear_order_species.py +169 -0
- sage/combinat/species/misc.py +83 -0
- sage/combinat/species/partition_species.py +290 -0
- sage/combinat/species/permutation_species.py +268 -0
- sage/combinat/species/product_species.py +423 -0
- sage/combinat/species/recursive_species.py +476 -0
- sage/combinat/species/set_species.py +192 -0
- sage/combinat/species/species.py +820 -0
- sage/combinat/species/structure.py +539 -0
- sage/combinat/species/subset_species.py +243 -0
- sage/combinat/species/sum_species.py +225 -0
- sage/combinat/subword.py +564 -0
- sage/combinat/subword_complex.py +2122 -0
- sage/combinat/subword_complex_c.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/subword_complex_c.pyx +119 -0
- sage/combinat/super_tableau.py +821 -0
- sage/combinat/superpartition.py +1154 -0
- sage/combinat/symmetric_group_algebra.py +3774 -0
- sage/combinat/symmetric_group_representations.py +1830 -0
- sage/combinat/t_sequences.py +877 -0
- sage/combinat/tableau.py +9506 -0
- sage/combinat/tableau_residues.py +860 -0
- sage/combinat/tableau_tuple.py +5353 -0
- sage/combinat/tiling.py +2432 -0
- sage/combinat/triangles_FHM.py +777 -0
- sage/combinat/tutorial.py +1857 -0
- sage/combinat/vector_partition.py +337 -0
- sage/combinat/words/abstract_word.py +1722 -0
- sage/combinat/words/all.py +59 -0
- sage/combinat/words/alphabet.py +268 -0
- sage/combinat/words/finite_word.py +7201 -0
- sage/combinat/words/infinite_word.py +113 -0
- sage/combinat/words/lyndon_word.py +652 -0
- sage/combinat/words/morphic.py +351 -0
- sage/combinat/words/morphism.py +3878 -0
- sage/combinat/words/paths.py +2932 -0
- sage/combinat/words/shuffle_product.py +278 -0
- sage/combinat/words/suffix_trees.py +1873 -0
- sage/combinat/words/word.py +769 -0
- sage/combinat/words/word_char.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/words/word_char.pyx +847 -0
- sage/combinat/words/word_datatypes.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/words/word_datatypes.pxd +4 -0
- sage/combinat/words/word_datatypes.pyx +1067 -0
- sage/combinat/words/word_generators.py +2026 -0
- sage/combinat/words/word_infinite_datatypes.py +1218 -0
- sage/combinat/words/word_options.py +99 -0
- sage/combinat/words/words.py +2396 -0
- sage/data_structures/all__sagemath_combinat.py +1 -0
- sage/databases/all__sagemath_combinat.py +13 -0
- sage/databases/findstat.py +4897 -0
- sage/databases/oeis.py +2058 -0
- sage/databases/sloane.py +393 -0
- sage/dynamics/all__sagemath_combinat.py +14 -0
- sage/dynamics/cellular_automata/all.py +7 -0
- sage/dynamics/cellular_automata/catalog.py +34 -0
- sage/dynamics/cellular_automata/elementary.py +612 -0
- sage/dynamics/cellular_automata/glca.py +477 -0
- sage/dynamics/cellular_automata/solitons.py +1463 -0
- sage/dynamics/finite_dynamical_system.py +1249 -0
- sage/dynamics/finite_dynamical_system_catalog.py +382 -0
- sage/games/all.py +7 -0
- sage/games/hexad.py +704 -0
- sage/games/quantumino.py +591 -0
- sage/games/sudoku.py +889 -0
- sage/games/sudoku_backtrack.cpython-314-x86_64-linux-musl.so +0 -0
- sage/games/sudoku_backtrack.pyx +189 -0
- sage/groups/all__sagemath_combinat.py +1 -0
- sage/groups/indexed_free_group.py +489 -0
- sage/libs/all__sagemath_combinat.py +6 -0
- sage/libs/lrcalc/__init__.py +1 -0
- sage/libs/lrcalc/lrcalc.py +525 -0
- sage/libs/symmetrica/__init__.py +7 -0
- sage/libs/symmetrica/all.py +101 -0
- sage/libs/symmetrica/kostka.pxi +168 -0
- sage/libs/symmetrica/part.pxi +193 -0
- sage/libs/symmetrica/plet.pxi +42 -0
- sage/libs/symmetrica/sab.pxi +196 -0
- sage/libs/symmetrica/sb.pxi +332 -0
- sage/libs/symmetrica/sc.pxi +192 -0
- sage/libs/symmetrica/schur.pxi +956 -0
- sage/libs/symmetrica/symmetrica.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/symmetrica/symmetrica.pxi +1172 -0
- sage/libs/symmetrica/symmetrica.pyx +39 -0
- sage/monoids/all.py +13 -0
- sage/monoids/automatic_semigroup.py +1054 -0
- sage/monoids/free_abelian_monoid.py +315 -0
- sage/monoids/free_abelian_monoid_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/monoids/free_abelian_monoid_element.pxd +16 -0
- sage/monoids/free_abelian_monoid_element.pyx +397 -0
- sage/monoids/free_monoid.py +335 -0
- sage/monoids/free_monoid_element.py +431 -0
- sage/monoids/hecke_monoid.py +65 -0
- sage/monoids/string_monoid.py +817 -0
- sage/monoids/string_monoid_element.py +547 -0
- sage/monoids/string_ops.py +143 -0
- sage/monoids/trace_monoid.py +972 -0
- sage/rings/all__sagemath_combinat.py +2 -0
- sage/sat/all.py +4 -0
- sage/sat/boolean_polynomials.py +405 -0
- sage/sat/converters/__init__.py +6 -0
- sage/sat/converters/anf2cnf.py +14 -0
- sage/sat/converters/polybori.py +611 -0
- sage/sat/solvers/__init__.py +5 -0
- sage/sat/solvers/cryptominisat.py +287 -0
- sage/sat/solvers/dimacs.py +783 -0
- sage/sat/solvers/picosat.py +228 -0
- sage/sat/solvers/sat_lp.py +156 -0
- sage/sat/solvers/satsolver.cpython-314-x86_64-linux-musl.so +0 -0
- sage/sat/solvers/satsolver.pxd +3 -0
- sage/sat/solvers/satsolver.pyx +405 -0
|
@@ -0,0 +1,1786 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-combinat
|
|
2
|
+
# sage.doctest: needs sage.combinat sage.modules
|
|
3
|
+
"""
|
|
4
|
+
`k`-Schur functions
|
|
5
|
+
"""
|
|
6
|
+
# ****************************************************************************
|
|
7
|
+
# Copyright (C) 2011 Jason Bandlow <jbandlow@gmail.com>,
|
|
8
|
+
# 2012 Anne Schilling <anne@math.ucdavis.edu>
|
|
9
|
+
#
|
|
10
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
11
|
+
#
|
|
12
|
+
# This code is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
15
|
+
# General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# The full text of the GPL is available at:
|
|
18
|
+
#
|
|
19
|
+
# https://www.gnu.org/licenses/
|
|
20
|
+
# ****************************************************************************
|
|
21
|
+
from sage.arith.srange import srange
|
|
22
|
+
from sage.categories.graded_coalgebras import GradedCoalgebras
|
|
23
|
+
from sage.categories.graded_coalgebras_with_basis import GradedCoalgebrasWithBasis
|
|
24
|
+
from sage.categories.graded_hopf_algebras import GradedHopfAlgebras
|
|
25
|
+
from sage.categories.graded_hopf_algebras_with_basis import GradedHopfAlgebrasWithBasis
|
|
26
|
+
from sage.categories.homset import Hom
|
|
27
|
+
from sage.categories.morphism import SetMorphism
|
|
28
|
+
from sage.categories.realizations import Category_realization_of_parent, Realizations
|
|
29
|
+
from sage.categories.sets_with_partial_maps import SetsWithPartialMaps
|
|
30
|
+
from sage.categories.tensor import tensor
|
|
31
|
+
from sage.combinat.free_module import CombinatorialFreeModule
|
|
32
|
+
from sage.combinat.partition import Partition, Partitions, Partitions_all_bounded
|
|
33
|
+
from sage.combinat.sf.sf import SymmetricFunctions
|
|
34
|
+
from sage.cpython.getattr import raw_getattr
|
|
35
|
+
from sage.matrix.constructor import matrix
|
|
36
|
+
from sage.misc.cachefunc import cached_method
|
|
37
|
+
from sage.misc.constant_function import ConstantFunction
|
|
38
|
+
from sage.misc.misc_c import prod
|
|
39
|
+
from sage.rings.integer import Integer
|
|
40
|
+
from sage.rings.integer_ring import ZZ
|
|
41
|
+
from sage.structure.parent import Parent
|
|
42
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class KBoundedSubspace(UniqueRepresentation, Parent):
|
|
46
|
+
r"""
|
|
47
|
+
This class implements the subspace of the ring of symmetric functions spanned by
|
|
48
|
+
`\{ s_{\lambda}[X/(1-t)] \}_{\lambda_1\le k} = \{ s_{\lambda}^{(k)}[X;t]\}_{\lambda_1 \le k}`
|
|
49
|
+
over the base ring `\QQ[t]`. When `t=1`, this space is in fact a subring of
|
|
50
|
+
the ring of symmetric functions generated by the complete homogeneous symmetric functions
|
|
51
|
+
`h_i` for `1\le i \le k`.
|
|
52
|
+
|
|
53
|
+
EXAMPLES::
|
|
54
|
+
|
|
55
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
56
|
+
sage: KB = Sym.kBoundedSubspace(3,1); KB
|
|
57
|
+
3-bounded Symmetric Functions over Rational Field with t=1
|
|
58
|
+
|
|
59
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
60
|
+
sage: KB = Sym.kBoundedSubspace(3); KB
|
|
61
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
|
|
62
|
+
|
|
63
|
+
The `k`-Schur function basis can be constructed as follows::
|
|
64
|
+
|
|
65
|
+
sage: ks = KB.kschur(); ks
|
|
66
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 3-Schur basis
|
|
67
|
+
"""
|
|
68
|
+
|
|
69
|
+
def __init__(self, Sym, k, t='t'):
|
|
70
|
+
r"""
|
|
71
|
+
The class modeling the abstract vector space of `k`-Schur
|
|
72
|
+
functions.
|
|
73
|
+
|
|
74
|
+
If `t=1` this is actually an abstract ring. Another
|
|
75
|
+
way to describe this space is as the subspace of a ring of
|
|
76
|
+
symmetric functions generated by the complete homogeneous
|
|
77
|
+
symmetric functions `h_i` for `1\le i \le k`.
|
|
78
|
+
|
|
79
|
+
TESTS::
|
|
80
|
+
|
|
81
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
82
|
+
sage: from sage.combinat.sf.new_kschur import KBoundedSubspace
|
|
83
|
+
sage: L3 = KBoundedSubspace(Sym,3,1)
|
|
84
|
+
sage: TestSuite(L3).run(skip=["_test_not_implemented_methods"])
|
|
85
|
+
sage: Sym.kBoundedSubspace(0,1)
|
|
86
|
+
Traceback (most recent call last):
|
|
87
|
+
...
|
|
88
|
+
ValueError: k must be a positive integer
|
|
89
|
+
|
|
90
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
91
|
+
sage: TestSuite(Sym.kBoundedSubspace(1)).run(skip=["_test_not_implemented_methods"])
|
|
92
|
+
"""
|
|
93
|
+
if not isinstance(k, (int, Integer)) or (k < 1):
|
|
94
|
+
raise ValueError("k must be a positive integer")
|
|
95
|
+
|
|
96
|
+
if not isinstance(Sym, SymmetricFunctions):
|
|
97
|
+
raise ValueError("Sym must be an algebra of symmetric functions")
|
|
98
|
+
|
|
99
|
+
self.indices = ConstantFunction(Partitions_all_bounded(k))
|
|
100
|
+
|
|
101
|
+
R = Sym.base_ring()
|
|
102
|
+
|
|
103
|
+
# The following line is a work around for the fact that Parent defines
|
|
104
|
+
# self.base_ring as NotImplemented, hence it cannot be defined by the
|
|
105
|
+
# category framework.
|
|
106
|
+
self.base_ring = ConstantFunction(R)
|
|
107
|
+
|
|
108
|
+
self.ambient = ConstantFunction(Sym)
|
|
109
|
+
|
|
110
|
+
self.k = k
|
|
111
|
+
self.t = R(t)
|
|
112
|
+
|
|
113
|
+
category = GradedHopfAlgebras(R) if t == 1 else GradedCoalgebras(R)
|
|
114
|
+
Parent.__init__(self, category=category.Subobjects().WithRealizations())
|
|
115
|
+
|
|
116
|
+
ks = self.kschur()
|
|
117
|
+
# Coercions
|
|
118
|
+
if t == 1:
|
|
119
|
+
s = ks.ambient()
|
|
120
|
+
kh = self.khomogeneous()
|
|
121
|
+
h = kh.ambient()
|
|
122
|
+
h_to_s = s._internal_coerce_map_from(h)
|
|
123
|
+
kh_to_ks = ks.retract * h_to_s * kh.lift
|
|
124
|
+
ks.register_coercion(kh_to_ks)
|
|
125
|
+
s_to_h = h._internal_coerce_map_from(s)
|
|
126
|
+
ks_to_kh = kh.retract * s_to_h * ks.lift
|
|
127
|
+
kh.register_coercion(ks_to_kh)
|
|
128
|
+
# temporary workaround until handled by trac 125959
|
|
129
|
+
self.one = ConstantFunction(ks.one())
|
|
130
|
+
self.zero = ConstantFunction(ks.zero())
|
|
131
|
+
|
|
132
|
+
def retract(self, sym):
|
|
133
|
+
r"""
|
|
134
|
+
Return the retract of ``sym`` from the ring of symmetric functions to ``self``.
|
|
135
|
+
|
|
136
|
+
INPUT:
|
|
137
|
+
|
|
138
|
+
- ``sym`` -- a symmetric function
|
|
139
|
+
|
|
140
|
+
OUTPUT:
|
|
141
|
+
|
|
142
|
+
- the analogue of the symmetric function in the `k`-bounded
|
|
143
|
+
subspace (if possible)
|
|
144
|
+
|
|
145
|
+
EXAMPLES::
|
|
146
|
+
|
|
147
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
148
|
+
sage: s = Sym.schur()
|
|
149
|
+
sage: KB = Sym.kBoundedSubspace(3,1); KB
|
|
150
|
+
3-bounded Symmetric Functions over Rational Field with t=1
|
|
151
|
+
sage: KB.retract(s[2]+s[3])
|
|
152
|
+
ks3[2] + ks3[3]
|
|
153
|
+
sage: KB.retract(s[2,1,1])
|
|
154
|
+
Traceback (most recent call last):
|
|
155
|
+
...
|
|
156
|
+
ValueError: s[2, 1, 1] is not in the image
|
|
157
|
+
"""
|
|
158
|
+
s = self.ambient().schur()
|
|
159
|
+
ks = self.kschur()
|
|
160
|
+
return ks.retract(s(sym))
|
|
161
|
+
|
|
162
|
+
def realizations(self):
|
|
163
|
+
r"""
|
|
164
|
+
A list of realizations of this algebra.
|
|
165
|
+
|
|
166
|
+
EXAMPLES::
|
|
167
|
+
|
|
168
|
+
sage: SymmetricFunctions(QQ).kBoundedSubspace(3,1).realizations()
|
|
169
|
+
[3-bounded Symmetric Functions over Rational Field with t=1 in the 3-Schur basis,
|
|
170
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the 3-split basis,
|
|
171
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the 3-bounded homogeneous basis,
|
|
172
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the K-3-Schur basis]
|
|
173
|
+
sage: SymmetricFunctions(QQ['t']).kBoundedSubspace(3).realizations()
|
|
174
|
+
[3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 3-Schur basis,
|
|
175
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 3-split basis]
|
|
176
|
+
"""
|
|
177
|
+
if self.t == 1:
|
|
178
|
+
return [self.kschur(), self.ksplit(), self.khomogeneous(),
|
|
179
|
+
self.K_kschur()]
|
|
180
|
+
else:
|
|
181
|
+
return [self.kschur(), self.ksplit()]
|
|
182
|
+
|
|
183
|
+
def kschur(self):
|
|
184
|
+
r"""
|
|
185
|
+
The `k`-Schur basis of this algebra.
|
|
186
|
+
|
|
187
|
+
.. SEEALSO:: :meth:`kSchur`
|
|
188
|
+
|
|
189
|
+
EXAMPLES::
|
|
190
|
+
|
|
191
|
+
sage: ks3 = SymmetricFunctions(QQ).kBoundedSubspace(3,1).kschur()
|
|
192
|
+
sage: TestSuite(ks3).run()
|
|
193
|
+
"""
|
|
194
|
+
return kSchur(self)
|
|
195
|
+
|
|
196
|
+
def ksplit(self):
|
|
197
|
+
r"""
|
|
198
|
+
The `k`-split basis of this algebra.
|
|
199
|
+
|
|
200
|
+
.. SEEALSO:: :meth:`kSplit`
|
|
201
|
+
|
|
202
|
+
EXAMPLES::
|
|
203
|
+
|
|
204
|
+
sage: ksp3 = SymmetricFunctions(QQ).kBoundedSubspace(3,1).ksplit()
|
|
205
|
+
sage: TestSuite(ksp3).run()
|
|
206
|
+
"""
|
|
207
|
+
return kSplit(self)
|
|
208
|
+
|
|
209
|
+
def khomogeneous(self):
|
|
210
|
+
r"""
|
|
211
|
+
The homogeneous basis of this algebra.
|
|
212
|
+
|
|
213
|
+
.. SEEALSO:: :meth:`kHomogeneous`
|
|
214
|
+
|
|
215
|
+
EXAMPLES::
|
|
216
|
+
|
|
217
|
+
sage: kh3 = SymmetricFunctions(QQ).kBoundedSubspace(3,1).khomogeneous()
|
|
218
|
+
sage: TestSuite(kh3).run()
|
|
219
|
+
"""
|
|
220
|
+
if self.t != 1:
|
|
221
|
+
raise ValueError("This basis only exists for t=1")
|
|
222
|
+
return kHomogeneous(self)
|
|
223
|
+
|
|
224
|
+
def K_kschur(self):
|
|
225
|
+
r"""
|
|
226
|
+
Return the `k`-bounded basis called the K-`k`-Schur basis.
|
|
227
|
+
|
|
228
|
+
See [Morse11]_ and [LamSchillingShimozono10]_.
|
|
229
|
+
|
|
230
|
+
REFERENCES:
|
|
231
|
+
|
|
232
|
+
.. [Morse11] \J. Morse, Combinatorics of the K-theory of affine Grassmannians,
|
|
233
|
+
Adv. in Math., Volume 229, Issue 5, pp. 2950--2984.
|
|
234
|
+
|
|
235
|
+
.. [LamSchillingShimozono10] \T. Lam, A. Schilling, M.Shimozono, K-theory Schubert calculus of the affine Grassmannian,
|
|
236
|
+
Compositio Math. 146 (2010), 811-852.
|
|
237
|
+
|
|
238
|
+
EXAMPLES::
|
|
239
|
+
|
|
240
|
+
sage: kB = SymmetricFunctions(QQ).kBoundedSubspace(3,1)
|
|
241
|
+
sage: g = kB.K_kschur()
|
|
242
|
+
sage: g
|
|
243
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the K-3-Schur basis
|
|
244
|
+
sage: kB = SymmetricFunctions(QQ['t']).kBoundedSubspace(3)
|
|
245
|
+
sage: g = kB.K_kschur()
|
|
246
|
+
Traceback (most recent call last):
|
|
247
|
+
...
|
|
248
|
+
ValueError: This basis only exists for t=1
|
|
249
|
+
"""
|
|
250
|
+
if self.t != 1:
|
|
251
|
+
raise ValueError("This basis only exists for t=1")
|
|
252
|
+
return K_kSchur(self)
|
|
253
|
+
|
|
254
|
+
def _repr_(self):
|
|
255
|
+
r"""
|
|
256
|
+
Representation of this algebra.
|
|
257
|
+
|
|
258
|
+
EXAMPLES::
|
|
259
|
+
|
|
260
|
+
sage: SymmetricFunctions(QQ).kBoundedSubspace(3,1) # indirect doctest
|
|
261
|
+
3-bounded Symmetric Functions over Rational Field with t=1
|
|
262
|
+
|
|
263
|
+
sage: SymmetricFunctions(QQ['t']).kBoundedSubspace(3)
|
|
264
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
|
|
265
|
+
"""
|
|
266
|
+
ending = ""
|
|
267
|
+
if str(self.t) != 't':
|
|
268
|
+
ending = ' with t=%s' % (self.t)
|
|
269
|
+
return "%s-bounded %s" % (self.k, self.ambient()) + ending
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
class KBoundedSubspaceBases(Category_realization_of_parent):
|
|
273
|
+
r"""
|
|
274
|
+
The category of bases for the `k`-bounded subspace of symmetric functions.
|
|
275
|
+
"""
|
|
276
|
+
|
|
277
|
+
def __init__(self, base, t='t'):
|
|
278
|
+
"""
|
|
279
|
+
Initialization of the bases of the `k`-bounded subspace.
|
|
280
|
+
|
|
281
|
+
INPUT:
|
|
282
|
+
|
|
283
|
+
- ``base`` -- a basis in the `k`-bounded subspace
|
|
284
|
+
- ``t`` -- a parameter (default: ``'t'``)
|
|
285
|
+
|
|
286
|
+
TESTS::
|
|
287
|
+
|
|
288
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
289
|
+
sage: from sage.combinat.sf.new_kschur import KBoundedSubspaceBases
|
|
290
|
+
sage: KB = Sym.kBoundedSubspace(3)
|
|
291
|
+
sage: KBB = KBoundedSubspaceBases(KB); KBB
|
|
292
|
+
Category of k bounded subspace bases of 3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
|
|
293
|
+
"""
|
|
294
|
+
self.t = t
|
|
295
|
+
Category_realization_of_parent.__init__(self, base)
|
|
296
|
+
|
|
297
|
+
def super_categories(self):
|
|
298
|
+
r"""
|
|
299
|
+
The super categories of ``self``.
|
|
300
|
+
|
|
301
|
+
EXAMPLES::
|
|
302
|
+
|
|
303
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
304
|
+
sage: from sage.combinat.sf.new_kschur import KBoundedSubspaceBases
|
|
305
|
+
sage: KB = Sym.kBoundedSubspace(3)
|
|
306
|
+
sage: KBB = KBoundedSubspaceBases(KB); KBB
|
|
307
|
+
Category of k bounded subspace bases of 3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
|
|
308
|
+
sage: KBB.super_categories()
|
|
309
|
+
[Category of realizations of 3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field,
|
|
310
|
+
Join of Category of graded coalgebras with basis over Univariate Polynomial Ring in t over Rational Field
|
|
311
|
+
and Category of subobjects of filtered modules with basis over Univariate Polynomial Ring in t over Rational Field]
|
|
312
|
+
"""
|
|
313
|
+
R = self.base().base_ring()
|
|
314
|
+
category = GradedHopfAlgebrasWithBasis(R) if self.t == 1 else GradedCoalgebrasWithBasis(R)
|
|
315
|
+
return [Realizations(self.base()), category.Subobjects()]
|
|
316
|
+
|
|
317
|
+
class ParentMethods:
|
|
318
|
+
|
|
319
|
+
def _element_constructor_(self, x):
|
|
320
|
+
r"""
|
|
321
|
+
Needed to rewrite the element constructor because of a bug in free_module.py.
|
|
322
|
+
Ideally _element_constructor_ would be inherited from free_module.py, but
|
|
323
|
+
it allows for bad inputs.
|
|
324
|
+
|
|
325
|
+
EXAMPLES::
|
|
326
|
+
|
|
327
|
+
sage: kB = SymmetricFunctions(QQ).kBoundedSubspace(3,1)
|
|
328
|
+
sage: ks = kB.kschur()
|
|
329
|
+
sage: ks([2,1])
|
|
330
|
+
ks3[2, 1]
|
|
331
|
+
sage: ks([4,1])
|
|
332
|
+
Traceback (most recent call last):
|
|
333
|
+
...
|
|
334
|
+
TypeError: do not know how to make x (= [4, 1]) an element of self (=3-bounded Symmetric Functions over Rational Field with t=1 in the 3-Schur basis)
|
|
335
|
+
sage: ks(Partition([4,1]))
|
|
336
|
+
Traceback (most recent call last):
|
|
337
|
+
...
|
|
338
|
+
TypeError: do not know how to make x (= [4, 1]) an element of self (=3-bounded Symmetric Functions over Rational Field with t=1 in the 3-Schur basis)
|
|
339
|
+
"""
|
|
340
|
+
R = self.base_ring()
|
|
341
|
+
|
|
342
|
+
# Coerce ints to Integers
|
|
343
|
+
if isinstance(x, int):
|
|
344
|
+
x = Integer(x)
|
|
345
|
+
if x in R:
|
|
346
|
+
if x == 0:
|
|
347
|
+
return self.zero()
|
|
348
|
+
else:
|
|
349
|
+
raise TypeError("do not know how to make x (= %s) an element of %s" % (x, self))
|
|
350
|
+
# x is an element of the basis enumerated set;
|
|
351
|
+
elif x in self._indices:
|
|
352
|
+
return self.monomial(self._indices(x))
|
|
353
|
+
raise TypeError("do not know how to make x (= %s) an element of self (=%s)" % (x, self))
|
|
354
|
+
|
|
355
|
+
def _convert_map_from_(self, Q):
|
|
356
|
+
r"""
|
|
357
|
+
Implement conversion from an arbitrary parent to ``self``.
|
|
358
|
+
|
|
359
|
+
This is done by first coercing to the appropriate lift basis.
|
|
360
|
+
|
|
361
|
+
EXAMPLES::
|
|
362
|
+
|
|
363
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
364
|
+
sage: e = Sym.elementary(); ks3 = Sym.kschur(3,1)
|
|
365
|
+
sage: ks3(e[3, 2]) # indirect doctest
|
|
366
|
+
ks3[1, 1, 1, 1, 1]
|
|
367
|
+
"""
|
|
368
|
+
P = self.lift.codomain()
|
|
369
|
+
if P.has_coerce_map_from(Q):
|
|
370
|
+
return self.retract * P._internal_coerce_map_from(Q)
|
|
371
|
+
return None
|
|
372
|
+
|
|
373
|
+
def __getitem__(self, c):
|
|
374
|
+
r"""
|
|
375
|
+
Implement shorthand for accessing basis elements.
|
|
376
|
+
|
|
377
|
+
For a basis `X` indexed by partitions, this method allows for
|
|
378
|
+
`X[[3,2]]` and `X[3,2]` to be equivalent to `X[Partition([3,2])]`.
|
|
379
|
+
|
|
380
|
+
Due to limitations in Python syntax, one must use `X[[]]` and not
|
|
381
|
+
`X[]` for the basis element indexed by the empty partition.
|
|
382
|
+
|
|
383
|
+
EXAMPLES::
|
|
384
|
+
|
|
385
|
+
sage: ks3 = SymmetricFunctions(QQ).kschur(3,1)
|
|
386
|
+
sage: ks3[3,2]
|
|
387
|
+
ks3[3, 2]
|
|
388
|
+
sage: ks3[[]]
|
|
389
|
+
ks3[]
|
|
390
|
+
|
|
391
|
+
TESTS::
|
|
392
|
+
|
|
393
|
+
sage: ks3 = SymmetricFunctions(QQ).kschur(3,1)
|
|
394
|
+
sage: ks3[4,1]
|
|
395
|
+
Traceback (most recent call last):
|
|
396
|
+
...
|
|
397
|
+
TypeError: do not know how to make [4, 1] an element of 3-bounded Symmetric Functions over Rational Field with t=1 in the 3-Schur basis
|
|
398
|
+
sage: ks3[Partition([4,1])]
|
|
399
|
+
Traceback (most recent call last):
|
|
400
|
+
...
|
|
401
|
+
TypeError: do not know how to make [4, 1] an element of 3-bounded Symmetric Functions over Rational Field with t=1 in the 3-Schur basis
|
|
402
|
+
"""
|
|
403
|
+
if not isinstance(c, Partition):
|
|
404
|
+
if c in ZZ:
|
|
405
|
+
c = Partition([c])
|
|
406
|
+
else:
|
|
407
|
+
c = Partition(c)
|
|
408
|
+
|
|
409
|
+
if c not in self._indices:
|
|
410
|
+
raise TypeError("do not know how to make %s an element of %s" % (c, self))
|
|
411
|
+
return self.monomial(c)
|
|
412
|
+
|
|
413
|
+
def _repr_term(self, c):
|
|
414
|
+
"""
|
|
415
|
+
Display elements with single brackets.
|
|
416
|
+
|
|
417
|
+
The default implementation of CombinatorialFreeModule gives double
|
|
418
|
+
brackets for basis elements indexed by partitions, i.e.,
|
|
419
|
+
`X[[3,2]]`.
|
|
420
|
+
|
|
421
|
+
EXAMPLES::
|
|
422
|
+
|
|
423
|
+
sage: ks3 = SymmetricFunctions(QQ).kschur(3,1)
|
|
424
|
+
sage: ks3[3,2] # indirect doctest
|
|
425
|
+
ks3[3, 2]
|
|
426
|
+
"""
|
|
427
|
+
return self.prefix() + str(c)
|
|
428
|
+
|
|
429
|
+
@cached_method
|
|
430
|
+
def one_basis(self):
|
|
431
|
+
r"""
|
|
432
|
+
Return the basis element indexing ``1``.
|
|
433
|
+
|
|
434
|
+
EXAMPLES::
|
|
435
|
+
|
|
436
|
+
sage: ks3 = SymmetricFunctions(QQ).kschur(3,1)
|
|
437
|
+
sage: ks3.one() # indirect doctest
|
|
438
|
+
ks3[]
|
|
439
|
+
"""
|
|
440
|
+
return Partition([])
|
|
441
|
+
|
|
442
|
+
def transition_matrix(self, other, n):
|
|
443
|
+
"""
|
|
444
|
+
Return the degree ``n`` transition matrix between ``self`` and ``other``.
|
|
445
|
+
|
|
446
|
+
INPUT:
|
|
447
|
+
|
|
448
|
+
- ``other`` -- a basis in the ring of symmetric functions
|
|
449
|
+
- ``n`` -- positive integer
|
|
450
|
+
|
|
451
|
+
The entry in the `i`-th row and `j`-th column is the
|
|
452
|
+
coefficient obtained by writing the `i`-th element of the
|
|
453
|
+
basis of ``self`` in terms of the basis ``other``, and extracting the
|
|
454
|
+
`j`-th coefficient.
|
|
455
|
+
|
|
456
|
+
EXAMPLES::
|
|
457
|
+
|
|
458
|
+
sage: Sym = SymmetricFunctions(QQ); s = Sym.schur()
|
|
459
|
+
sage: ks3 = Sym.kschur(3,1)
|
|
460
|
+
sage: ks3.transition_matrix(s,5)
|
|
461
|
+
[1 1 1 0 0 0 0]
|
|
462
|
+
[0 1 0 1 0 0 0]
|
|
463
|
+
[0 0 1 0 1 0 0]
|
|
464
|
+
[0 0 0 1 0 1 0]
|
|
465
|
+
[0 0 0 0 1 1 1]
|
|
466
|
+
|
|
467
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
468
|
+
sage: s = Sym.schur()
|
|
469
|
+
sage: ks = Sym.kschur(3)
|
|
470
|
+
sage: ks.transition_matrix(s,5)
|
|
471
|
+
[t^2 t 1 0 0 0 0]
|
|
472
|
+
[ 0 t 0 1 0 0 0]
|
|
473
|
+
[ 0 0 t 0 1 0 0]
|
|
474
|
+
[ 0 0 0 t 0 1 0]
|
|
475
|
+
[ 0 0 0 0 t^2 t 1]
|
|
476
|
+
"""
|
|
477
|
+
P = Partitions(n, max_part=self.k)
|
|
478
|
+
# todo: Q should be set by getting the degree n index set for
|
|
479
|
+
# `other`.
|
|
480
|
+
Q = Partitions(n)
|
|
481
|
+
return matrix([[other(self[row]).coefficient(col) for col in Q]
|
|
482
|
+
for row in P])
|
|
483
|
+
|
|
484
|
+
def _an_element_(self):
|
|
485
|
+
r"""
|
|
486
|
+
Return an element of ``self``.
|
|
487
|
+
|
|
488
|
+
EXAMPLES::
|
|
489
|
+
|
|
490
|
+
sage: SymmetricFunctions(QQ['t']).kschur(3).an_element()
|
|
491
|
+
2*ks3[] + 2*ks3[1] + 3*ks3[2]
|
|
492
|
+
"""
|
|
493
|
+
return self(Partition(srange(self.k, 0, -1)))
|
|
494
|
+
|
|
495
|
+
# This is sufficient for degree to work
|
|
496
|
+
def degree_on_basis(self, b):
|
|
497
|
+
r"""
|
|
498
|
+
Return the degree of the basis element indexed by `b`.
|
|
499
|
+
|
|
500
|
+
INPUT:
|
|
501
|
+
|
|
502
|
+
- ``b`` -- a partition
|
|
503
|
+
|
|
504
|
+
EXAMPLES::
|
|
505
|
+
|
|
506
|
+
sage: ks3 = SymmetricFunctions(QQ).kschur(3,1)
|
|
507
|
+
sage: ks3.degree_on_basis(Partition([3,2]))
|
|
508
|
+
5
|
|
509
|
+
"""
|
|
510
|
+
return sum(b)
|
|
511
|
+
|
|
512
|
+
def coproduct(self, element):
|
|
513
|
+
r"""
|
|
514
|
+
Return the coproduct operation on ``element``.
|
|
515
|
+
|
|
516
|
+
The coproduct is first computed on the homogeneous basis if `t=1`
|
|
517
|
+
and on the Hall-Littlewood ``Qp`` basis otherwise. The result is
|
|
518
|
+
computed then converted to the tensor squared of ``self.parent()``.
|
|
519
|
+
|
|
520
|
+
INPUT:
|
|
521
|
+
|
|
522
|
+
- ``element`` -- an element in a basis of the ring of symmetric
|
|
523
|
+
functions
|
|
524
|
+
|
|
525
|
+
EXAMPLES::
|
|
526
|
+
|
|
527
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
528
|
+
sage: ks3 = Sym.kschur(3,1)
|
|
529
|
+
sage: ks3[2,1].coproduct()
|
|
530
|
+
ks3[] # ks3[2, 1] + ks3[1] # ks3[1, 1] + ks3[1] # ks3[2] + ks3[1, 1] # ks3[1] + ks3[2] # ks3[1] + ks3[2, 1] # ks3[]
|
|
531
|
+
sage: h3 = Sym.khomogeneous(3)
|
|
532
|
+
sage: h3[2,1].coproduct()
|
|
533
|
+
h3[] # h3[2, 1] + h3[1] # h3[1, 1] + h3[1] # h3[2] + h3[1, 1] # h3[1] + h3[2] # h3[1] + h3[2, 1] # h3[]
|
|
534
|
+
sage: ks3t = SymmetricFunctions(FractionField(QQ['t'])).kschur(3)
|
|
535
|
+
sage: ks3t[2,1].coproduct()
|
|
536
|
+
ks3[] # ks3[2, 1] + ks3[1] # ks3[1, 1] + ks3[1] # ks3[2] + ks3[1, 1] # ks3[1] + ks3[2] # ks3[1] + ks3[2, 1] # ks3[]
|
|
537
|
+
sage: ks3t[3,1].coproduct()
|
|
538
|
+
ks3[] # ks3[3, 1] + ks3[1] # ks3[2, 1] + (t+1)*ks3[1] # ks3[3] + ks3[1, 1] # ks3[2] + ks3[2] # ks3[1, 1]
|
|
539
|
+
+ (t+1)*ks3[2] # ks3[2] + ks3[2, 1] # ks3[1] + (t+1)*ks3[3] # ks3[1] + ks3[3, 1] # ks3[]
|
|
540
|
+
sage: h3.coproduct(h3[2,1])
|
|
541
|
+
h3[] # h3[2, 1] + h3[1] # h3[1, 1] + h3[1] # h3[2] + h3[1, 1] # h3[1] + h3[2] # h3[1] + h3[2, 1] # h3[]
|
|
542
|
+
"""
|
|
543
|
+
lifted = element.lift()
|
|
544
|
+
ambient = self.realization_of().ambient()
|
|
545
|
+
t = self.realization_of().t
|
|
546
|
+
if t == 1:
|
|
547
|
+
source_basis = ambient.h()
|
|
548
|
+
else:
|
|
549
|
+
source_basis = ambient.hall_littlewood(t=t).Qp()
|
|
550
|
+
|
|
551
|
+
def cpfunc(x, y):
|
|
552
|
+
return tensor([self(x), self(y)])
|
|
553
|
+
return source_basis(lifted).coproduct().apply_multilinear_morphism(cpfunc)
|
|
554
|
+
|
|
555
|
+
def antipode(self, element):
|
|
556
|
+
r"""
|
|
557
|
+
Return the antipode on ``self`` by lifting to the space of
|
|
558
|
+
symmetric functions, computing the antipode, and then converting
|
|
559
|
+
to ``self.parent()``. This is only the antipode for `t = 1` and
|
|
560
|
+
for other values of `t` the result may not be in the space where
|
|
561
|
+
the `k`-Schur functions live.
|
|
562
|
+
|
|
563
|
+
INPUT:
|
|
564
|
+
|
|
565
|
+
- ``element`` -- an element in a basis of the ring of symmetric
|
|
566
|
+
functions
|
|
567
|
+
|
|
568
|
+
EXAMPLES::
|
|
569
|
+
|
|
570
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
571
|
+
sage: ks3 = Sym.kschur(3,1)
|
|
572
|
+
sage: ks3[3,2].antipode()
|
|
573
|
+
-ks3[1, 1, 1, 1, 1]
|
|
574
|
+
sage: ks3.antipode(ks3[3,2])
|
|
575
|
+
-ks3[1, 1, 1, 1, 1]
|
|
576
|
+
"""
|
|
577
|
+
return self(element.lift().antipode())
|
|
578
|
+
|
|
579
|
+
def counit(self, element):
|
|
580
|
+
r"""
|
|
581
|
+
Return the counit of ``element``.
|
|
582
|
+
|
|
583
|
+
The counit is the constant term of ``element``.
|
|
584
|
+
|
|
585
|
+
INPUT:
|
|
586
|
+
|
|
587
|
+
- ``element`` -- an element in a basis of the ring of symmetric
|
|
588
|
+
functions
|
|
589
|
+
|
|
590
|
+
EXAMPLES::
|
|
591
|
+
|
|
592
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
593
|
+
sage: ks3 = Sym.kschur(3,1)
|
|
594
|
+
sage: f = 2*ks3[2,1] + 3*ks3[[]]
|
|
595
|
+
sage: f.counit()
|
|
596
|
+
3
|
|
597
|
+
sage: ks3.counit(f)
|
|
598
|
+
3
|
|
599
|
+
"""
|
|
600
|
+
return element.coefficient([])
|
|
601
|
+
|
|
602
|
+
class ElementMethods:
|
|
603
|
+
def _mul_(self, other):
|
|
604
|
+
r"""
|
|
605
|
+
Return the product of two elements ``self`` and ``other``.
|
|
606
|
+
|
|
607
|
+
When `t=1`, the `k`-bounded subspace is an algebra, so the
|
|
608
|
+
product of two elements is always in the space. For generic
|
|
609
|
+
`t`, the `k`-bounded subspace is not closed under
|
|
610
|
+
multiplication, so the result is returned in the `k`-bounded
|
|
611
|
+
subspace if possible and else in the ring of symmetric
|
|
612
|
+
functions.
|
|
613
|
+
|
|
614
|
+
EXAMPLES::
|
|
615
|
+
|
|
616
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
617
|
+
sage: ks = Sym.kschur(3)
|
|
618
|
+
sage: ks[2]*ks[2] # indirect doctest
|
|
619
|
+
s[2, 2] + s[3, 1] + s[4]
|
|
620
|
+
sage: f = ks[2]*ks[3,1]; f
|
|
621
|
+
s[3, 2, 1] + s[3, 3] + s[4, 1, 1] + (t+1)*s[4, 2] + (t+1)*s[5, 1] + t*s[6]
|
|
622
|
+
sage: f.parent()
|
|
623
|
+
Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the Schur basis
|
|
624
|
+
sage: ks(f)
|
|
625
|
+
Traceback (most recent call last):
|
|
626
|
+
...
|
|
627
|
+
ValueError: s[3, 2, 1] + s[3, 3] + s[4, 1, 1] + (t+1)*s[4, 2] + (t+1)*s[5, 1] + t*s[6] is not in the image
|
|
628
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
629
|
+
sage: ks = Sym.kschur(3,1)
|
|
630
|
+
sage: f = ks[2]*ks[3,1]; f
|
|
631
|
+
ks3[3, 2, 1] + ks3[3, 3]
|
|
632
|
+
sage: f.parent()
|
|
633
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the 3-Schur basis
|
|
634
|
+
|
|
635
|
+
TESTS::
|
|
636
|
+
|
|
637
|
+
sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
|
|
638
|
+
sage: ks2 = Sym.kschur(2)
|
|
639
|
+
sage: ks3 = Sym.kschur(3)
|
|
640
|
+
sage: ks5 = Sym.kschur(5)
|
|
641
|
+
sage: ks5(ks3[2]) * ks5(ks2[2,1])
|
|
642
|
+
ks5[2, 2, 1] + ks5[3, 1, 1] + (t+1)*ks5[3, 2] + (t+1)*ks5[4, 1] + t*ks5[5]
|
|
643
|
+
|
|
644
|
+
sage: ks3([1]) * ks3([1]) # indirect doctest
|
|
645
|
+
ks3[1, 1] + ks3[2]
|
|
646
|
+
sage: ks3([2,1]) * ks3([2,1])
|
|
647
|
+
s[2, 2, 1, 1] + s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] +
|
|
648
|
+
s[3, 3] + s[4, 1, 1] + s[4, 2]
|
|
649
|
+
sage: ks3 = SymmetricFunctions(QQ).kschur(3, t=1)
|
|
650
|
+
sage: ks3([2,1])^2
|
|
651
|
+
ks3[2, 2, 1, 1] + ks3[2, 2, 2] + ks3[3, 1, 1, 1]
|
|
652
|
+
"""
|
|
653
|
+
if self.parent().realization_of().t == 1:
|
|
654
|
+
return self.parent()(self.lift() * other.lift())
|
|
655
|
+
result = self.lift() * other.lift()
|
|
656
|
+
try:
|
|
657
|
+
result = self.parent()(result)
|
|
658
|
+
except ValueError:
|
|
659
|
+
pass
|
|
660
|
+
return result
|
|
661
|
+
|
|
662
|
+
def hl_creation_operator(self, nu, t=None):
|
|
663
|
+
r"""
|
|
664
|
+
This is the vertex operator that generalizes Jing's operator.
|
|
665
|
+
|
|
666
|
+
It is a linear operator that raises the degree by
|
|
667
|
+
`|\nu|`. This creation operator is a t-analogue of
|
|
668
|
+
multiplication by ``s(nu)`` .
|
|
669
|
+
|
|
670
|
+
.. SEEALSO:: Proposition 5 in [SZ2001]_.
|
|
671
|
+
|
|
672
|
+
INPUT:
|
|
673
|
+
|
|
674
|
+
- ``nu`` -- a partition or a list of integers
|
|
675
|
+
|
|
676
|
+
- ``t`` -- (default: ``None``, in which case ``t`` is used) an
|
|
677
|
+
element of the base ring
|
|
678
|
+
|
|
679
|
+
EXAMPLES::
|
|
680
|
+
|
|
681
|
+
sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
|
|
682
|
+
sage: ks = Sym.kschur(4)
|
|
683
|
+
sage: s = Sym.schur()
|
|
684
|
+
sage: s(ks([3,1,1]).hl_creation_operator([1]))
|
|
685
|
+
(t-1)*s[2, 2, 1, 1] + t^2*s[3, 1, 1, 1] + (t^3+t^2-t)*s[3, 2, 1] + (t^3-t^2)*s[3, 3] + (t^4+t^3)*s[4, 1, 1] + t^4*s[4, 2] + t^5*s[5, 1]
|
|
686
|
+
sage: ks([3,1,1]).hl_creation_operator([1])
|
|
687
|
+
(t-1)*ks4[2, 2, 1, 1] + t^2*ks4[3, 1, 1, 1] + t^3*ks4[3, 2, 1] + (t^3-t^2)*ks4[3, 3] + t^4*ks4[4, 1, 1]
|
|
688
|
+
|
|
689
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
690
|
+
sage: ks = Sym.kschur(4,t=1)
|
|
691
|
+
sage: ks([3,1,1]).hl_creation_operator([1])
|
|
692
|
+
ks4[3, 1, 1, 1] + ks4[3, 2, 1] + ks4[4, 1, 1]
|
|
693
|
+
"""
|
|
694
|
+
if t is None:
|
|
695
|
+
t = self.parent().realization_of().t
|
|
696
|
+
return self.parent()(self.lift().hl_creation_operator(nu, t=t))
|
|
697
|
+
|
|
698
|
+
def omega(self):
|
|
699
|
+
r"""
|
|
700
|
+
Return the `\omega` operator on ``self``.
|
|
701
|
+
|
|
702
|
+
At `t=1`, `\omega` maps the `k`-Schur function `s^{(k)}_\lambda` to `s^{(k)}_{\lambda^{(k)}}`, where
|
|
703
|
+
`\lambda^{(k)}` is the `k`-conjugate of the partition `\lambda`.
|
|
704
|
+
|
|
705
|
+
.. SEEALSO:: :meth:`~sage.combinat.partition.Partition.k_conjugate`.
|
|
706
|
+
|
|
707
|
+
For generic `t`, `\omega` sends `s^{(k)}_\lambda[X;t]` to `t^d s^{(k)}_{\lambda^{(k)}}[X;1/t]`,
|
|
708
|
+
where `d` is the size of the core of `\lambda` minus the size of `\lambda`. Most of the time,
|
|
709
|
+
this result is not in the `k`-bounded subspace.
|
|
710
|
+
|
|
711
|
+
.. SEEALSO:: :meth:`omega_t_inverse`.
|
|
712
|
+
|
|
713
|
+
EXAMPLES::
|
|
714
|
+
|
|
715
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
716
|
+
sage: ks = Sym.kschur(3,1)
|
|
717
|
+
sage: ks[2,2,1,1].omega()
|
|
718
|
+
ks3[2, 2, 2]
|
|
719
|
+
sage: kh = Sym.khomogeneous(3)
|
|
720
|
+
sage: kh[3].omega()
|
|
721
|
+
h3[1, 1, 1] - 2*h3[2, 1] + h3[3]
|
|
722
|
+
|
|
723
|
+
sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
|
|
724
|
+
sage: ks = Sym.kschur(3)
|
|
725
|
+
sage: ks[3,1,1].omega()
|
|
726
|
+
Traceback (most recent call last):
|
|
727
|
+
...
|
|
728
|
+
ValueError: t*s[2, 1, 1, 1] + s[3, 1, 1] is not in the image
|
|
729
|
+
"""
|
|
730
|
+
return self.parent()(self.lift().omega())
|
|
731
|
+
|
|
732
|
+
def omega_t_inverse(self):
|
|
733
|
+
r"""
|
|
734
|
+
Return the map `t\to 1/t` composed with `\omega` on ``self``.
|
|
735
|
+
|
|
736
|
+
Unlike the map :meth:`omega`, the result of :meth:`omega_t_inverse` lives in
|
|
737
|
+
the `k`-bounded subspace and hence will return an element even for generic
|
|
738
|
+
`t`. For `t=1`, :meth:`omega` and :meth:`omega_t_inverse` return the same
|
|
739
|
+
result.
|
|
740
|
+
|
|
741
|
+
EXAMPLES::
|
|
742
|
+
|
|
743
|
+
sage: Sym = SymmetricFunctions(FractionField(QQ['t']))
|
|
744
|
+
sage: ks = Sym.kschur(3)
|
|
745
|
+
sage: ks[3,1,1].omega_t_inverse()
|
|
746
|
+
1/t*ks3[2, 1, 1, 1]
|
|
747
|
+
sage: ks[3,2].omega_t_inverse()
|
|
748
|
+
1/t^2*ks3[1, 1, 1, 1, 1]
|
|
749
|
+
"""
|
|
750
|
+
s = self.parent().realization_of().ambient()
|
|
751
|
+
t = s.base_ring().gen()
|
|
752
|
+
|
|
753
|
+
def invert(x):
|
|
754
|
+
return s.base_ring()(x.subs(t=1 / t))
|
|
755
|
+
return self.parent()(s(self).map_coefficients(invert).omega())
|
|
756
|
+
|
|
757
|
+
def is_schur_positive(self, *args, **kwargs):
|
|
758
|
+
r"""
|
|
759
|
+
Return whether ``self`` is Schur positive.
|
|
760
|
+
|
|
761
|
+
EXAMPLES::
|
|
762
|
+
|
|
763
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
764
|
+
sage: ks = Sym.kschur(3,1)
|
|
765
|
+
sage: f = ks[3,2]+ks[1]
|
|
766
|
+
sage: f.is_schur_positive()
|
|
767
|
+
True
|
|
768
|
+
sage: f = ks[3,2]-ks[1]
|
|
769
|
+
sage: f.is_schur_positive()
|
|
770
|
+
False
|
|
771
|
+
|
|
772
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
773
|
+
sage: ks = Sym.kschur(3)
|
|
774
|
+
sage: f = ks[3,2]+ks[1]
|
|
775
|
+
sage: f.is_schur_positive()
|
|
776
|
+
True
|
|
777
|
+
sage: f = ks[3,2]-ks[1]
|
|
778
|
+
sage: f.is_schur_positive()
|
|
779
|
+
False
|
|
780
|
+
"""
|
|
781
|
+
return self.lift().is_schur_positive(*args, **kwargs)
|
|
782
|
+
|
|
783
|
+
def expand(self, *args, **kwargs):
|
|
784
|
+
r"""
|
|
785
|
+
Return the monomial expansion of ``self`` in `n` variables.
|
|
786
|
+
|
|
787
|
+
INPUT:
|
|
788
|
+
|
|
789
|
+
- ``n`` -- positive integer
|
|
790
|
+
|
|
791
|
+
OUTPUT: monomial expansion of ``self`` in `n` variables
|
|
792
|
+
|
|
793
|
+
EXAMPLES::
|
|
794
|
+
|
|
795
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
796
|
+
sage: ks = Sym.kschur(3,1)
|
|
797
|
+
sage: ks[3,1].expand(2)
|
|
798
|
+
x0^4 + 2*x0^3*x1 + 2*x0^2*x1^2 + 2*x0*x1^3 + x1^4
|
|
799
|
+
sage: s = Sym.schur()
|
|
800
|
+
sage: ks[3,1].expand(2) == s(ks[3,1]).expand(2)
|
|
801
|
+
True
|
|
802
|
+
|
|
803
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
804
|
+
sage: ks = Sym.kschur(3)
|
|
805
|
+
sage: f = ks[3,2]-ks[1]
|
|
806
|
+
sage: f.expand(2)
|
|
807
|
+
t^2*x0^5 + (t^2 + t)*x0^4*x1 + (t^2 + t + 1)*x0^3*x1^2 + (t^2 + t + 1)*x0^2*x1^3 + (t^2 + t)*x0*x1^4 + t^2*x1^5 - x0 - x1
|
|
808
|
+
"""
|
|
809
|
+
return self.lift().expand(*args, **kwargs)
|
|
810
|
+
|
|
811
|
+
def scalar(self, x, zee=None):
|
|
812
|
+
r"""
|
|
813
|
+
Return standard scalar product between ``self`` and ``x``.
|
|
814
|
+
|
|
815
|
+
INPUT:
|
|
816
|
+
|
|
817
|
+
- ``x`` -- element of the ring of symmetric functions over the
|
|
818
|
+
same base ring as ``self``
|
|
819
|
+
|
|
820
|
+
- ``zee`` -- an optional function on partitions giving
|
|
821
|
+
the value for the scalar product between `p_{\mu}` and `p_{\mu}`
|
|
822
|
+
(default: use the standard :meth:`~sage.combinat.sf.sfa.zee` function)
|
|
823
|
+
|
|
824
|
+
.. SEEALSO:: :meth:`~sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.scalar`
|
|
825
|
+
|
|
826
|
+
EXAMPLES::
|
|
827
|
+
|
|
828
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
829
|
+
sage: ks3 = Sym.kschur(3)
|
|
830
|
+
sage: ks3[3,2,1].scalar( ks3[2,2,2] )
|
|
831
|
+
t^3 + t
|
|
832
|
+
sage: dks3 = Sym.kBoundedQuotient(3).dks()
|
|
833
|
+
sage: [ks3[3,2,1].scalar(dks3(la)) for la in Partitions(6, max_part=3)]
|
|
834
|
+
[0, 1, 0, 0, 0, 0, 0]
|
|
835
|
+
sage: dks3 = Sym.kBoundedQuotient(3,t=1).dks()
|
|
836
|
+
sage: [ks3[2,2,2].scalar(dks3(la)) for la in Partitions(6, max_part=3)]
|
|
837
|
+
[0, t - 1, 0, 1, 0, 0, 0]
|
|
838
|
+
sage: ks3 = Sym.kschur(3,t=1)
|
|
839
|
+
sage: [ks3[2,2,2].scalar(dks3(la)) for la in Partitions(6, max_part=3)]
|
|
840
|
+
[0, 0, 0, 1, 0, 0, 0]
|
|
841
|
+
sage: kH = Sym.khomogeneous(4)
|
|
842
|
+
sage: kH([2,2,1]).scalar(ks3[2,2,1])
|
|
843
|
+
3
|
|
844
|
+
|
|
845
|
+
TESTS::
|
|
846
|
+
|
|
847
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
848
|
+
sage: ks3 = Sym.kschur(3,1)
|
|
849
|
+
sage: ks3(1).scalar(ks3([]))
|
|
850
|
+
1
|
|
851
|
+
"""
|
|
852
|
+
if hasattr(x, 'lift'):
|
|
853
|
+
return self.lift().scalar(x.lift(), zee)
|
|
854
|
+
return self.lift().scalar(x, zee)
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
class kSchur(CombinatorialFreeModule):
|
|
858
|
+
r"""
|
|
859
|
+
Space of `k`-Schur functions.
|
|
860
|
+
|
|
861
|
+
EXAMPLES::
|
|
862
|
+
|
|
863
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
864
|
+
sage: KB = Sym.kBoundedSubspace(3); KB
|
|
865
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field
|
|
866
|
+
|
|
867
|
+
The `k`-Schur function basis can be constructed as follows::
|
|
868
|
+
|
|
869
|
+
sage: ks3 = KB.kschur(); ks3
|
|
870
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 3-Schur basis
|
|
871
|
+
|
|
872
|
+
We can convert to any basis of the ring of symmetric functions and,
|
|
873
|
+
whenever it makes sense, also the other way round::
|
|
874
|
+
|
|
875
|
+
sage: s = Sym.schur()
|
|
876
|
+
sage: s(ks3([3,2,1]))
|
|
877
|
+
s[3, 2, 1] + t*s[4, 1, 1] + t*s[4, 2] + t^2*s[5, 1]
|
|
878
|
+
sage: t = Sym.base_ring().gen()
|
|
879
|
+
sage: ks3(s([3, 2, 1]) + t*s([4, 1, 1]) + t*s([4, 2]) + t^2*s([5, 1]))
|
|
880
|
+
ks3[3, 2, 1]
|
|
881
|
+
sage: s(ks3[2, 1, 1])
|
|
882
|
+
s[2, 1, 1] + t*s[3, 1]
|
|
883
|
+
sage: ks3(s[2, 1, 1] + t*s[3, 1])
|
|
884
|
+
ks3[2, 1, 1]
|
|
885
|
+
|
|
886
|
+
`k`-Schur functions are indexed by partitions with first part `\le k`. Constructing a
|
|
887
|
+
`k`-Schur function for a larger partition raises an error::
|
|
888
|
+
|
|
889
|
+
sage: ks3([4,3,2,1]) #
|
|
890
|
+
Traceback (most recent call last):
|
|
891
|
+
...
|
|
892
|
+
TypeError: do not know how to make x (= [4, 3, 2, 1]) an element of self (=3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 3-Schur basis)
|
|
893
|
+
|
|
894
|
+
Similarly, attempting to convert a function that is not in the
|
|
895
|
+
linear span of the `k`-Schur functions raises an error::
|
|
896
|
+
|
|
897
|
+
sage: ks3(s([4]))
|
|
898
|
+
Traceback (most recent call last):
|
|
899
|
+
...
|
|
900
|
+
ValueError: s[4] is not in the image
|
|
901
|
+
|
|
902
|
+
Note that the product of `k`-Schur functions is not guaranteed to be in the
|
|
903
|
+
space spanned by the `k`-Schurs. In general, we only have that a
|
|
904
|
+
`k`-Schur times a `j`-Schur function is in the `(k+j)`-bounded subspace. The
|
|
905
|
+
multiplication of two `k`-Schur functions thus generally returns the product of
|
|
906
|
+
the lift of the functions to the ambient symmetric function space. If the result
|
|
907
|
+
happens to lie in the `k`-bounded subspace, then the result is cast into the
|
|
908
|
+
`k`-Schur basis::
|
|
909
|
+
|
|
910
|
+
sage: ks2 = Sym.kBoundedSubspace(2).kschur()
|
|
911
|
+
sage: ks2[1] * ks2[1]
|
|
912
|
+
ks2[1, 1] + ks2[2]
|
|
913
|
+
sage: ks2[1] * ks2[2]
|
|
914
|
+
s[2, 1] + s[3]
|
|
915
|
+
|
|
916
|
+
Because the target space of the product of a `k`-Schur and a `j`-Schur has several
|
|
917
|
+
possibilities, the product of a `k`-Schur and `j`-Schur function is not
|
|
918
|
+
implemented for distinct `k` and `j`. Let us show how to get around
|
|
919
|
+
this 'manually'::
|
|
920
|
+
|
|
921
|
+
sage: ks3 = Sym.kBoundedSubspace(3).kschur()
|
|
922
|
+
sage: ks2([2,1]) * ks3([3,1])
|
|
923
|
+
Traceback (most recent call last):
|
|
924
|
+
...
|
|
925
|
+
TypeError: unsupported operand parent(s) for *: '2-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 2-Schur basis' and '3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 3-Schur basis'
|
|
926
|
+
|
|
927
|
+
The workaround::
|
|
928
|
+
|
|
929
|
+
sage: f = s(ks2([2,1])) * s(ks3([3,1])); f # Convert to Schur functions first and multiply there.
|
|
930
|
+
s[3, 2, 1, 1] + s[3, 2, 2] + (t+1)*s[3, 3, 1] + s[4, 1, 1, 1]
|
|
931
|
+
+ (2*t+2)*s[4, 2, 1] + (t^2+t+1)*s[4, 3] + (2*t+1)*s[5, 1, 1]
|
|
932
|
+
+ (t^2+2*t+1)*s[5, 2] + (t^2+2*t)*s[6, 1] + t^2*s[7]
|
|
933
|
+
|
|
934
|
+
or::
|
|
935
|
+
|
|
936
|
+
sage: f = ks2[2,1].lift() * ks3[3,1].lift()
|
|
937
|
+
sage: ks5 = Sym.kBoundedSubspace(5).kschur()
|
|
938
|
+
sage: ks5(f) # The product of a 'ks2' with a 'ks3' is a 'ks5'.
|
|
939
|
+
ks5[3, 2, 1, 1] + ks5[3, 2, 2] + (t+1)*ks5[3, 3, 1] + ks5[4, 1, 1, 1]
|
|
940
|
+
+ (t+2)*ks5[4, 2, 1] + (t^2+t+1)*ks5[4, 3] + (t+1)*ks5[5, 1, 1] + ks5[5, 2]
|
|
941
|
+
|
|
942
|
+
For other technical reasons, taking powers of `k`-Schur functions
|
|
943
|
+
is not implemented, even when the answer is still in the `k`-bounded
|
|
944
|
+
subspace::
|
|
945
|
+
|
|
946
|
+
sage: ks2([1])^2
|
|
947
|
+
Traceback (most recent call last):
|
|
948
|
+
...
|
|
949
|
+
TypeError: unsupported operand parent(s) for ^: '2-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 2-Schur basis' and 'Integer Ring'
|
|
950
|
+
|
|
951
|
+
.. TODO::
|
|
952
|
+
|
|
953
|
+
Get rid of said technical "reasons".
|
|
954
|
+
|
|
955
|
+
However, at `t=1`, the product of `k`-Schur functions is in the span of the
|
|
956
|
+
`k`-Schur functions always. Below are some examples at `t=1` ::
|
|
957
|
+
|
|
958
|
+
sage: ks3 = Sym.kBoundedSubspace(3, t=1).kschur(); ks3
|
|
959
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field with t=1 in the 3-Schur basis
|
|
960
|
+
sage: s = SymmetricFunctions(ks3.base_ring()).schur()
|
|
961
|
+
sage: ks3(s([3]))
|
|
962
|
+
ks3[3]
|
|
963
|
+
sage: s(ks3([3,2,1]))
|
|
964
|
+
s[3, 2, 1] + s[4, 1, 1] + s[4, 2] + s[5, 1]
|
|
965
|
+
sage: ks3([2,1])^2 # taking powers works for t=1
|
|
966
|
+
ks3[2, 2, 1, 1] + ks3[2, 2, 2] + ks3[3, 1, 1, 1]
|
|
967
|
+
|
|
968
|
+
TESTS:
|
|
969
|
+
|
|
970
|
+
Check that :issue:`13743` is fixed::
|
|
971
|
+
|
|
972
|
+
sage: ks3 = SymmetricFunctions(QQ).kschur(3, 1)
|
|
973
|
+
sage: f = ks3[2,1]
|
|
974
|
+
sage: f.coefficient(f.support()[0])
|
|
975
|
+
1
|
|
976
|
+
"""
|
|
977
|
+
|
|
978
|
+
def __init__(self, kBoundedRing):
|
|
979
|
+
r"""
|
|
980
|
+
TESTS::
|
|
981
|
+
|
|
982
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
983
|
+
sage: from sage.combinat.sf.new_kschur import kSchur
|
|
984
|
+
sage: KB = Sym.kBoundedSubspace(3,t=1)
|
|
985
|
+
sage: kSchur(KB)
|
|
986
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the 3-Schur basis
|
|
987
|
+
"""
|
|
988
|
+
CombinatorialFreeModule.__init__(self, kBoundedRing.base_ring(),
|
|
989
|
+
kBoundedRing.indices(),
|
|
990
|
+
category=KBoundedSubspaceBases(kBoundedRing, kBoundedRing.t),
|
|
991
|
+
prefix='ks%d' % kBoundedRing.k)
|
|
992
|
+
|
|
993
|
+
self._kBoundedRing = kBoundedRing
|
|
994
|
+
|
|
995
|
+
self.k = kBoundedRing.k
|
|
996
|
+
self.t = kBoundedRing.t
|
|
997
|
+
|
|
998
|
+
s = self.realization_of().ambient().schur()
|
|
999
|
+
|
|
1000
|
+
self.ambient = ConstantFunction(s)
|
|
1001
|
+
|
|
1002
|
+
self.lift = self._module_morphism(self._to_schur_on_basis,
|
|
1003
|
+
codomain=s, triangular='lower', unitriangular=True,
|
|
1004
|
+
inverse_on_support=lambda p: p if p.get_part(0) <= self.k else None)
|
|
1005
|
+
|
|
1006
|
+
self.lift.register_as_coercion()
|
|
1007
|
+
|
|
1008
|
+
self.retract = SetMorphism(Hom(s, self, SetsWithPartialMaps()),
|
|
1009
|
+
self.lift.preimage)
|
|
1010
|
+
self.register_conversion(self.retract)
|
|
1011
|
+
|
|
1012
|
+
# The following are meant to be inherited with the category framework, but
|
|
1013
|
+
# this fails because they are methods of Parent. The trick below overcomes
|
|
1014
|
+
# this problem.
|
|
1015
|
+
__getitem__ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "__getitem__")
|
|
1016
|
+
_repr_term = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_repr_term")
|
|
1017
|
+
_convert_map_from_ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_convert_map_from_")
|
|
1018
|
+
_element_constructor_ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_element_constructor_")
|
|
1019
|
+
|
|
1020
|
+
def _repr_(self):
|
|
1021
|
+
"""
|
|
1022
|
+
Representation of ``self``.
|
|
1023
|
+
|
|
1024
|
+
EXAMPLES::
|
|
1025
|
+
|
|
1026
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
1027
|
+
sage: ks = Sym.kschur(4,1); ks # indirect doctest
|
|
1028
|
+
4-bounded Symmetric Functions over Rational Field with t=1 in the 4-Schur basis
|
|
1029
|
+
|
|
1030
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
1031
|
+
sage: ks = Sym.kschur(4); ks
|
|
1032
|
+
4-bounded Symmetric Functions over Univariate Polynomial Ring in t over Rational Field in the 4-Schur basis
|
|
1033
|
+
"""
|
|
1034
|
+
return self.realization_of()._repr_() + ' in the %s-Schur basis' % (self.k)
|
|
1035
|
+
|
|
1036
|
+
@cached_method
|
|
1037
|
+
def _to_schur_on_basis(self, p):
|
|
1038
|
+
r"""
|
|
1039
|
+
Compute the change of basis from `k`-Schur functions to Schur functions.
|
|
1040
|
+
|
|
1041
|
+
When `t=1` this procedure does this computation by first factoring out all
|
|
1042
|
+
maximal rectangles, computing all the atoms, and then taking the product
|
|
1043
|
+
again of the `k`-Schur function indexed by the `k`-irreducible partition and
|
|
1044
|
+
the Schur functions indexed by rectangles.
|
|
1045
|
+
|
|
1046
|
+
INPUT:
|
|
1047
|
+
|
|
1048
|
+
- ``p`` -- a partition
|
|
1049
|
+
|
|
1050
|
+
OUTPUT: conversion of the `k`-Schur function indexed by ``p`` in terms of Schur functions
|
|
1051
|
+
|
|
1052
|
+
EXAMPLES::
|
|
1053
|
+
|
|
1054
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
1055
|
+
sage: ks = Sym.kschur(4)
|
|
1056
|
+
sage: ks._to_schur_on_basis(Partition([3,3,2,1]))
|
|
1057
|
+
s[3, 3, 2, 1] + t*s[4, 3, 1, 1] + t*s[4, 3, 2] + t^2*s[4, 4, 1] + t^2*s[5, 3, 1] + t^3*s[5, 4]
|
|
1058
|
+
sage: ks = Sym.kschur(4,1)
|
|
1059
|
+
sage: ks._to_schur_on_basis(Partition([4,4,3,3,2,2,2,1])).coefficient([12,5,4])
|
|
1060
|
+
5
|
|
1061
|
+
|
|
1062
|
+
TESTS::
|
|
1063
|
+
|
|
1064
|
+
sage: ks._to_schur_on_basis(Partition([]))
|
|
1065
|
+
s[]
|
|
1066
|
+
"""
|
|
1067
|
+
s = self.realization_of().ambient().schur()
|
|
1068
|
+
if self.t == 1:
|
|
1069
|
+
# in this case factor out maximal rectangles for speed
|
|
1070
|
+
pexp = p.to_exp() + [0] * self.k
|
|
1071
|
+
katom = p.k_irreducible(self.k).k_atom(self.k)
|
|
1072
|
+
return s.sum_of_monomials(tab.shape() for tab in katom) * prod(s([r + 1] * (self.k - r)) for r in range(self.k) for m in range(pexp[r] // (self.k - r)))
|
|
1073
|
+
katom = p.k_atom(self.k)
|
|
1074
|
+
return s.sum_of_terms((tab.shape(), self.t**tab.charge())
|
|
1075
|
+
for tab in katom)
|
|
1076
|
+
|
|
1077
|
+
def _product_on_basis_via_rectangles(self, left, right):
|
|
1078
|
+
r"""
|
|
1079
|
+
Multiply two `k`-Schur functions at `t=1` indexed by ``left`` and ``right``.
|
|
1080
|
+
|
|
1081
|
+
This algorithm uses the property that if `R` is an `r \times (k+1-r)`
|
|
1082
|
+
rectangle, then
|
|
1083
|
+
|
|
1084
|
+
.. MATH::
|
|
1085
|
+
|
|
1086
|
+
s_{R} \cdot s^{(k)}_\lambda = s^{(k)}_{R \cup \lambda}
|
|
1087
|
+
|
|
1088
|
+
To compute the product of two `k`-Schur functions, all rectangles are factored
|
|
1089
|
+
out, the product is performed in the Schur basis, then the rectangles are
|
|
1090
|
+
re-inserted.
|
|
1091
|
+
|
|
1092
|
+
INPUT:
|
|
1093
|
+
|
|
1094
|
+
- ``left``, ``right`` -- partitions
|
|
1095
|
+
|
|
1096
|
+
OUTPUT: the product of the `k`-Schur functions indexed by ``left`` and ``right``
|
|
1097
|
+
|
|
1098
|
+
EXAMPLES::
|
|
1099
|
+
|
|
1100
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
1101
|
+
sage: ks = Sym.kschur(5,1)
|
|
1102
|
+
sage: ks._product_on_basis_via_rectangles(Partition([5,4,4,3,3,3]),Partition([4,4,2,2,2,2]))
|
|
1103
|
+
ks5[5, 4, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2]
|
|
1104
|
+
sage: ks._product_on_basis_via_rectangles(Partition([5,4,4,3,3,3,1]),Partition([4,4,2]))
|
|
1105
|
+
ks5[5, 4, 4, 4, 4, 3, 3, 3, 2, 1] + ks5[5, 4, 4, 4, 4, 3, 3, 3, 3]
|
|
1106
|
+
|
|
1107
|
+
TESTS::
|
|
1108
|
+
|
|
1109
|
+
sage: ks._product_on_basis_via_rectangles(Partition([]), Partition([]))
|
|
1110
|
+
ks5[]
|
|
1111
|
+
"""
|
|
1112
|
+
leftir = self._to_schur_on_basis(left.k_irreducible(self.k))
|
|
1113
|
+
rightir = self._to_schur_on_basis(right.k_irreducible(self.k))
|
|
1114
|
+
heart = self.retract(leftir * rightir)
|
|
1115
|
+
leftexp = left.to_exp()
|
|
1116
|
+
rightexp = right.to_exp()
|
|
1117
|
+
rects = sum(([r + 1] * (self.k - r) for r in range(len(leftexp))
|
|
1118
|
+
for m in range(leftexp[r] // (self.k - r))), [])
|
|
1119
|
+
rects += sum(([r + 1] * (self.k - r) for r in range(len(rightexp))
|
|
1120
|
+
for m in range(rightexp[r] // (self.k - r))), [])
|
|
1121
|
+
return heart.map_support(lambda lam: Partition(sorted(lam + rects, reverse=True)))
|
|
1122
|
+
|
|
1123
|
+
def product_on_basis(self, left, right):
|
|
1124
|
+
r"""
|
|
1125
|
+
Take the product of two `k`-Schur functions.
|
|
1126
|
+
|
|
1127
|
+
If `t \neq 1`, then take the product by lifting to the Schur functions and then
|
|
1128
|
+
retracting back into the `k`-bounded subspace (if possible).
|
|
1129
|
+
|
|
1130
|
+
If `t=1`, then the product calls :meth:`_product_on_basis_via_rectangles`.
|
|
1131
|
+
|
|
1132
|
+
INPUT:
|
|
1133
|
+
|
|
1134
|
+
- ``left``, ``right`` -- partitions
|
|
1135
|
+
|
|
1136
|
+
OUTPUT: an element of the `k`-Schur functions
|
|
1137
|
+
|
|
1138
|
+
EXAMPLES::
|
|
1139
|
+
|
|
1140
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
1141
|
+
sage: ks3 = Sym.kschur(3,1)
|
|
1142
|
+
sage: kH = Sym.khomogeneous(3)
|
|
1143
|
+
sage: ks3(kH[2,1,1])
|
|
1144
|
+
ks3[2, 1, 1] + ks3[2, 2] + ks3[3, 1]
|
|
1145
|
+
sage: ks3([])*kH[2,1,1]
|
|
1146
|
+
ks3[2, 1, 1] + ks3[2, 2] + ks3[3, 1]
|
|
1147
|
+
sage: ks3([3,3,3,2,2,1,1,1])^2
|
|
1148
|
+
ks3[3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]
|
|
1149
|
+
sage: ks3([3,3,3,2,2,1,1,1])*ks3([2,2,2,2,2,1,1,1,1])
|
|
1150
|
+
ks3[3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1]
|
|
1151
|
+
sage: ks3([2,2,1,1,1,1])*ks3([2,2,2,1,1,1,1])
|
|
1152
|
+
ks3[2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1] + ks3[2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1]
|
|
1153
|
+
sage: ks3[2,1]^2
|
|
1154
|
+
ks3[2, 2, 1, 1] + ks3[2, 2, 2] + ks3[3, 1, 1, 1]
|
|
1155
|
+
sage: ks3 = Sym.kschur(3)
|
|
1156
|
+
sage: ks3[2,1]*ks3[2,1]
|
|
1157
|
+
s[2, 2, 1, 1] + s[2, 2, 2] + s[3, 1, 1, 1] + 2*s[3, 2, 1] + s[3, 3] + s[4, 1, 1] + s[4, 2]
|
|
1158
|
+
|
|
1159
|
+
TESTS::
|
|
1160
|
+
|
|
1161
|
+
sage: Sym = SymmetricFunctions(QQ['t'])
|
|
1162
|
+
sage: ks3 = Sym.kschur(3,1)
|
|
1163
|
+
sage: kH = Sym.khomogeneous(3)
|
|
1164
|
+
sage: ks3.product( ks3([]), ks3([]) )
|
|
1165
|
+
ks3[]
|
|
1166
|
+
sage: ks3.product( ks3([]), kH([]) )
|
|
1167
|
+
ks3[]
|
|
1168
|
+
sage: ks3 = Sym.kschur(3)
|
|
1169
|
+
sage: ks3([]) * ks3([])
|
|
1170
|
+
ks3[]
|
|
1171
|
+
"""
|
|
1172
|
+
if self.t == 1:
|
|
1173
|
+
return self._product_on_basis_via_rectangles(left, right)
|
|
1174
|
+
left_s = self._to_schur_on_basis(left)
|
|
1175
|
+
right_s = self._to_schur_on_basis(right)
|
|
1176
|
+
return self.retract(left_s * right_s)
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
class kSplit(CombinatorialFreeModule):
|
|
1180
|
+
def __init__(self, kBoundedRing):
|
|
1181
|
+
r"""
|
|
1182
|
+
The `k`-split basis of the space of `k`-bounded-symmetric functions.
|
|
1183
|
+
|
|
1184
|
+
Fix ``k`` a positive integer and ``t`` an element of the base ring.
|
|
1185
|
+
|
|
1186
|
+
The `k`-split functions are a basis for the space of `k`-bounded
|
|
1187
|
+
symmetric functions that also have the bases
|
|
1188
|
+
|
|
1189
|
+
.. MATH::
|
|
1190
|
+
|
|
1191
|
+
\{ Q'_{\lambda}[X;t] \}_{\lambda_1\le k} =
|
|
1192
|
+
\{ s_{\lambda}^{(k)}[X;t] \}_{\lambda_1 \le k}
|
|
1193
|
+
|
|
1194
|
+
where `Q'_\lambda[X;t]` are the Hall-Littlewood symmetric functions
|
|
1195
|
+
(using the notation of [MAC]_) and `s_{\lambda}^{(k)}[X;t]` are the
|
|
1196
|
+
`k`-Schur functions. If `t` is not a root of unity, then
|
|
1197
|
+
|
|
1198
|
+
.. MATH::
|
|
1199
|
+
|
|
1200
|
+
\{ s_{\lambda}[X/(1-t)] \}_{\lambda_1\le k}
|
|
1201
|
+
|
|
1202
|
+
is also a basis of this space.
|
|
1203
|
+
|
|
1204
|
+
The `k`-split basis has the property that `Q'_\lambda[X;t]` expands
|
|
1205
|
+
positively in the `k`-split basis and the `k`-split basis
|
|
1206
|
+
conjecturally expands positively in the `k`-Schur functions.
|
|
1207
|
+
See [LLMSSZ]_ p. 81.
|
|
1208
|
+
|
|
1209
|
+
The `k`-split basis is defined recursively using the
|
|
1210
|
+
Hall-Littlewood creation operator defined in [SZ2001]_. If a
|
|
1211
|
+
partition ``la`` is the concatenation (as lists) of a partition ``mu``
|
|
1212
|
+
and ``nu`` where ``mu`` has maximal hook length equal to ``k``
|
|
1213
|
+
then ``ksp(la) = ksp(nu).hl_creation_operator(mu)``. If the
|
|
1214
|
+
hook length of ``la`` is less than or equal to ``k``, then
|
|
1215
|
+
``ksp(la)`` is equal to the Schur function indexed by ``la``.
|
|
1216
|
+
|
|
1217
|
+
EXAMPLES::
|
|
1218
|
+
|
|
1219
|
+
sage: Symt = SymmetricFunctions(QQ['t'].fraction_field())
|
|
1220
|
+
sage: kBS3 = Symt.kBoundedSubspace(3)
|
|
1221
|
+
sage: ks3 = kBS3.kschur()
|
|
1222
|
+
sage: ksp3 = kBS3.ksplit()
|
|
1223
|
+
sage: ks3(ksp3[2,1,1])
|
|
1224
|
+
ks3[2, 1, 1] + t*ks3[2, 2]
|
|
1225
|
+
sage: ksp3(ks3[2,1,1])
|
|
1226
|
+
ksp3[2, 1, 1] - t*ksp3[2, 2]
|
|
1227
|
+
sage: ksp3[2,1]*ksp3[1]
|
|
1228
|
+
s[2, 1, 1] + s[2, 2] + s[3, 1]
|
|
1229
|
+
sage: ksp3[2,1].hl_creation_operator([1])
|
|
1230
|
+
t*ksp3[2, 1, 1] + (-t^2+t)*ksp3[2, 2]
|
|
1231
|
+
|
|
1232
|
+
sage: Qp = Symt.hall_littlewood().Qp()
|
|
1233
|
+
sage: ksp3(Qp[3,2,1])
|
|
1234
|
+
ksp3[3, 2, 1] + t*ksp3[3, 3]
|
|
1235
|
+
|
|
1236
|
+
sage: kBS4 = Symt.kBoundedSubspace(4)
|
|
1237
|
+
sage: ksp4 = kBS4.ksplit()
|
|
1238
|
+
sage: ksp4(ksp3([3,2,1]))
|
|
1239
|
+
ksp4[3, 2, 1] - t*ksp4[3, 3] + t*ksp4[4, 1, 1]
|
|
1240
|
+
sage: ks4 = kBS4.kschur()
|
|
1241
|
+
sage: ks4(ksp4[3,2,2,1])
|
|
1242
|
+
ks4[3, 2, 2, 1] + t*ks4[3, 3, 1, 1] + t*ks4[3, 3, 2]
|
|
1243
|
+
"""
|
|
1244
|
+
CombinatorialFreeModule.__init__(self, kBoundedRing.base_ring(),
|
|
1245
|
+
kBoundedRing.indices(),
|
|
1246
|
+
category=KBoundedSubspaceBases(kBoundedRing, kBoundedRing.t),
|
|
1247
|
+
prefix='ksp%d' % kBoundedRing.k)
|
|
1248
|
+
|
|
1249
|
+
self._kBoundedRing = kBoundedRing
|
|
1250
|
+
|
|
1251
|
+
self.k = kBoundedRing.k
|
|
1252
|
+
self.t = kBoundedRing.t
|
|
1253
|
+
|
|
1254
|
+
s = self.realization_of().ambient().schur()
|
|
1255
|
+
|
|
1256
|
+
self.ambient = ConstantFunction(s)
|
|
1257
|
+
|
|
1258
|
+
self.lift = self._module_morphism(self._to_schur_on_basis,
|
|
1259
|
+
codomain=s, triangular='lower', unitriangular=True,
|
|
1260
|
+
inverse_on_support=lambda p: p if p.get_part(0) <= self.k else None)
|
|
1261
|
+
|
|
1262
|
+
self.lift.register_as_coercion()
|
|
1263
|
+
|
|
1264
|
+
self.retract = SetMorphism(Hom(s, self, SetsWithPartialMaps()),
|
|
1265
|
+
self.lift.preimage)
|
|
1266
|
+
self.register_conversion(self.retract)
|
|
1267
|
+
|
|
1268
|
+
# The following are meant to be inherited with the category framework, but
|
|
1269
|
+
# this fails because they are methods of Parent. The trick below overcomes
|
|
1270
|
+
# this problem.
|
|
1271
|
+
__getitem__ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "__getitem__")
|
|
1272
|
+
_repr_term = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_repr_term")
|
|
1273
|
+
_convert_map_from_ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_convert_map_from_")
|
|
1274
|
+
_element_constructor_ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_element_constructor_")
|
|
1275
|
+
|
|
1276
|
+
def _repr_(self):
|
|
1277
|
+
r"""
|
|
1278
|
+
Representation of ``self``.
|
|
1279
|
+
|
|
1280
|
+
EXAMPLES::
|
|
1281
|
+
|
|
1282
|
+
sage: SymmetricFunctions(QQ).kBoundedSubspace(3,1).ksplit()
|
|
1283
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the
|
|
1284
|
+
3-split basis
|
|
1285
|
+
sage: SymmetricFunctions(QQ['t']).kBoundedSubspace(3).ksplit()
|
|
1286
|
+
3-bounded Symmetric Functions over Univariate Polynomial Ring in t over
|
|
1287
|
+
Rational Field in the 3-split basis
|
|
1288
|
+
"""
|
|
1289
|
+
return self.realization_of()._repr_() + ' in the %s-split basis' % (self.k)
|
|
1290
|
+
|
|
1291
|
+
@cached_method
|
|
1292
|
+
def _to_schur_on_basis(self, p):
|
|
1293
|
+
r"""
|
|
1294
|
+
Compute the change of basis of `k`-split functions to Schur functions.
|
|
1295
|
+
|
|
1296
|
+
When `t=1` the `k`-split basis is the product of the Schur functions
|
|
1297
|
+
indexed by the partitions in the `k`-split of the partition.
|
|
1298
|
+
For `t \neq 1`, the elements are computed using the Hall-Littlewood
|
|
1299
|
+
creation operator defined in [SZ2001]_.
|
|
1300
|
+
|
|
1301
|
+
.. MATH::
|
|
1302
|
+
|
|
1303
|
+
ksplit_\lambda = {\mathbb H}^t_{\nu^{(1)}} \cdots
|
|
1304
|
+
{\mathbb H}^t_{\nu^{(r)}} 1
|
|
1305
|
+
|
|
1306
|
+
where the operator `{\mathbb H}^t_{\nu}` is implemented in the method
|
|
1307
|
+
``hl_creation_operator`` and the `k`-split of the partition `\lambda`
|
|
1308
|
+
is `(\nu^{(1)}, \ldots, \nu^{(r)})`.
|
|
1309
|
+
|
|
1310
|
+
INPUT:
|
|
1311
|
+
|
|
1312
|
+
- ``p`` -- a partition
|
|
1313
|
+
|
|
1314
|
+
EXAMPLES::
|
|
1315
|
+
|
|
1316
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
1317
|
+
sage: s = Sym.s()
|
|
1318
|
+
sage: ksp3 = Sym.kBoundedSubspace(3,1).ksplit()
|
|
1319
|
+
sage: ksp3._to_schur_on_basis(Partition([2,1,1,1]))
|
|
1320
|
+
s[2, 1, 1, 1] + s[2, 2, 1] + s[3, 1, 1] + s[3, 2]
|
|
1321
|
+
"""
|
|
1322
|
+
s = self.realization_of().ambient().schur()
|
|
1323
|
+
if self.t == 1: # if t==1, then it is computed with products
|
|
1324
|
+
return s.prod(s(g) for g in Partition(p).k_split(self.k))
|
|
1325
|
+
if not p:
|
|
1326
|
+
return s(p)
|
|
1327
|
+
ksp = Partition(p).k_split(self.k)
|
|
1328
|
+
out = s(ksp[-1])
|
|
1329
|
+
for r in range(len(ksp) - 1):
|
|
1330
|
+
out = out.hl_creation_operator(ksp[-r - 2], t=self.t)
|
|
1331
|
+
return out
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
class kHomogeneous(CombinatorialFreeModule):
|
|
1335
|
+
r"""
|
|
1336
|
+
Space of `k`-bounded homogeneous symmetric functions.
|
|
1337
|
+
|
|
1338
|
+
EXAMPLES::
|
|
1339
|
+
|
|
1340
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
1341
|
+
sage: kH = Sym.khomogeneous(3)
|
|
1342
|
+
sage: kH[2]
|
|
1343
|
+
h3[2]
|
|
1344
|
+
sage: kH[2].lift()
|
|
1345
|
+
h[2]
|
|
1346
|
+
"""
|
|
1347
|
+
|
|
1348
|
+
def __init__(self, kBoundedRing):
|
|
1349
|
+
r"""
|
|
1350
|
+
TESTS::
|
|
1351
|
+
|
|
1352
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
1353
|
+
sage: from sage.combinat.sf.new_kschur import kHomogeneous
|
|
1354
|
+
sage: KB = Sym.kBoundedSubspace(3,t=1)
|
|
1355
|
+
sage: kHomogeneous(KB)
|
|
1356
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the 3-bounded homogeneous basis
|
|
1357
|
+
"""
|
|
1358
|
+
CombinatorialFreeModule.__init__(self, kBoundedRing.base_ring(),
|
|
1359
|
+
kBoundedRing.indices(),
|
|
1360
|
+
category=KBoundedSubspaceBases(kBoundedRing, kBoundedRing.t),
|
|
1361
|
+
prefix='h%d' % kBoundedRing.k)
|
|
1362
|
+
|
|
1363
|
+
self._kBoundedRing = kBoundedRing
|
|
1364
|
+
|
|
1365
|
+
self.k = kBoundedRing.k
|
|
1366
|
+
self.t = 1
|
|
1367
|
+
|
|
1368
|
+
h = self.realization_of().ambient().homogeneous()
|
|
1369
|
+
|
|
1370
|
+
self.lift = self._module_morphism(lambda x: h[x],
|
|
1371
|
+
codomain=h, triangular='lower', unitriangular=True,
|
|
1372
|
+
inverse_on_support=lambda p: p if p.get_part(0) <= self.k else None)
|
|
1373
|
+
|
|
1374
|
+
self.ambient = ConstantFunction(h)
|
|
1375
|
+
|
|
1376
|
+
self.lift.register_as_coercion()
|
|
1377
|
+
|
|
1378
|
+
self.retract = SetMorphism(Hom(h, self, SetsWithPartialMaps()),
|
|
1379
|
+
self.lift.preimage)
|
|
1380
|
+
self.register_conversion(self.retract)
|
|
1381
|
+
|
|
1382
|
+
# The following are meant to be inherited with the category framework, but
|
|
1383
|
+
# this fails because they are methods of Parent. The trick below overcomes
|
|
1384
|
+
# this problem.
|
|
1385
|
+
__getitem__ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "__getitem__")
|
|
1386
|
+
_repr_term = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_repr_term")
|
|
1387
|
+
_convert_map_from_ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_convert_map_from_")
|
|
1388
|
+
_element_constructor_ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_element_constructor_")
|
|
1389
|
+
|
|
1390
|
+
def _repr_(self):
|
|
1391
|
+
"""
|
|
1392
|
+
TESTS::
|
|
1393
|
+
|
|
1394
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
1395
|
+
sage: kH = Sym.khomogeneous(3)
|
|
1396
|
+
sage: kH._repr_()
|
|
1397
|
+
'3-bounded Symmetric Functions over Rational Field with t=1 in the 3-bounded homogeneous basis'
|
|
1398
|
+
"""
|
|
1399
|
+
return self.realization_of()._repr_() + ' in the %s-bounded homogeneous basis' % (self.k)
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
class K_kSchur(CombinatorialFreeModule):
|
|
1403
|
+
r"""
|
|
1404
|
+
This class implements the basis of the `k`-bounded subspace called the K-`k`-Schur basis.
|
|
1405
|
+
|
|
1406
|
+
See [Morse2011]_, [LamSchillingShimozono2010]_.
|
|
1407
|
+
|
|
1408
|
+
REFERENCES:
|
|
1409
|
+
|
|
1410
|
+
.. [Morse2011] \J. Morse, Combinatorics of the K-theory of affine Grassmannians,
|
|
1411
|
+
Adv. in Math., Volume 229, Issue 5, pp. 2950--2984.
|
|
1412
|
+
|
|
1413
|
+
.. [LamSchillingShimozono2010] \T. Lam, A. Schilling, M.Shimozono, K-theory Schubert calculus of the affine Grassmannian,
|
|
1414
|
+
Compositio Math. 146 (2010), 811-852.
|
|
1415
|
+
"""
|
|
1416
|
+
|
|
1417
|
+
def __init__(self, kBoundedRing):
|
|
1418
|
+
r"""
|
|
1419
|
+
TESTS::
|
|
1420
|
+
|
|
1421
|
+
sage: from sage.combinat.sf.new_kschur import K_kSchur
|
|
1422
|
+
sage: kB = SymmetricFunctions(QQ).kBoundedSubspace(3,1)
|
|
1423
|
+
sage: g = K_kSchur(kB)
|
|
1424
|
+
sage: g
|
|
1425
|
+
3-bounded Symmetric Functions over Rational Field with t=1 in the K-3-Schur basis
|
|
1426
|
+
sage: g[2,1]*g[1] # takes a while but caches stuff
|
|
1427
|
+
-2*Kks3[2, 1] + Kks3[2, 1, 1] + Kks3[2, 2]
|
|
1428
|
+
sage: g([])
|
|
1429
|
+
Kks3[]
|
|
1430
|
+
sage: TestSuite(g).run() # long time (11s on sage.math, 2013)
|
|
1431
|
+
sage: h = SymmetricFunctions(QQ).h()
|
|
1432
|
+
sage: g(h[1,1])
|
|
1433
|
+
-Kks3[1] + Kks3[1, 1] + Kks3[2]
|
|
1434
|
+
"""
|
|
1435
|
+
CombinatorialFreeModule.__init__(self, kBoundedRing.base_ring(),
|
|
1436
|
+
kBoundedRing.indices(),
|
|
1437
|
+
category=KBoundedSubspaceBases(kBoundedRing, kBoundedRing.base_ring().one()),
|
|
1438
|
+
prefix='Kks%d' % kBoundedRing.k)
|
|
1439
|
+
|
|
1440
|
+
self._kBoundedRing = kBoundedRing
|
|
1441
|
+
|
|
1442
|
+
self.k = kBoundedRing.k
|
|
1443
|
+
self.t = 1
|
|
1444
|
+
|
|
1445
|
+
s = self.realization_of().ambient().schur()
|
|
1446
|
+
|
|
1447
|
+
self.ambient = ConstantFunction(s)
|
|
1448
|
+
kh = self.realization_of().khomogeneous()
|
|
1449
|
+
g_to_kh = self.module_morphism(self._g_to_kh_on_basis, codomain=kh)
|
|
1450
|
+
g_to_kh.register_as_coercion()
|
|
1451
|
+
kh_to_g = kh.module_morphism(self._kh_to_g_on_basis, codomain=self)
|
|
1452
|
+
kh_to_g.register_as_coercion()
|
|
1453
|
+
h = self.realization_of().ambient().h()
|
|
1454
|
+
lift = self._module_morphism(self.lift, triangular='lower', unitriangular=True, codomain=h)
|
|
1455
|
+
lift.register_as_coercion()
|
|
1456
|
+
retract = h._module_morphism(self.retract, codomain=self)
|
|
1457
|
+
# retract = SetMorphism(Hom(h, self, SetsWithPartialMaps()), lift.preimage)
|
|
1458
|
+
self.register_conversion(retract)
|
|
1459
|
+
|
|
1460
|
+
# The following are meant to be inherited with the category framework, but
|
|
1461
|
+
# this fails because they are methods of Parent. The trick below overcomes
|
|
1462
|
+
# this problem.
|
|
1463
|
+
__getitem__ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "__getitem__")
|
|
1464
|
+
_repr_term = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_repr_term")
|
|
1465
|
+
_element_constructor_ = raw_getattr(KBoundedSubspaceBases.ParentMethods, "_element_constructor_")
|
|
1466
|
+
|
|
1467
|
+
def _repr_(self):
|
|
1468
|
+
r"""
|
|
1469
|
+
TESTS::
|
|
1470
|
+
|
|
1471
|
+
sage: Sym = SymmetricFunctions(QQ)
|
|
1472
|
+
sage: kB = Sym.kBoundedSubspace(3,1)
|
|
1473
|
+
sage: g = kB.K_kschur()
|
|
1474
|
+
sage: g._repr_()
|
|
1475
|
+
'3-bounded Symmetric Functions over Rational Field with t=1 in the K-3-Schur basis'
|
|
1476
|
+
"""
|
|
1477
|
+
return self.realization_of()._repr_() + ' in the K-%s-Schur basis' % (self.k)
|
|
1478
|
+
|
|
1479
|
+
def _homogeneous_generators_noncommutative_variables_zero_Hecke(self, r):
|
|
1480
|
+
r"""
|
|
1481
|
+
Return the `r`-th homogeneous generator, viewed as an element inside the
|
|
1482
|
+
affine zero Hecke algebra.
|
|
1483
|
+
|
|
1484
|
+
This is the sum of all cyclically decreasing elements of order `r`.
|
|
1485
|
+
|
|
1486
|
+
INPUT:
|
|
1487
|
+
|
|
1488
|
+
- ``r`` -- positive integer
|
|
1489
|
+
|
|
1490
|
+
OUTPUT: an element of the affine zero Hecke algebra
|
|
1491
|
+
|
|
1492
|
+
EXAMPLES::
|
|
1493
|
+
|
|
1494
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1495
|
+
sage: g._homogeneous_generators_noncommutative_variables_zero_Hecke(2)
|
|
1496
|
+
T[1,0] + T[2,0] + T[0,3] + T[3,2] + T[3,1] + T[2,1]
|
|
1497
|
+
sage: g._homogeneous_generators_noncommutative_variables_zero_Hecke(0)
|
|
1498
|
+
1
|
|
1499
|
+
"""
|
|
1500
|
+
from sage.algebras.iwahori_hecke_algebra import IwahoriHeckeAlgebra
|
|
1501
|
+
from sage.combinat.root_system.weyl_group import WeylGroup
|
|
1502
|
+
W = WeylGroup(['A', self.k, 1])
|
|
1503
|
+
H = IwahoriHeckeAlgebra(W, 0, base_ring=self.base_ring()).T()
|
|
1504
|
+
Hgens = H.algebra_generators()
|
|
1505
|
+
S = [w.reduced_word() for w in W.pieri_factors() if w.length() == r]
|
|
1506
|
+
return sum((prod((Hgens[i] for i in w), 1) for w in S), 0)
|
|
1507
|
+
|
|
1508
|
+
@cached_method
|
|
1509
|
+
def _homogeneous_basis(self, la):
|
|
1510
|
+
r"""
|
|
1511
|
+
Return the homogeneous basis element indexed by ``la``, viewed as an element
|
|
1512
|
+
inside the affine zero Hecke algebra. This method is only here for caching purposes.
|
|
1513
|
+
|
|
1514
|
+
INPUT:
|
|
1515
|
+
|
|
1516
|
+
- ``la`` -- a `k`-bounded partition
|
|
1517
|
+
|
|
1518
|
+
OUTPUT: an element of the affine zero Hecke algebra
|
|
1519
|
+
|
|
1520
|
+
EXAMPLES::
|
|
1521
|
+
|
|
1522
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1523
|
+
sage: g._homogeneous_basis(Partition([2,1]))
|
|
1524
|
+
T[2,1,0] + T[3,1,0] + T[1,2,0] + T[3,2,0] + T[0,1,0] + T[2,0,1] + T[1,0,3] + T[0,3,0] + T[2,0,3] + T[0,3,2] + T[0,3,1] + T[2,3,2] + T[3,2,1] + T[2,3,1] + T[3,1,2] + T[1,2,1] - T[1,0] - 2*T[2,0] - T[0,3] - T[3,2] - 2*T[3,1] - T[2,1]
|
|
1525
|
+
sage: g._homogeneous_basis(Partition([]))
|
|
1526
|
+
1
|
|
1527
|
+
"""
|
|
1528
|
+
return prod(self._homogeneous_generators_noncommutative_variables_zero_Hecke(la[i]) for i in range(len(la)))
|
|
1529
|
+
|
|
1530
|
+
def homogeneous_basis_noncommutative_variables_zero_Hecke(self, la):
|
|
1531
|
+
r"""
|
|
1532
|
+
Return the homogeneous basis element indexed by ``la``, viewed as an element
|
|
1533
|
+
inside the affine zero Hecke algebra. For the code, see method _homogeneous_basis.
|
|
1534
|
+
|
|
1535
|
+
INPUT:
|
|
1536
|
+
|
|
1537
|
+
- ``la`` -- a `k`-bounded partition
|
|
1538
|
+
|
|
1539
|
+
OUTPUT: an element of the affine zero Hecke algebra
|
|
1540
|
+
|
|
1541
|
+
EXAMPLES::
|
|
1542
|
+
|
|
1543
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1544
|
+
sage: g.homogeneous_basis_noncommutative_variables_zero_Hecke([2,1])
|
|
1545
|
+
T[2,1,0] + T[3,1,0] + T[1,2,0] + T[3,2,0] + T[0,1,0] + T[2,0,1] + T[1,0,3] + T[0,3,0] + T[2,0,3] + T[0,3,2] + T[0,3,1] + T[2,3,2] + T[3,2,1] + T[2,3,1] + T[3,1,2] + T[1,2,1] - T[1,0] - 2*T[2,0] - T[0,3] - T[3,2] - 2*T[3,1] - T[2,1]
|
|
1546
|
+
sage: g.homogeneous_basis_noncommutative_variables_zero_Hecke([])
|
|
1547
|
+
1
|
|
1548
|
+
"""
|
|
1549
|
+
return self._homogeneous_basis(Partition(la))
|
|
1550
|
+
|
|
1551
|
+
@cached_method
|
|
1552
|
+
def _DualGrothMatrix(self, m):
|
|
1553
|
+
r"""
|
|
1554
|
+
Return the change of basis matrix between the K_kschur basis and the `k`-bounded
|
|
1555
|
+
homogeneous basis.
|
|
1556
|
+
|
|
1557
|
+
INPUT:
|
|
1558
|
+
|
|
1559
|
+
- ``m`` -- integer
|
|
1560
|
+
|
|
1561
|
+
OUTPUT: a matrix
|
|
1562
|
+
|
|
1563
|
+
EXAMPLES::
|
|
1564
|
+
|
|
1565
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1566
|
+
sage: g._DualGrothMatrix(3)
|
|
1567
|
+
[ 1 1 1 0 0 0 0]
|
|
1568
|
+
[ 0 1 2 0 0 0 0]
|
|
1569
|
+
[ 0 0 1 0 0 0 0]
|
|
1570
|
+
[ 0 -1 -2 1 1 0 0]
|
|
1571
|
+
[ 0 0 -2 0 1 0 0]
|
|
1572
|
+
[ 0 0 1 0 -1 1 0]
|
|
1573
|
+
[ 0 0 0 0 0 0 1]
|
|
1574
|
+
sage: g._DualGrothMatrix(0)
|
|
1575
|
+
[1]
|
|
1576
|
+
"""
|
|
1577
|
+
new_mat = []
|
|
1578
|
+
Sym = SymmetricFunctions(self.base_ring())
|
|
1579
|
+
Q = Sym.kBoundedQuotient(self.k, t=1)
|
|
1580
|
+
mon = Q.km()
|
|
1581
|
+
G = Q.AffineGrothendieckPolynomial
|
|
1582
|
+
for i in range(m + 1):
|
|
1583
|
+
for x in Partitions(m - i, max_part=self.k):
|
|
1584
|
+
f = mon(G(x, m))
|
|
1585
|
+
vec = [f.coefficient(y) for j in range(m + 1)
|
|
1586
|
+
for y in Partitions(m - j, max_part=self.k)]
|
|
1587
|
+
new_mat.append(vec)
|
|
1588
|
+
from sage.matrix.constructor import Matrix
|
|
1589
|
+
return Matrix(new_mat)
|
|
1590
|
+
|
|
1591
|
+
@cached_method
|
|
1592
|
+
def _DualGrothendieck(self, la):
|
|
1593
|
+
r"""
|
|
1594
|
+
Return the expansion of the K-`k`-Schur function in the homogeneous basis. This
|
|
1595
|
+
method is here for caching purposes.
|
|
1596
|
+
|
|
1597
|
+
INPUT:
|
|
1598
|
+
|
|
1599
|
+
- ``la`` -- a `k`-bounded partition
|
|
1600
|
+
|
|
1601
|
+
OUTPUT: a symmetric function in the homogeneous basis
|
|
1602
|
+
|
|
1603
|
+
EXAMPLES::
|
|
1604
|
+
|
|
1605
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1606
|
+
sage: g._DualGrothendieck(Partition([2,1]))
|
|
1607
|
+
h[2] + h[2, 1] - h[3]
|
|
1608
|
+
sage: g._DualGrothendieck(Partition([]))
|
|
1609
|
+
h[]
|
|
1610
|
+
sage: g._DualGrothendieck(Partition([4,1])) # long time (5s on sage.math, 2013)
|
|
1611
|
+
0
|
|
1612
|
+
"""
|
|
1613
|
+
m = la.size()
|
|
1614
|
+
h = SymmetricFunctions(self.base_ring()).h()
|
|
1615
|
+
M = self._DualGrothMatrix(m)
|
|
1616
|
+
vec = []
|
|
1617
|
+
for i in range(m + 1):
|
|
1618
|
+
for x in Partitions(m - i, max_part=self.k):
|
|
1619
|
+
if x == la:
|
|
1620
|
+
vec.append(1)
|
|
1621
|
+
else:
|
|
1622
|
+
vec.append(0)
|
|
1623
|
+
from sage.modules.free_module_element import vector
|
|
1624
|
+
vec = vector(vec)
|
|
1625
|
+
sol = M.solve_right(vec)
|
|
1626
|
+
new_function = h.zero()
|
|
1627
|
+
count = 0
|
|
1628
|
+
for i in range(m + 1):
|
|
1629
|
+
for x in Partitions(m - i, max_part=self.k):
|
|
1630
|
+
new_function += h(x) * sol[count]
|
|
1631
|
+
count += 1
|
|
1632
|
+
return new_function
|
|
1633
|
+
|
|
1634
|
+
def _g_to_kh_on_basis(self, la):
|
|
1635
|
+
r"""
|
|
1636
|
+
Return the expansion of the K-`k`-Schur function in the homogeneous basis.
|
|
1637
|
+
|
|
1638
|
+
See method :meth:`_DualGrothendieck` for the code.
|
|
1639
|
+
|
|
1640
|
+
INPUT:
|
|
1641
|
+
|
|
1642
|
+
- ``la`` -- a `k`-bounded partition
|
|
1643
|
+
|
|
1644
|
+
OUTPUT: a symmetric function in the homogeneous basis
|
|
1645
|
+
|
|
1646
|
+
EXAMPLES::
|
|
1647
|
+
|
|
1648
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1649
|
+
sage: g._g_to_kh_on_basis([2,1])
|
|
1650
|
+
h[2] + h[2, 1] - h[3]
|
|
1651
|
+
sage: g._g_to_kh_on_basis([])
|
|
1652
|
+
h[]
|
|
1653
|
+
sage: g._g_to_kh_on_basis([4,1])
|
|
1654
|
+
Traceback (most recent call last):
|
|
1655
|
+
...
|
|
1656
|
+
ValueError: Partition should be 3-bounded
|
|
1657
|
+
"""
|
|
1658
|
+
if la and la[0] > self.k:
|
|
1659
|
+
raise ValueError("Partition should be %d-bounded" % self.k)
|
|
1660
|
+
return self._DualGrothendieck(Partition(la))
|
|
1661
|
+
|
|
1662
|
+
def K_k_Schur_non_commutative_variables(self, la):
|
|
1663
|
+
r"""
|
|
1664
|
+
Return the K-`k`-Schur function, as embedded inside the affine zero Hecke algebra.
|
|
1665
|
+
|
|
1666
|
+
INPUT:
|
|
1667
|
+
|
|
1668
|
+
- ``la`` -- a `k`-bounded Partition
|
|
1669
|
+
|
|
1670
|
+
OUTPUT: an element of the affine zero Hecke algebra
|
|
1671
|
+
|
|
1672
|
+
EXAMPLES::
|
|
1673
|
+
|
|
1674
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1675
|
+
sage: g.K_k_Schur_non_commutative_variables([2,1])
|
|
1676
|
+
T[3,1,0] + T[1,2,0] + T[3,2,0] + T[0,1,0] + T[2,0,1] + T[0,3,0] + T[2,0,3] + T[0,3,1] + T[2,3,2] + T[2,3,1] + T[3,1,2] + T[1,2,1] - T[2,0] - T[3,1]
|
|
1677
|
+
sage: g.K_k_Schur_non_commutative_variables([])
|
|
1678
|
+
1
|
|
1679
|
+
sage: g.K_k_Schur_non_commutative_variables([4,1])
|
|
1680
|
+
Traceback (most recent call last):
|
|
1681
|
+
...
|
|
1682
|
+
ValueError: Partition should be 3-bounded
|
|
1683
|
+
"""
|
|
1684
|
+
SF = SymmetricFunctions(self.base_ring())
|
|
1685
|
+
h = SF.h()
|
|
1686
|
+
S = h(self._g_to_kh_on_basis(la)).support()
|
|
1687
|
+
return sum(h(self._g_to_kh_on_basis(la)).coefficient(x) * self.homogeneous_basis_noncommutative_variables_zero_Hecke(x) for x in S)
|
|
1688
|
+
|
|
1689
|
+
def _kh_to_g_on_basis(self, la):
|
|
1690
|
+
r"""
|
|
1691
|
+
Given a `k`-homogeneous basis element, this returns the element written in the
|
|
1692
|
+
K-`k`-Schur basis.
|
|
1693
|
+
|
|
1694
|
+
INPUT:
|
|
1695
|
+
|
|
1696
|
+
- ``la`` -- a `k`-bounded partition
|
|
1697
|
+
|
|
1698
|
+
OUTPUT: an element of the `k`-bounded subspace, written in the K-`k`-Schur basis
|
|
1699
|
+
|
|
1700
|
+
EXAMPLES::
|
|
1701
|
+
|
|
1702
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1703
|
+
sage: g._kh_to_g_on_basis([2,1])
|
|
1704
|
+
-Kks3[2] + Kks3[2, 1] + Kks3[3]
|
|
1705
|
+
sage: g._kh_to_g_on_basis([])
|
|
1706
|
+
Kks3[]
|
|
1707
|
+
sage: g._kh_to_g_on_basis([4,1])
|
|
1708
|
+
Traceback (most recent call last):
|
|
1709
|
+
...
|
|
1710
|
+
TypeError: do not know how to make x (= [4, 1]) an element of self (=3-bounded Symmetric Functions over Rational Field with t=1 in the K-3-Schur basis)
|
|
1711
|
+
"""
|
|
1712
|
+
if not la:
|
|
1713
|
+
return self([])
|
|
1714
|
+
h = self.realization_of().khomogeneous()
|
|
1715
|
+
f = h(self(la)) - h(la)
|
|
1716
|
+
return self(la) - sum(self._kh_to_g_on_basis(x) * f.coefficient(x)
|
|
1717
|
+
for x in f.support())
|
|
1718
|
+
|
|
1719
|
+
def product(self, x, y):
|
|
1720
|
+
r"""
|
|
1721
|
+
Return the product of the two K-`k`-Schur functions.
|
|
1722
|
+
|
|
1723
|
+
INPUT:
|
|
1724
|
+
|
|
1725
|
+
- ``x``, ``y`` -- elements of the `k`-bounded subspace, in the K-`k`-Schur basis
|
|
1726
|
+
|
|
1727
|
+
OUTPUT: an element of the `k`-bounded subspace, in the K-`k`-Schur basis
|
|
1728
|
+
|
|
1729
|
+
EXAMPLES::
|
|
1730
|
+
|
|
1731
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1732
|
+
sage: g.product(g([2,1]), g[1])
|
|
1733
|
+
-2*Kks3[2, 1] + Kks3[2, 1, 1] + Kks3[2, 2]
|
|
1734
|
+
sage: g.product(g([2,1]), g([]))
|
|
1735
|
+
Kks3[2, 1]
|
|
1736
|
+
"""
|
|
1737
|
+
kh = self.realization_of().khomogeneous()
|
|
1738
|
+
return self(kh(x) * kh(y))
|
|
1739
|
+
|
|
1740
|
+
def lift(self, x):
|
|
1741
|
+
r"""
|
|
1742
|
+
Return the lift of a `k`-bounded symmetric function.
|
|
1743
|
+
|
|
1744
|
+
INPUT:
|
|
1745
|
+
|
|
1746
|
+
- ``x`` -- an expression in the K-`k`-Schur basis. Equivalently, ``x`` can be a
|
|
1747
|
+
`k`-bounded partition (then ``x`` corresponds to the basis element indexed by ``x``)
|
|
1748
|
+
|
|
1749
|
+
OUTPUT: a symmetric function
|
|
1750
|
+
|
|
1751
|
+
EXAMPLES::
|
|
1752
|
+
|
|
1753
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1754
|
+
sage: g.lift([2,1])
|
|
1755
|
+
h[2] + h[2, 1] - h[3]
|
|
1756
|
+
sage: g.lift([])
|
|
1757
|
+
h[]
|
|
1758
|
+
sage: g.lift([4,1])
|
|
1759
|
+
Traceback (most recent call last):
|
|
1760
|
+
...
|
|
1761
|
+
TypeError: do not know how to make x (= [4, 1]) an element of self (=3-bounded Symmetric Functions over Rational Field with t=1 in the K-3-Schur basis)
|
|
1762
|
+
"""
|
|
1763
|
+
kh = self.realization_of().khomogeneous()
|
|
1764
|
+
return kh(self(x)).lift()
|
|
1765
|
+
|
|
1766
|
+
def retract(self, x):
|
|
1767
|
+
r"""
|
|
1768
|
+
Return the retract of a symmetric function.
|
|
1769
|
+
|
|
1770
|
+
INPUT:
|
|
1771
|
+
|
|
1772
|
+
- ``x`` -- a symmetric function
|
|
1773
|
+
|
|
1774
|
+
OUTPUT: a `k`-bounded symmetric function in the K-`k`-Schur basis
|
|
1775
|
+
|
|
1776
|
+
EXAMPLES::
|
|
1777
|
+
|
|
1778
|
+
sage: g = SymmetricFunctions(QQ).kBoundedSubspace(3,1).K_kschur()
|
|
1779
|
+
sage: m = SymmetricFunctions(QQ).m()
|
|
1780
|
+
sage: g.retract(m[2,1])
|
|
1781
|
+
-2*Kks3[1] + 4*Kks3[1, 1] - 2*Kks3[1, 1, 1] - Kks3[2] + Kks3[2, 1]
|
|
1782
|
+
sage: g.retract(m([]))
|
|
1783
|
+
Kks3[]
|
|
1784
|
+
"""
|
|
1785
|
+
kh = self.realization_of().khomogeneous()
|
|
1786
|
+
return self(kh.retract(x))
|