passagemath-combinat 10.6.42__cp314-cp314t-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- passagemath_combinat/__init__.py +3 -0
- passagemath_combinat-10.6.42.dist-info/DELVEWHEEL +2 -0
- passagemath_combinat-10.6.42.dist-info/METADATA +160 -0
- passagemath_combinat-10.6.42.dist-info/RECORD +401 -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-10-3a5f019e2510aeaad918cab2b57a689d.dll +0 -0
- passagemath_combinat.libs/libsymmetrica-3-7dcf900932804d0df5fd0919b4668720.dll +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 +44 -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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +0 -0
- sage/combinat/debruijn_sequence.pyx +355 -0
- sage/combinat/decorated_permutation.py +270 -0
- sage/combinat/degree_sequences.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +0 -0
- sage/combinat/expnums.pyx +148 -0
- sage/combinat/fast_vector_partitions.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +0 -0
- sage/combinat/words/word_char.pyx +847 -0
- sage/combinat/words/word_datatypes.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +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.cp314t-win_amd64.pyd +0 -0
- sage/sat/solvers/satsolver.pxd +3 -0
- sage/sat/solvers/satsolver.pyx +405 -0
|
@@ -0,0 +1,860 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-combinat
|
|
2
|
+
r"""
|
|
3
|
+
Residue sequences of tableaux
|
|
4
|
+
|
|
5
|
+
A *residue sequence* for a :class:`~sage.combinat.tableau.StandardTableau`, or
|
|
6
|
+
:class:`~sage.combinat.tableau_tuple.StandardTableauTuple`, of size `n` is an
|
|
7
|
+
`n`-tuple `(i_1, i_2, \ldots, i_n)` of elements of `\ZZ / e\ZZ` for some
|
|
8
|
+
positive integer `e \ge 1`. Such sequences arise in the representation
|
|
9
|
+
theory of the symmetric group and the closely related cyclotomic Hecke
|
|
10
|
+
algebras, and cyclotomic quiver Hecke algebras, where the residue sequences
|
|
11
|
+
play a similar role to weights in the representations of Lie groups and
|
|
12
|
+
Lie algebras. These Hecke algebras are semisimple when `e` is "large enough"
|
|
13
|
+
and in these cases residue sequences are essentially the same as content
|
|
14
|
+
sequences (see :meth:`sage.combinat.partition.Partition.content`) and it
|
|
15
|
+
is not difficult to see that residue sequences are in bijection with the
|
|
16
|
+
set of standard tableaux. In the non-semisimple case, when `e` is "small",
|
|
17
|
+
different standard tableaux can have the same residue sequence. In this
|
|
18
|
+
case the residue sequences describe how to decompose modules into
|
|
19
|
+
generalised eigenspaces for the Jucys-Murphy elements for these algebras.
|
|
20
|
+
|
|
21
|
+
By definition, if `t` is a :class:`~sage.combinat.tableau.StandardTableau` of
|
|
22
|
+
size `n` then the residue sequence of `t` is the `n`-tuple `(i_1, \ldots, i_n)`
|
|
23
|
+
where `i_m = c - r + e\ZZ`, if `m` appears in row `r` and column `c` of `t`.
|
|
24
|
+
If `p` is prime then such sequence arise in the representation theory of the
|
|
25
|
+
symmetric group n characteristic `p`. More generally, `e`-residue sequences
|
|
26
|
+
arise in he representation theory of the Iwahori-Hecke algebra (see
|
|
27
|
+
:class:`~sage.algebras.iwahori_hecke_algebra.IwahoriHeckeAlgebra`) the
|
|
28
|
+
symmetric group with Hecke parameter at an `e`-th root of unity.
|
|
29
|
+
|
|
30
|
+
More generally, the `e`-residue sequence of a
|
|
31
|
+
:class:`~sage.combinat.tableau.StandardTableau` of size `n` and level `l` is
|
|
32
|
+
the `n`-tuple `(i_1, \ldots, i_n)` determined by `e` and a *multicharge*
|
|
33
|
+
`\kappa = (\kappa_1, \ldots, \kappa_l)` by setting
|
|
34
|
+
`i_m = \kappa_k + c - r + e\ZZ`, if `m` appears in component `k`, row `r`
|
|
35
|
+
and column `c` of `t`. These sequences arise in the representation theory
|
|
36
|
+
of the cyclotomic Hecke algebras of type A, which are also known
|
|
37
|
+
as Ariki-Koike algebras.
|
|
38
|
+
|
|
39
|
+
The residue classes are constructed from standard tableaux::
|
|
40
|
+
|
|
41
|
+
sage: StandardTableau([[1,2],[3,4]]).residue_sequence(2)
|
|
42
|
+
2-residue sequence (0,1,1,0) with multicharge (0)
|
|
43
|
+
sage: StandardTableau([[1,2],[3,4]]).residue_sequence(3)
|
|
44
|
+
3-residue sequence (0,1,2,0) with multicharge (0)
|
|
45
|
+
|
|
46
|
+
sage: StandardTableauTuple([[[5]],[[1,2],[3,4]]]).residue_sequence(3,[0,0])
|
|
47
|
+
3-residue sequence (0,1,2,0,0) with multicharge (0,0)
|
|
48
|
+
sage: StandardTableauTuple([[[5]],[[1,2],[3,4]]]).residue_sequence(3,[0,1])
|
|
49
|
+
3-residue sequence (1,2,0,1,0) with multicharge (0,1)
|
|
50
|
+
sage: StandardTableauTuple([[[5]],[[1,2],[3,4]]]).residue_sequence(3,[0,2])
|
|
51
|
+
3-residue sequence (2,0,1,2,0) with multicharge (0,2)
|
|
52
|
+
|
|
53
|
+
One of the most useful functions of a :class:`ResidueSequence` is that it can
|
|
54
|
+
return the :class:`~sage.combinat.tableau_tuple.StandardTableaux_residue` and
|
|
55
|
+
:class:`~sage.combinat.tableau_tuple.StandardTableaux_residue_shape` that
|
|
56
|
+
contain all of the tableaux with this residue sequence. Again, these are best
|
|
57
|
+
accessed via the standard tableaux classes::
|
|
58
|
+
|
|
59
|
+
sage: res = StandardTableau([[1,2],[3,4]]).residue_sequence(2)
|
|
60
|
+
sage: res.standard_tableaux()
|
|
61
|
+
Standard tableaux with 2-residue sequence (0,1,1,0) and multicharge (0)
|
|
62
|
+
sage: res.standard_tableaux()[:]
|
|
63
|
+
[[[1, 2, 4], [3]],
|
|
64
|
+
[[1, 2], [3, 4]],
|
|
65
|
+
[[1, 2], [3], [4]],
|
|
66
|
+
[[1, 3, 4], [2]],
|
|
67
|
+
[[1, 3], [2, 4]],
|
|
68
|
+
[[1, 3], [2], [4]]]
|
|
69
|
+
sage: res.standard_tableaux(shape=[4])
|
|
70
|
+
Standard (4)-tableaux with 2-residue sequence (0,1,1,0) and multicharge (0)
|
|
71
|
+
sage: res.standard_tableaux(shape=[4])[:]
|
|
72
|
+
[]
|
|
73
|
+
|
|
74
|
+
sage: res=StandardTableauTuple([[[5]],[[1,2],[3,4]]]).residue_sequence(3,[0,0])
|
|
75
|
+
sage: res.standard_tableaux()
|
|
76
|
+
Standard tableaux with 3-residue sequence (0,1,2,0,0) and multicharge (0,0)
|
|
77
|
+
sage: res.standard_tableaux(shape=[[1],[2,2]])[:]
|
|
78
|
+
[([[5]], [[1, 2], [3, 4]]), ([[4]], [[1, 2], [3, 5]])]
|
|
79
|
+
|
|
80
|
+
These residue sequences are particularly useful in the graded representation
|
|
81
|
+
theory of the cyclotomic KLR algebras and the cyclotomic Hecke algebras of type~A;
|
|
82
|
+
see [DJM1998]_ and [BK2009]_.
|
|
83
|
+
|
|
84
|
+
This module implements the following classes:
|
|
85
|
+
|
|
86
|
+
* :class:`ResidueSequence`
|
|
87
|
+
* :class:`ResidueSequences`
|
|
88
|
+
|
|
89
|
+
.. SEEALSO::
|
|
90
|
+
|
|
91
|
+
* :class:`Partitions`
|
|
92
|
+
* :class:`PartitionTuples`
|
|
93
|
+
* :class:`~sage.combinat.tableau_tuple.StandardTableaux_residue`
|
|
94
|
+
* :class:`~sage.combinat.tableau_tuple.StandardTableaux_residue_shape`
|
|
95
|
+
* :class:`~sage.combinat.tableau_tuple.RowStandardTableauTuples_residue`
|
|
96
|
+
* :class:`~sage.combinat.tableau_tuple.RowStandardTableauTuples_residue_shape`
|
|
97
|
+
* :class:`StandardTableaux`
|
|
98
|
+
* :class:`StandardTableauTuples`
|
|
99
|
+
* :class:`Tableaux`
|
|
100
|
+
* :class:`TableauTuples`
|
|
101
|
+
|
|
102
|
+
.. TODO::
|
|
103
|
+
|
|
104
|
+
Strictly speaking this module implements residue sequences of
|
|
105
|
+
type `A^{(1)}_e`. Residue sequences of other types also need
|
|
106
|
+
to be implemented.
|
|
107
|
+
|
|
108
|
+
AUTHORS:
|
|
109
|
+
|
|
110
|
+
- Andrew Mathas (2016-07-01): Initial version
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
# ****************************************************************************
|
|
114
|
+
# Copyright (C) 2012,2016 Andrew Mathas <andrew dot mathas at sydney dot edu dot au>
|
|
115
|
+
#
|
|
116
|
+
# This program is free software: you can redistribute it and/or modify
|
|
117
|
+
# it under the terms of the GNU General Public License as published by
|
|
118
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
119
|
+
# (at your option) any later version.
|
|
120
|
+
# https://www.gnu.org/licenses/
|
|
121
|
+
# ****************************************************************************
|
|
122
|
+
|
|
123
|
+
from sage.categories.sets_cat import Sets
|
|
124
|
+
from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass
|
|
125
|
+
from sage.misc.lazy_attribute import lazy_attribute
|
|
126
|
+
from sage.rings.finite_rings.integer_mod_ring import IntegerModRing
|
|
127
|
+
from sage.structure.list_clone import ClonableArray
|
|
128
|
+
from sage.structure.parent import Parent
|
|
129
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
130
|
+
|
|
131
|
+
from .partition_tuple import PartitionTuple
|
|
132
|
+
from .tableau_tuple import (StandardTableaux_residue,
|
|
133
|
+
StandardTableaux_residue_shape,
|
|
134
|
+
RowStandardTableauTuples_residue,
|
|
135
|
+
RowStandardTableauTuples_residue_shape)
|
|
136
|
+
|
|
137
|
+
# -------------------------------------------------
|
|
138
|
+
# Residue sequences
|
|
139
|
+
# -------------------------------------------------
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
# needed for __classcall_private__
|
|
143
|
+
class ResidueSequence(ClonableArray,
|
|
144
|
+
metaclass=InheritComparisonClasscallMetaclass):
|
|
145
|
+
r"""
|
|
146
|
+
A residue sequence.
|
|
147
|
+
|
|
148
|
+
The *residue sequence* of a tableau `t` (of partition or partition tuple
|
|
149
|
+
shape) is the sequence `(i_1, i_2, \ldots, i_n)` where `i_k` is the
|
|
150
|
+
residue of `l` in `t`, for `k = 1, 2, \ldots, n`, where `n` is the
|
|
151
|
+
size of `t`. Residue sequences are important in the representation
|
|
152
|
+
theory of the cyclotomic Hecke algebras of type `G(r, 1, n)`, and
|
|
153
|
+
of the cyclotomic quiver Hecke algebras, because they determine the
|
|
154
|
+
eigenvalues of the Jucys-Murphy elements upon all modules. More precisely,
|
|
155
|
+
they index and completely determine the irreducible representations
|
|
156
|
+
of the (cyclotomic) Gelfand-Tsetlin algebras.
|
|
157
|
+
|
|
158
|
+
Rather than being called directly, residue sequences are best accessed
|
|
159
|
+
via the standard tableaux classes :class:`StandardTableau` and
|
|
160
|
+
:class:`StandardTableauTuple`.
|
|
161
|
+
|
|
162
|
+
INPUT:
|
|
163
|
+
|
|
164
|
+
Can be of the form:
|
|
165
|
+
|
|
166
|
+
- ``ResidueSequence(e, res)``,
|
|
167
|
+
- ``ResidueSequence(e, multicharge, res)``,
|
|
168
|
+
|
|
169
|
+
where ``e`` is a positive integer not equal to 1 and ``res`` is a
|
|
170
|
+
sequence of integers (the residues).
|
|
171
|
+
|
|
172
|
+
EXAMPLES::
|
|
173
|
+
|
|
174
|
+
sage: res = StandardTableauTuple([[[1,3],[6]],[[2,7],[4],[5]]]).residue_sequence(3,(0,5))
|
|
175
|
+
sage: res
|
|
176
|
+
3-residue sequence (0,2,1,1,0,2,0) with multicharge (0,2)
|
|
177
|
+
sage: res.quantum_characteristic()
|
|
178
|
+
3
|
|
179
|
+
sage: res.level()
|
|
180
|
+
2
|
|
181
|
+
sage: res.size()
|
|
182
|
+
7
|
|
183
|
+
sage: res.residues()
|
|
184
|
+
[0, 2, 1, 1, 0, 2, 0]
|
|
185
|
+
sage: res.restrict(2)
|
|
186
|
+
3-residue sequence (0,2) with multicharge (0,2)
|
|
187
|
+
sage: res.standard_tableaux([[2,1],[1],[2,1]])
|
|
188
|
+
Standard (2,1|1|2,1)-tableaux with 3-residue sequence (0,2,1,1,0,2,0) and multicharge (0,2)
|
|
189
|
+
sage: res.standard_tableaux([[2,2],[3]]).list()
|
|
190
|
+
[]
|
|
191
|
+
sage: res.standard_tableaux([[2,2],[3]])[:]
|
|
192
|
+
[]
|
|
193
|
+
sage: res.standard_tableaux()
|
|
194
|
+
Standard tableaux with 3-residue sequence (0,2,1,1,0,2,0) and multicharge (0,2)
|
|
195
|
+
sage: res.standard_tableaux()[:10]
|
|
196
|
+
[([[1, 3, 6, 7], [2, 5], [4]], []),
|
|
197
|
+
([[1, 3, 6], [2, 5], [4], [7]], []),
|
|
198
|
+
([[1, 3], [2, 5], [4, 6], [7]], []),
|
|
199
|
+
([[1, 3], [2, 5], [4], [7]], [[6]]),
|
|
200
|
+
([[1, 3], [2, 5], [4]], [[6, 7]]),
|
|
201
|
+
([[1, 3, 6, 7], [2], [4], [5]], []),
|
|
202
|
+
([[1, 3, 6], [2, 7], [4], [5]], []),
|
|
203
|
+
([[1, 3], [2, 7], [4], [5], [6]], []),
|
|
204
|
+
([[1, 3], [2, 7], [4], [5]], [[6]]),
|
|
205
|
+
([[1, 3], [2], [4], [5]], [[6, 7]])]
|
|
206
|
+
|
|
207
|
+
The TestSuite fails ``_test_pickling`` because ``__getitem__`` does
|
|
208
|
+
not support slices, so we skip this.
|
|
209
|
+
|
|
210
|
+
TESTS::
|
|
211
|
+
|
|
212
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
213
|
+
sage: TestSuite( ResidueSequence(3,(0,0,1), [0,1,2])).run(skip='_test_pickling')
|
|
214
|
+
"""
|
|
215
|
+
@staticmethod
|
|
216
|
+
def __classcall_private__(cls, e, multicharge, residues=None, check=True):
|
|
217
|
+
r"""
|
|
218
|
+
Magic to allow class to accept a list (which is not hashable) instead
|
|
219
|
+
of a partition (which is). At the same time we ensure that every
|
|
220
|
+
residue sequence is constructed as an ``element_class`` call of
|
|
221
|
+
an appropriate parent.
|
|
222
|
+
|
|
223
|
+
The ``residues`` must always be specified and, instead, it is the
|
|
224
|
+
``multicharge`` which is the optional argument with default ``[0]``.
|
|
225
|
+
This means that we have to perform some tricks when ``residues``
|
|
226
|
+
is ``None``.
|
|
227
|
+
|
|
228
|
+
EXAMPLES::
|
|
229
|
+
|
|
230
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
231
|
+
sage: ResidueSequence(3, [0,0,1], [0,0,1,1,2,2,3,3]) # indirect doctest
|
|
232
|
+
3-residue sequence (0,0,1,1,2,2,0,0) with multicharge (0,0,1)
|
|
233
|
+
"""
|
|
234
|
+
# if the multicharge is omitted it defaults to (0,) in level 1
|
|
235
|
+
if residues is None:
|
|
236
|
+
residues = multicharge
|
|
237
|
+
multicharge = (0,)
|
|
238
|
+
multicharge = tuple(multicharge)
|
|
239
|
+
return ResidueSequences(e, multicharge).element_class(ResidueSequences(e, multicharge), tuple(residues), check)
|
|
240
|
+
|
|
241
|
+
def __init__(self, parent, residues, check):
|
|
242
|
+
r"""
|
|
243
|
+
Initialize ``self``.
|
|
244
|
+
|
|
245
|
+
The ``multicharge`` is the optional argument which, if omitted,
|
|
246
|
+
defaults to ``(0,)``. On the other hand, the ``residue`` must
|
|
247
|
+
always be specified so, below, we check to see whether or note
|
|
248
|
+
``residues`` is ``None`` and adjust accordingly in this case.
|
|
249
|
+
|
|
250
|
+
EXAMPLES::
|
|
251
|
+
|
|
252
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
253
|
+
sage: ResidueSequence(3, (0,0,1), [0,0,1,1,2,2,3,3])
|
|
254
|
+
3-residue sequence (0,0,1,1,2,2,0,0) with multicharge (0,0,1)
|
|
255
|
+
|
|
256
|
+
The TestSuite fails ``_test_pickling`` because ``__getitem__`` does
|
|
257
|
+
not support slices, so we skip this.
|
|
258
|
+
|
|
259
|
+
TESTS::
|
|
260
|
+
|
|
261
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
262
|
+
sage: TestSuite(ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3])).run(skip='_test_pickling')
|
|
263
|
+
sage: TestSuite( ResidueSequence(3, [0,1,2])).run(skip='_test_pickling')
|
|
264
|
+
sage: TestSuite( ResidueSequence(3, [0], [0,1,2])).run(skip='_test_pickling')
|
|
265
|
+
sage: TestSuite( ResidueSequence(3, [0,0], [0,0,1,2])).run(skip='_test_pickling')
|
|
266
|
+
sage: TestSuite( ResidueSequence(3, [0,0,1,2])).run(skip='_test_pickling')
|
|
267
|
+
"""
|
|
268
|
+
residues = tuple(parent._base_ring(i) for i in residues)
|
|
269
|
+
super().__init__(parent, residues, check)
|
|
270
|
+
|
|
271
|
+
def check(self):
|
|
272
|
+
r"""
|
|
273
|
+
Raise a :exc:`ValueError` if ``self`` is not a residue sequence.
|
|
274
|
+
|
|
275
|
+
EXAMPLES::
|
|
276
|
+
|
|
277
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
278
|
+
sage: ResidueSequence(3, [0,0,1], [0,0,1,1,2,2,3,3]).check()
|
|
279
|
+
sage: ResidueSequence(3, [0,0,1], [2,0,1,1,2,2,3,3]).check()
|
|
280
|
+
"""
|
|
281
|
+
self.parent().check_element(self)
|
|
282
|
+
|
|
283
|
+
def _repr_(self):
|
|
284
|
+
r"""
|
|
285
|
+
EXAMPLES::
|
|
286
|
+
|
|
287
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
288
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3])
|
|
289
|
+
3-residue sequence (0,0,1,1,2,2,0,0) with multicharge (0,0,1)
|
|
290
|
+
"""
|
|
291
|
+
return self.__str__()
|
|
292
|
+
|
|
293
|
+
def __str__(self, join='with'):
|
|
294
|
+
r"""
|
|
295
|
+
The string representation of a residue sequence is a comma separated
|
|
296
|
+
tuple with no spaces.
|
|
297
|
+
|
|
298
|
+
EXAMPLES::
|
|
299
|
+
|
|
300
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
301
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]).__str__()
|
|
302
|
+
'3-residue sequence (0,0,1,1,2,2,0,0) with multicharge (0,0,1)'
|
|
303
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]).__str__('and')
|
|
304
|
+
'3-residue sequence (0,0,1,1,2,2,0,0) and multicharge (0,0,1)'
|
|
305
|
+
"""
|
|
306
|
+
string = '{e}-residue sequence ({res}) {join} multicharge ({charge})'
|
|
307
|
+
return string.format(e=self.quantum_characteristic(),
|
|
308
|
+
res=','.join('%s' % r for r in self), join=join,
|
|
309
|
+
charge=','.join('%s' % r for r in self.multicharge()))
|
|
310
|
+
|
|
311
|
+
def __getitem__(self, k):
|
|
312
|
+
r"""
|
|
313
|
+
Return the ``k``-th residue.
|
|
314
|
+
|
|
315
|
+
INPUT:
|
|
316
|
+
|
|
317
|
+
- ``k`` --- an integer between 1 and the length of the residue
|
|
318
|
+
sequence ``self``
|
|
319
|
+
|
|
320
|
+
The ``k``-th residue is the ``e``-residue (see
|
|
321
|
+
:meth:`sage.combinat.tableau.StandardTable.residue`) of the
|
|
322
|
+
integer ``k`` in some standard tableaux. As the entries of standard
|
|
323
|
+
tableaux are always between `1` and `n`, the size of the tableau,
|
|
324
|
+
the integer ``k`` must also be in this range (that is, this
|
|
325
|
+
is **not** 0-based!).
|
|
326
|
+
|
|
327
|
+
EXAMPLES::
|
|
328
|
+
|
|
329
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
330
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3])[4]
|
|
331
|
+
1
|
|
332
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3])[7]
|
|
333
|
+
0
|
|
334
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3])[9]
|
|
335
|
+
Traceback (most recent call last):
|
|
336
|
+
...
|
|
337
|
+
IndexError: k must be in the range 1, 2, ..., 8
|
|
338
|
+
"""
|
|
339
|
+
try:
|
|
340
|
+
return ClonableArray.__getitem__(self, k - 1)
|
|
341
|
+
except (IndexError, KeyError):
|
|
342
|
+
raise IndexError('k must be in the range 1, 2, ..., {}'.format(len(self)))
|
|
343
|
+
|
|
344
|
+
def residues(self) -> list:
|
|
345
|
+
r"""
|
|
346
|
+
Return a list of the residue sequence.
|
|
347
|
+
|
|
348
|
+
EXAMPLES::
|
|
349
|
+
|
|
350
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
351
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]).residues()
|
|
352
|
+
[0, 0, 1, 1, 2, 2, 0, 0]
|
|
353
|
+
"""
|
|
354
|
+
return list(self)
|
|
355
|
+
|
|
356
|
+
def restrict(self, m):
|
|
357
|
+
r"""
|
|
358
|
+
Return the subsequence of this sequence of length `m`.
|
|
359
|
+
|
|
360
|
+
The residue sequence ``self`` is of the form `(r_1, \ldots, r_n)`.
|
|
361
|
+
The function returns the residue sequence `(r_1, \ldots, r_m)`, with
|
|
362
|
+
the same :meth:`quantum_characteristic` and :meth:`multicharge`.
|
|
363
|
+
|
|
364
|
+
EXAMPLES::
|
|
365
|
+
|
|
366
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
367
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]).restrict(7)
|
|
368
|
+
3-residue sequence (0,0,1,1,2,2,0) with multicharge (0,0,1)
|
|
369
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]).restrict(6)
|
|
370
|
+
3-residue sequence (0,0,1,1,2,2) with multicharge (0,0,1)
|
|
371
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]).restrict(4)
|
|
372
|
+
3-residue sequence (0,0,1,1) with multicharge (0,0,1)
|
|
373
|
+
"""
|
|
374
|
+
return ResidueSequence(self.quantum_characteristic(),
|
|
375
|
+
self.multicharge(), self.residues()[:m])
|
|
376
|
+
|
|
377
|
+
def restrict_row(self, cell, row):
|
|
378
|
+
r"""
|
|
379
|
+
Return a residue sequence for the tableau obtained by swapping the row
|
|
380
|
+
in ending in `cell` with the row that is `row` rows above it and which
|
|
381
|
+
has the same length.
|
|
382
|
+
|
|
383
|
+
The residue sequence ``self`` is of the form `(r_1, \ldots, r_n)`.
|
|
384
|
+
The function returns the residue sequence `(r_1, \ldots, r_m)`, with
|
|
385
|
+
the same :meth:`quantum_characteristic` and :meth:`multicharge`.
|
|
386
|
+
|
|
387
|
+
EXAMPLES::
|
|
388
|
+
|
|
389
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
390
|
+
sage: ResidueSequence(3, [0,1,2,2,0,1]).restrict_row((1,2),1)
|
|
391
|
+
3-residue sequence (2,0,1,0,1) with multicharge (0)
|
|
392
|
+
sage: ResidueSequence(3, [1,0], [0,1,2,2,0,1]).restrict_row((1,1,2),1)
|
|
393
|
+
3-residue sequence (2,0,1,0,1) with multicharge (1,0)
|
|
394
|
+
"""
|
|
395
|
+
residues = self.residues() # residue sequence
|
|
396
|
+
residues.reverse() # reversed residue sequence
|
|
397
|
+
|
|
398
|
+
if residues[0] + row == residues[0]:
|
|
399
|
+
# if the residues in the two rows are the same we do not
|
|
400
|
+
# need to do anything special
|
|
401
|
+
return self.restrict(len(residues) - 1)
|
|
402
|
+
|
|
403
|
+
# determine the sets of residues, one_res and two_res, that need to be
|
|
404
|
+
# interchanged in order to swap the corresponding rows
|
|
405
|
+
row_len = cell[-1] # length of the row being swapped
|
|
406
|
+
one_res = [0] # last row of tableau will move
|
|
407
|
+
two_res = [0] # will prune this entry later
|
|
408
|
+
try:
|
|
409
|
+
for c in range(1, row_len + 1):
|
|
410
|
+
# residues decrease by 1 from right to left in each row
|
|
411
|
+
one_res.append(residues.index(residues[0] - c,
|
|
412
|
+
one_res[c - 1] + 1))
|
|
413
|
+
for c in range(row_len + 1):
|
|
414
|
+
two_res.append(residues.index(residues[0] - c + row,
|
|
415
|
+
two_res[c] + 1))
|
|
416
|
+
while two_res[-1] in one_res:
|
|
417
|
+
# entries in one_res and two_res must be disjoint
|
|
418
|
+
two_res[-1] = residues.index(residues[0] - c + row,
|
|
419
|
+
two_res[-1] + 1)
|
|
420
|
+
except ValueError:
|
|
421
|
+
return None
|
|
422
|
+
|
|
423
|
+
# now add row to the residues in two_res and subtract row from those in
|
|
424
|
+
# one_res
|
|
425
|
+
for c in range(row_len + 1):
|
|
426
|
+
residues[one_res[c]] += row
|
|
427
|
+
residues[two_res[c + 1]] -= row # jump over two_res[0]
|
|
428
|
+
|
|
429
|
+
# remove the first residue, reverse the order and return
|
|
430
|
+
return ResidueSequence(self.quantum_characteristic(),
|
|
431
|
+
self.multicharge(),
|
|
432
|
+
residues[1:][::-1])
|
|
433
|
+
|
|
434
|
+
def swap_residues(self, i, j):
|
|
435
|
+
r"""
|
|
436
|
+
Return the *new* residue sequence obtained by swapping the residues
|
|
437
|
+
for ``i`` and ``j``.
|
|
438
|
+
|
|
439
|
+
INPUT:
|
|
440
|
+
|
|
441
|
+
- ``i``, ``j`` -- two integers between `1` and the length of
|
|
442
|
+
the residue sequence
|
|
443
|
+
|
|
444
|
+
If residue sequence ``self`` is of the form `(r_1, \ldots, r_n)`, and
|
|
445
|
+
`i < j`, then the residue sequence
|
|
446
|
+
`(r_1, \ldots, r_j, \ldots, r_i, \ldots, r_m)`, with the same
|
|
447
|
+
:meth:`quantum_characteristic` and :meth:`multicharge`, is returned.
|
|
448
|
+
|
|
449
|
+
EXAMPLES::
|
|
450
|
+
|
|
451
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
452
|
+
sage: res = ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]); res
|
|
453
|
+
3-residue sequence (0,0,1,1,2,2,0,0) with multicharge (0,0,1)
|
|
454
|
+
sage: ser = res.swap_residues(2,6); ser
|
|
455
|
+
3-residue sequence (0,2,1,1,2,0,0,0) with multicharge (0,0,1)
|
|
456
|
+
sage: res == ser
|
|
457
|
+
False
|
|
458
|
+
|
|
459
|
+
TESTS::
|
|
460
|
+
|
|
461
|
+
sage: res.swap_residues(22,26)
|
|
462
|
+
Traceback (most recent call last):
|
|
463
|
+
...
|
|
464
|
+
IndexError: 22 and 26 must be between 1 and 8
|
|
465
|
+
"""
|
|
466
|
+
with self.clone() as swap:
|
|
467
|
+
try:
|
|
468
|
+
# we have overridden __getitem__ so that indices are 1-based but
|
|
469
|
+
# __setitem__ is still 0-based so we need to renormalise the LHS
|
|
470
|
+
swap[i - 1], swap[j - 1] = self[j], self[i]
|
|
471
|
+
except IndexError:
|
|
472
|
+
raise IndexError('%s and %s must be between 1 and %s' % (i, j, self.size()))
|
|
473
|
+
return swap
|
|
474
|
+
|
|
475
|
+
def standard_tableaux(self, shape=None):
|
|
476
|
+
r"""
|
|
477
|
+
Return the residue-class of standard tableaux that have residue
|
|
478
|
+
sequence ``self``.
|
|
479
|
+
|
|
480
|
+
INPUT:
|
|
481
|
+
|
|
482
|
+
- ``shape`` -- (optional) a partition or partition tuple of
|
|
483
|
+
the correct level
|
|
484
|
+
|
|
485
|
+
OUTPUT:
|
|
486
|
+
|
|
487
|
+
An iterator for the standard tableaux with this residue sequence. If
|
|
488
|
+
the ``shape`` is given then only tableaux of this shape are returned,
|
|
489
|
+
otherwise all of the full residue-class of standard tableaux, or
|
|
490
|
+
standard tableaux tuples, is returned. The residue sequence ``self``
|
|
491
|
+
specifies the :meth:`multicharge` of the tableaux which, in turn,
|
|
492
|
+
determines the :meth:`level` of the tableaux in the residue class.
|
|
493
|
+
|
|
494
|
+
EXAMPLES::
|
|
495
|
+
|
|
496
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
497
|
+
sage: ResidueSequence(3,(0,0,0),[0,1,2,0,1,2,0,1,2]).standard_tableaux()
|
|
498
|
+
Standard tableaux with 3-residue sequence (0,1,2,0,1,2,0,1,2) and multicharge (0,0,0)
|
|
499
|
+
sage: ResidueSequence(3,(0,0,0),[0,1,2,0,1,2,0,1,2]).standard_tableaux([[3],[3],[3]])
|
|
500
|
+
Standard (3|3|3)-tableaux with 3-residue sequence (0,1,2,0,1,2,0,1,2) and multicharge (0,0,0)
|
|
501
|
+
"""
|
|
502
|
+
if shape is None:
|
|
503
|
+
return StandardTableaux_residue(residue=self)
|
|
504
|
+
else:
|
|
505
|
+
return StandardTableaux_residue_shape(residue=self,
|
|
506
|
+
shape=PartitionTuple(shape))
|
|
507
|
+
|
|
508
|
+
def row_standard_tableaux(self, shape=None):
|
|
509
|
+
r"""
|
|
510
|
+
Return the residue-class of row standard tableaux that have residue
|
|
511
|
+
sequence ``self``.
|
|
512
|
+
|
|
513
|
+
INPUT:
|
|
514
|
+
|
|
515
|
+
- ``shape`` -- (optional) a partition or partition tuple of
|
|
516
|
+
the correct level
|
|
517
|
+
|
|
518
|
+
OUTPUT:
|
|
519
|
+
|
|
520
|
+
An iterator for the row standard tableaux with this residue sequence. If
|
|
521
|
+
the ``shape`` is given then only tableaux of this shape are returned,
|
|
522
|
+
otherwise all of the full residue-class of row standard tableaux, or row
|
|
523
|
+
standard tableaux tuples, is returned. The residue sequence ``self``
|
|
524
|
+
specifies the :meth:`multicharge` of the tableaux which, in turn,
|
|
525
|
+
determines the :meth:`level` of the tableaux in the residue class.
|
|
526
|
+
|
|
527
|
+
EXAMPLES::
|
|
528
|
+
|
|
529
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
530
|
+
sage: ResidueSequence(3,(0,0,0),[0,1,2,0,1,2,0,1,2]).row_standard_tableaux()
|
|
531
|
+
Row standard tableaux with 3-residue sequence (0,1,2,0,1,2,0,1,2) and multicharge (0,0,0)
|
|
532
|
+
sage: ResidueSequence(3,(0,0,0),[0,1,2,0,1,2,0,1,2]).row_standard_tableaux([[3],[3],[3]])
|
|
533
|
+
Row standard (3|3|3)-tableaux with 3-residue sequence (0,1,2,0,1,2,0,1,2) and multicharge (0,0,0)
|
|
534
|
+
"""
|
|
535
|
+
if shape is None:
|
|
536
|
+
return RowStandardTableauTuples_residue(residue=self)
|
|
537
|
+
else:
|
|
538
|
+
return RowStandardTableauTuples_residue_shape(residue=self, shape=PartitionTuple(shape))
|
|
539
|
+
|
|
540
|
+
def negative(self):
|
|
541
|
+
r"""
|
|
542
|
+
Return the negative of the residue sequence ``self``.
|
|
543
|
+
|
|
544
|
+
That is, if ``self`` is the residue sequence `(i_1, \ldots, i_n)`
|
|
545
|
+
then return `(-i_1, \ldots, -i_n)`. Taking the negative residue
|
|
546
|
+
sequences is a shadow of tensoring with the sign representation
|
|
547
|
+
from the cyclotomic Hecke algebras of type `A`.
|
|
548
|
+
|
|
549
|
+
EXAMPLES::
|
|
550
|
+
|
|
551
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
552
|
+
sage: ResidueSequence(3,[0,0,1],[0,0,1,1,2,2,3,3]).negative()
|
|
553
|
+
3-residue sequence (0,0,2,2,1,1,0,0) with multicharge (0,0,1)
|
|
554
|
+
"""
|
|
555
|
+
return ResidueSequence(self.quantum_characteristic(), self.multicharge(),
|
|
556
|
+
(self.base_ring()(-i) for i in self))
|
|
557
|
+
|
|
558
|
+
def block(self):
|
|
559
|
+
r"""
|
|
560
|
+
Return a dictionary `\beta` that determines the block associated to
|
|
561
|
+
the residue sequence ``self``.
|
|
562
|
+
|
|
563
|
+
Two Specht modules for a cyclotomic Hecke algebra of type `A` belong to
|
|
564
|
+
the same block, in this sense, if and only if the residue sequences of
|
|
565
|
+
their standard tableaux have the same block in this sense. The blocks
|
|
566
|
+
of these algebras are actually indexed by positive roots in the root
|
|
567
|
+
lattice of an affine special linear group. Instead of than constructing
|
|
568
|
+
the root lattice, this method simply returns a dictionary `\beta` where
|
|
569
|
+
the keys are residues `i` and where the value of the key `i` is equal
|
|
570
|
+
to the numbers of nodes in the residue sequence ``self`` that are equal
|
|
571
|
+
to `i`. The dictionary `\beta` corresponds to the positive root:
|
|
572
|
+
|
|
573
|
+
.. MATH::
|
|
574
|
+
|
|
575
|
+
\sum_{i\in I} \beta_i \alpha_i \in Q^+,
|
|
576
|
+
|
|
577
|
+
These positive roots also index the blocks of the cyclotomic KLR
|
|
578
|
+
algebras of type `A`.
|
|
579
|
+
|
|
580
|
+
We return a dictionary because when the :meth:`quantum_characteristic` is `0`,
|
|
581
|
+
the Cartan type is `A_{\infty}`, in which case the simple roots are
|
|
582
|
+
indexed by the integers, which is infinite.
|
|
583
|
+
|
|
584
|
+
EXAMPLES::
|
|
585
|
+
|
|
586
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
587
|
+
sage: ResidueSequence(3, [0,0,0], [0,1,2,0,1,2,0,1,2]).block()
|
|
588
|
+
{0: 3, 1: 3, 2: 3}
|
|
589
|
+
"""
|
|
590
|
+
return {i: self.residues().count(i) for i in set(self.residues())}
|
|
591
|
+
|
|
592
|
+
def base_ring(self):
|
|
593
|
+
r"""
|
|
594
|
+
Return the base ring for the residue sequence.
|
|
595
|
+
|
|
596
|
+
If the :meth:`quantum_characteristic` of the residue sequence ``self``
|
|
597
|
+
is `e` then the base ring for the sequence is `\ZZ / e\ZZ`,
|
|
598
|
+
or `\ZZ` if `e=0`.
|
|
599
|
+
|
|
600
|
+
EXAMPLES::
|
|
601
|
+
|
|
602
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
603
|
+
sage: ResidueSequence(3, (0,0,1), [0,0,1,1,2,2,3,3]).base_ring()
|
|
604
|
+
Ring of integers modulo 3
|
|
605
|
+
"""
|
|
606
|
+
return self.parent()._base_ring
|
|
607
|
+
|
|
608
|
+
def quantum_characteristic(self):
|
|
609
|
+
r"""
|
|
610
|
+
Return the quantum characteristic of the residue sequence ``self``.
|
|
611
|
+
|
|
612
|
+
The `e`-residue sequences are associated with a cyclotomic Hecke
|
|
613
|
+
algebra that has a parameter `q` of *quantum characteristic* `e`.
|
|
614
|
+
This is the smallest positive integer such that
|
|
615
|
+
`1 + q + \cdots + q^{e-1} = 0`, or `e=0` if no such integer exists.
|
|
616
|
+
|
|
617
|
+
EXAMPLES::
|
|
618
|
+
|
|
619
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
620
|
+
sage: ResidueSequence(3, (0,0,1), [0,0,1,1,2,2,3,3]).quantum_characteristic()
|
|
621
|
+
3
|
|
622
|
+
"""
|
|
623
|
+
return self.parent()._quantum_characteristic
|
|
624
|
+
|
|
625
|
+
def multicharge(self):
|
|
626
|
+
r"""
|
|
627
|
+
Return the multicharge for the residue sequence ``self``.
|
|
628
|
+
|
|
629
|
+
The `e`-residue sequences are associated with a cyclotomic Hecke
|
|
630
|
+
algebra with Hecke parameter `q` of :meth:`quantum_characteristic` `e`
|
|
631
|
+
and multicharge `(\kappa_1, \ldots, \kappa_l)`. This means that
|
|
632
|
+
the cyclotomic parameters of the Hecke algebra are
|
|
633
|
+
`q^{\kappa_1}, \ldots, q^{\kappa_l}`. Equivalently, the Hecke
|
|
634
|
+
algebra is determined by the dominant weight
|
|
635
|
+
|
|
636
|
+
.. MATH::
|
|
637
|
+
|
|
638
|
+
\sum_{r \in \ZZ / e\ZZ} \kappa_r \Lambda_r \in P^+.
|
|
639
|
+
|
|
640
|
+
EXAMPLES::
|
|
641
|
+
|
|
642
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
643
|
+
sage: ResidueSequence(3, (0,0,1), [0,0,1,1,2,2,3,3]).multicharge()
|
|
644
|
+
(0, 0, 1)
|
|
645
|
+
"""
|
|
646
|
+
return self.parent()._multicharge
|
|
647
|
+
|
|
648
|
+
def level(self):
|
|
649
|
+
r"""
|
|
650
|
+
Return the level of the residue sequence. That is, the level of the
|
|
651
|
+
corresponding (tuples of) standard tableaux.
|
|
652
|
+
|
|
653
|
+
The *level* of a residue sequence is the length of its
|
|
654
|
+
:meth:`multicharge`. This is the same as the level of the
|
|
655
|
+
:meth:`standard_tableaux` that belong to the residue class of tableaux
|
|
656
|
+
determined by ``self``.
|
|
657
|
+
|
|
658
|
+
EXAMPLES::
|
|
659
|
+
|
|
660
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
661
|
+
sage: ResidueSequence(3, (0,0,1), [0,0,1,1,2,2,3,3]).level()
|
|
662
|
+
3
|
|
663
|
+
"""
|
|
664
|
+
return len(self.multicharge())
|
|
665
|
+
|
|
666
|
+
def size(self):
|
|
667
|
+
r"""
|
|
668
|
+
Return the size of the residue sequence.
|
|
669
|
+
|
|
670
|
+
This is the size, or length, of the residue sequence, which is the
|
|
671
|
+
same as the size of the :meth:`standard_tableaux` that belong to
|
|
672
|
+
the residue class of tableaux determined by ``self``.
|
|
673
|
+
|
|
674
|
+
EXAMPLES::
|
|
675
|
+
|
|
676
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
677
|
+
sage: ResidueSequence(3, (0,0,1), [0,0,1,1,2,2,3,3]).size()
|
|
678
|
+
8
|
|
679
|
+
"""
|
|
680
|
+
return len(self)
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
class ResidueSequences(UniqueRepresentation, Parent):
|
|
684
|
+
r"""
|
|
685
|
+
A parent class for :class:`ResidueSequence`.
|
|
686
|
+
|
|
687
|
+
This class exists because :class:`ResidueSequence` needs to have a parent.
|
|
688
|
+
Apart form being a parent the only useful method that it provides is
|
|
689
|
+
:meth:`cell_residue`, which is a short-hand for computing the residue
|
|
690
|
+
of a cell using the :meth:`ResidueSequence.quantum_characteristic`
|
|
691
|
+
and :meth:`ResidueSequence.multicharge` for the residue class.
|
|
692
|
+
|
|
693
|
+
EXAMPLES::
|
|
694
|
+
|
|
695
|
+
sage: from sage.combinat.tableau_residues import ResidueSequences
|
|
696
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2))
|
|
697
|
+
0-residue sequences with multicharge (0, 1, 2)
|
|
698
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2)) == ResidueSequences(e=0, multicharge=(0,1,2))
|
|
699
|
+
True
|
|
700
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2)) == ResidueSequences(e=3, multicharge=(0,1,2))
|
|
701
|
+
False
|
|
702
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2)).element_class
|
|
703
|
+
<class 'sage.combinat.tableau_residues.ResidueSequences_with_category.element_class'>
|
|
704
|
+
"""
|
|
705
|
+
|
|
706
|
+
Element = ResidueSequence
|
|
707
|
+
|
|
708
|
+
def __init__(self, e, multicharge=(0,)):
|
|
709
|
+
r"""
|
|
710
|
+
Initialise the parent class for residue sequences.
|
|
711
|
+
|
|
712
|
+
EXAMPLES::
|
|
713
|
+
|
|
714
|
+
sage: from sage.combinat.tableau_residues import ResidueSequences
|
|
715
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2))
|
|
716
|
+
0-residue sequences with multicharge (0, 1, 2)
|
|
717
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2)) == ResidueSequences(e=0, multicharge=(0,1,2))
|
|
718
|
+
True
|
|
719
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2)) == ResidueSequences(e=3, multicharge=(0,1,2))
|
|
720
|
+
False
|
|
721
|
+
|
|
722
|
+
The TestSuite fails ``_test_pickling`` because ``__getitem__`` does
|
|
723
|
+
not support slices, so we skip this::
|
|
724
|
+
|
|
725
|
+
sage: R = ResidueSequences(e=0, multicharge=(0,1,2))
|
|
726
|
+
sage: TestSuite(R).run(skip='_test_elements')
|
|
727
|
+
"""
|
|
728
|
+
self._quantum_characteristic = e
|
|
729
|
+
self._base_ring = IntegerModRing(self._quantum_characteristic)
|
|
730
|
+
self._multicharge = tuple(self._base_ring(i) for i in multicharge)
|
|
731
|
+
super().__init__(category=Sets())
|
|
732
|
+
|
|
733
|
+
def _repr_(self):
|
|
734
|
+
r"""
|
|
735
|
+
The string representation of ``self``.
|
|
736
|
+
|
|
737
|
+
EXAMPLES::
|
|
738
|
+
|
|
739
|
+
sage: from sage.combinat.tableau_residues import ResidueSequences
|
|
740
|
+
sage: ResidueSequences(e=0, multicharge=(0,1,2))
|
|
741
|
+
0-residue sequences with multicharge (0, 1, 2)
|
|
742
|
+
sage: ResidueSequences(e=3)
|
|
743
|
+
3-residue sequences with multicharge (0,)
|
|
744
|
+
sage: ResidueSequences(2, (0,1,2,3))
|
|
745
|
+
2-residue sequences with multicharge (0, 1, 0, 1)
|
|
746
|
+
"""
|
|
747
|
+
return '{}-residue sequences with multicharge {}'.format(self._quantum_characteristic,
|
|
748
|
+
self._multicharge)
|
|
749
|
+
|
|
750
|
+
def _an_element_(self):
|
|
751
|
+
r"""
|
|
752
|
+
Return a particular element of ``self``.
|
|
753
|
+
|
|
754
|
+
EXAMPLES::
|
|
755
|
+
|
|
756
|
+
sage: TableauTuples().an_element()
|
|
757
|
+
([[1]], [[2]], [[3]], [[4]], [[5]], [[6]], [[7]])
|
|
758
|
+
"""
|
|
759
|
+
return self.element_class(self, self._multicharge, check=True)
|
|
760
|
+
|
|
761
|
+
def _cell_residue_level_one(self, r, c):
|
|
762
|
+
r"""
|
|
763
|
+
Return the residue a cell of level 1. It is called indirectly via
|
|
764
|
+
:meth:`cell_residue`.
|
|
765
|
+
|
|
766
|
+
EXAMPLES::
|
|
767
|
+
|
|
768
|
+
sage: from sage.combinat.tableau_residues import ResidueSequences
|
|
769
|
+
sage: ResidueSequences(3).cell_residue(1,0) # indirect doctest
|
|
770
|
+
2
|
|
771
|
+
"""
|
|
772
|
+
return self._base_ring(c - r)
|
|
773
|
+
|
|
774
|
+
def _cell_residue_higher_levels(self, k, r, c):
|
|
775
|
+
r"""
|
|
776
|
+
Return the residue a cell of level greater than 1.
|
|
777
|
+
|
|
778
|
+
It is called indirectly via :meth:`cell_residue`.
|
|
779
|
+
|
|
780
|
+
EXAMPLES::
|
|
781
|
+
|
|
782
|
+
sage: from sage.combinat.tableau_residues import ResidueSequences
|
|
783
|
+
sage: ResidueSequences(3,(0,0,1)).cell_residue(2,0,0) # indirect doctest
|
|
784
|
+
1
|
|
785
|
+
"""
|
|
786
|
+
return self._base_ring(self._multicharge[k] + c - r)
|
|
787
|
+
|
|
788
|
+
@lazy_attribute
|
|
789
|
+
def cell_residue(self, *args):
|
|
790
|
+
r"""
|
|
791
|
+
Return the residue a cell with respect to the quantum characteristic
|
|
792
|
+
and the multicharge of the residue sequence.
|
|
793
|
+
|
|
794
|
+
INPUT:
|
|
795
|
+
|
|
796
|
+
- ``r``, ``c`` -- the row and column indices in level one
|
|
797
|
+
- ``k``, ``r``, ``c`` -- the component, row and column indices
|
|
798
|
+
in higher levels
|
|
799
|
+
|
|
800
|
+
EXAMPLES::
|
|
801
|
+
|
|
802
|
+
sage: from sage.combinat.tableau_residues import ResidueSequences
|
|
803
|
+
sage: ResidueSequences(3).cell_residue(1,1)
|
|
804
|
+
0
|
|
805
|
+
sage: ResidueSequences(3).cell_residue(2,1)
|
|
806
|
+
2
|
|
807
|
+
sage: ResidueSequences(3).cell_residue(3,1)
|
|
808
|
+
1
|
|
809
|
+
sage: ResidueSequences(3).cell_residue(3,2)
|
|
810
|
+
2
|
|
811
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(0,0,0)
|
|
812
|
+
0
|
|
813
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(0,1,0)
|
|
814
|
+
2
|
|
815
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(0,1,2)
|
|
816
|
+
1
|
|
817
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(1,0,0)
|
|
818
|
+
1
|
|
819
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(1,1,0)
|
|
820
|
+
0
|
|
821
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(1,0,1)
|
|
822
|
+
2
|
|
823
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(2,0,0)
|
|
824
|
+
2
|
|
825
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(2,1,0)
|
|
826
|
+
1
|
|
827
|
+
sage: ResidueSequences(3,(0,1,2)).cell_residue(2,0,1)
|
|
828
|
+
0
|
|
829
|
+
"""
|
|
830
|
+
# A shortcut for determining the residue of a cell, which depends on e
|
|
831
|
+
# and the multicharge. The main advantage of this function is that it
|
|
832
|
+
# automatically incorporates the level of this residue class. This is
|
|
833
|
+
# used by the iterators for the corresponding standard tableaux classes.
|
|
834
|
+
if len(self._multicharge) == 1:
|
|
835
|
+
return self._cell_residue_level_one
|
|
836
|
+
else:
|
|
837
|
+
return self._cell_residue_higher_levels
|
|
838
|
+
|
|
839
|
+
def check_element(self, element):
|
|
840
|
+
r"""
|
|
841
|
+
Check that ``element`` is a residue sequence with
|
|
842
|
+
multicharge ``self.multicharge()``.
|
|
843
|
+
|
|
844
|
+
This is weak criteria in that we only require that ``element`` is
|
|
845
|
+
a tuple of elements in the underlying base ring of ``self``. Such
|
|
846
|
+
a sequence is always a valid residue sequence, although there may
|
|
847
|
+
be no tableaux with this residue sequence.
|
|
848
|
+
|
|
849
|
+
EXAMPLES::
|
|
850
|
+
|
|
851
|
+
sage: from sage.combinat.tableau_residues import ResidueSequence
|
|
852
|
+
sage: ResidueSequence(3,(0,0,1),[0,0,1,1,2,2,3,3]) # indirect doctest
|
|
853
|
+
3-residue sequence (0,0,1,1,2,2,0,0) with multicharge (0,0,1)
|
|
854
|
+
sage: ResidueSequence(3,(0,0,1),[2,0,1,4,2,2,5,3]) # indirect doctest
|
|
855
|
+
3-residue sequence (2,0,1,1,2,2,2,0) with multicharge (0,0,1)
|
|
856
|
+
sage: ResidueSequence(3,(0,0,1),[2,0,1,1,2,2,3,3]) # indirect doctest
|
|
857
|
+
3-residue sequence (2,0,1,1,2,2,0,0) with multicharge (0,0,1)
|
|
858
|
+
"""
|
|
859
|
+
if any(r not in self._base_ring for r in element):
|
|
860
|
+
raise ValueError('not a {}-residue sequence'.format(self._quantum_characteristic))
|