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,860 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-combinat
|
|
2
|
+
# sage.doctest: needs sage.modules
|
|
3
|
+
r"""
|
|
4
|
+
Down-Up Algebras
|
|
5
|
+
|
|
6
|
+
AUTHORS:
|
|
7
|
+
|
|
8
|
+
- Travis Scrimshaw (2023-4): initial version
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# ****************************************************************************
|
|
12
|
+
# Copyright (C) 2023 Travis Scrimshaw <tcscrims at gmail.com>
|
|
13
|
+
#
|
|
14
|
+
# This program is free software: you can redistribute it and/or modify
|
|
15
|
+
# it under the terms of the GNU General Public License as published by
|
|
16
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
17
|
+
# (at your option) any later version.
|
|
18
|
+
# https://www.gnu.org/licenses/
|
|
19
|
+
# ****************************************************************************
|
|
20
|
+
|
|
21
|
+
from sage.misc.cachefunc import cached_method
|
|
22
|
+
from sage.categories.algebras import Algebras
|
|
23
|
+
from sage.categories.modules import Modules
|
|
24
|
+
from sage.categories.rings import Rings
|
|
25
|
+
from sage.combinat.free_module import CombinatorialFreeModule
|
|
26
|
+
from sage.sets.non_negative_integers import NonNegativeIntegers
|
|
27
|
+
from sage.categories.sets_cat import cartesian_product
|
|
28
|
+
from sage.sets.family import Family
|
|
29
|
+
from sage.misc.lazy_list import lazy_list
|
|
30
|
+
from sage.misc.misc_c import prod
|
|
31
|
+
from sage.modules.free_module import FreeModule
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class DownUpAlgebra(CombinatorialFreeModule):
|
|
35
|
+
r"""
|
|
36
|
+
The down-up algebra.
|
|
37
|
+
|
|
38
|
+
Let `R` be a commutative ring, and let `\alpha, \beta, \gamma \in R`.
|
|
39
|
+
The *down-up algebra* is the associative unital algebra
|
|
40
|
+
`DU(\alpha, \beta, \gamma)` generated by `d, u` with relations
|
|
41
|
+
|
|
42
|
+
.. MATH::
|
|
43
|
+
|
|
44
|
+
\begin{aligned}
|
|
45
|
+
d^2u & = \alpha dud + \beta ud^2 + \gamma d,
|
|
46
|
+
\\ du^2 & = \alpha udu + \beta u^2d + \gamma u.
|
|
47
|
+
\end{aligned}
|
|
48
|
+
|
|
49
|
+
The down-up algebra has a PBW-type basis given by
|
|
50
|
+
|
|
51
|
+
.. MATH::
|
|
52
|
+
|
|
53
|
+
\{ u^i (du)^j d^k \mid i,j,k \in \ZZ_{\geq 0} \}.
|
|
54
|
+
|
|
55
|
+
This algebra originates in the study of posets. For a poset `P`,
|
|
56
|
+
we define operators acting on `R[P]` by
|
|
57
|
+
|
|
58
|
+
.. MATH::
|
|
59
|
+
|
|
60
|
+
d(y) = \sum_x x \qquad\qquad u(y) = \sum_z z,
|
|
61
|
+
|
|
62
|
+
where `y` covers `x` and `z` covers `y`. For `r`-differential posets
|
|
63
|
+
we have `du - ud = r 1`, and thus it affords a representation of a
|
|
64
|
+
:class:`Weyl algebra <sage.algebras.weyl_algebra.DifferentialWeylAlgebra>`.
|
|
65
|
+
This Weyl algebra is obtained as the quotient of `DU(0, 1, 2r)` by the
|
|
66
|
+
ideal generated by `du - ud - r`. For a `(q, r)`-differential poset,
|
|
67
|
+
we have the `d` and `u` operators satisfying
|
|
68
|
+
|
|
69
|
+
.. MATH::
|
|
70
|
+
|
|
71
|
+
\begin{aligned}
|
|
72
|
+
d^2u & = q(q+1) dud - q^3 ud^2 + r d,
|
|
73
|
+
\\ du^2 & = q(q+1) udu - q^3 u^2d + r u,
|
|
74
|
+
\end{aligned}
|
|
75
|
+
|
|
76
|
+
or `\alpha = q(q+1)`, `\beta = -q^3`, and `\gamma = r`. Specializing
|
|
77
|
+
`q = -1` recovers the `r`-differential poset relation.
|
|
78
|
+
|
|
79
|
+
Two other noteworthy quotients are:
|
|
80
|
+
|
|
81
|
+
- the `q`-Weyl algebra from `DU(0, q^2, q+1)` by the ideal generated by
|
|
82
|
+
`du - qud - 1`, and
|
|
83
|
+
- the quantum plane `R_q[d, u]`, where `du = qud`, from `DU(2q, -q^2, 0)`
|
|
84
|
+
by the ideal generated by `du - qud`.
|
|
85
|
+
|
|
86
|
+
EXAMPLES:
|
|
87
|
+
|
|
88
|
+
We begin by constructing the down-up algebra and perform some
|
|
89
|
+
basic computations::
|
|
90
|
+
|
|
91
|
+
sage: R.<a,b,g> = QQ[]
|
|
92
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
93
|
+
sage: d, u = DU.gens()
|
|
94
|
+
sage: d * u
|
|
95
|
+
(d*u)
|
|
96
|
+
sage: u * d
|
|
97
|
+
u*d
|
|
98
|
+
sage: d^2 * u
|
|
99
|
+
b*u*d^2 + a*(d*u)*d + g*d
|
|
100
|
+
sage: d * u^2
|
|
101
|
+
b*u^2*d + a*u*(d*u) + g*u
|
|
102
|
+
|
|
103
|
+
We verify some examples of Proposition 3.5 in [BR1998]_, which states
|
|
104
|
+
that the `0`-th degree part is commutative::
|
|
105
|
+
|
|
106
|
+
sage: DU0 = [u^i * (d*u)^j * d^i for i,j in
|
|
107
|
+
....: cartesian_product([range(3), range(3)])]
|
|
108
|
+
sage: all(x.degree() == 0 for x in DU0)
|
|
109
|
+
True
|
|
110
|
+
sage: all(x * y == y * x for x, y in cartesian_product([DU0, DU0]))
|
|
111
|
+
True
|
|
112
|
+
|
|
113
|
+
We verify that `DU(2, -1, \gamma)` can be described as the universal
|
|
114
|
+
enveloping algebra of the 3-dimensional Lie algebra spanned by `x,y,z`
|
|
115
|
+
satisfying `z = [x, y]`, `[x, z] = \gamma x`, and `[z, y] = \gamma y`::
|
|
116
|
+
|
|
117
|
+
sage: R.<g> = QQ[]
|
|
118
|
+
sage: L = LieAlgebra(R, {('x','y'): {'z': 1}, ('x','z'): {'x': g}, ('z','y'): {'y': g}},
|
|
119
|
+
....: names='x,y,z')
|
|
120
|
+
sage: x, y, z = L.basis()
|
|
121
|
+
sage: (L[x, y], L[x, z], L[z, y])
|
|
122
|
+
(z, g*x, g*y)
|
|
123
|
+
sage: x, y, z = L.pbw_basis().gens()
|
|
124
|
+
sage: x^2*y - 2*x*y*x + y*x^2 == g*x
|
|
125
|
+
True
|
|
126
|
+
sage: x*y^2 - 2*y*x*y + y^2*x == g*y
|
|
127
|
+
True
|
|
128
|
+
sage: DU = algebras.DownUp(2, -1, g)
|
|
129
|
+
sage: d, u = DU.gens()
|
|
130
|
+
sage: d^2*u - 2*d*u*d + u*d^2 == g*d
|
|
131
|
+
True
|
|
132
|
+
sage: d*u^2 - 2*u*d*u + u^2*d == g*u
|
|
133
|
+
True
|
|
134
|
+
|
|
135
|
+
Young's lattice is known to be a differential poset. Thus we can
|
|
136
|
+
construct a representation of `DU(0, 1, 2)` on this poset (which
|
|
137
|
+
gives a proof that Fomin's :class:`growth diagrams <GrowthDiagram>`
|
|
138
|
+
are equivalent to edge local rules or shadow lines construction
|
|
139
|
+
for :func:`RSK`)::
|
|
140
|
+
|
|
141
|
+
sage: DU = algebras.DownUp(0, 1, 2)
|
|
142
|
+
sage: d, u = DU.gens()
|
|
143
|
+
sage: d^2*u == 0*d*u*d + 1*u*d*d + 2*d
|
|
144
|
+
True
|
|
145
|
+
sage: d*u^2 == 0*u*d*u + 1*u*u*d + 2*u
|
|
146
|
+
True
|
|
147
|
+
|
|
148
|
+
sage: YL = CombinatorialFreeModule(DU.base_ring(), Partitions())
|
|
149
|
+
sage: def d_action(la):
|
|
150
|
+
....: return YL.sum_of_monomials(la.remove_cell(*c) for c in la.removable_cells())
|
|
151
|
+
sage: def u_action(la):
|
|
152
|
+
....: return YL.sum_of_monomials(la.add_cell(*c) for c in la.addable_cells())
|
|
153
|
+
sage: D = YL.module_morphism(on_basis=d_action, codomain=YL)
|
|
154
|
+
sage: U = YL.module_morphism(on_basis=u_action, codomain=YL)
|
|
155
|
+
sage: for la in PartitionsInBox(5, 5):
|
|
156
|
+
....: b = YL.basis()[la]
|
|
157
|
+
....: assert (D*D*U)(b) == 0*(D*U*D)(b) + 1*(U*D*D)(b) + 2*D(b)
|
|
158
|
+
....: assert (D*U*U)(b) == 0*(U*D*U)(la) + 1*(U*U*D)(b) + 2*U(b)
|
|
159
|
+
....: assert (D*U)(b) == (U*D)(b) + b # the Weyl algebra relation
|
|
160
|
+
|
|
161
|
+
.. TODO::
|
|
162
|
+
|
|
163
|
+
Implement the homogenized version.
|
|
164
|
+
|
|
165
|
+
REFERENCES:
|
|
166
|
+
|
|
167
|
+
- [BR1998]_
|
|
168
|
+
- [CM2000]_
|
|
169
|
+
"""
|
|
170
|
+
@staticmethod
|
|
171
|
+
def __classcall_private__(cls, alpha, beta, gamma, base_ring=None):
|
|
172
|
+
r"""
|
|
173
|
+
Standardize input to ensure a unique representation.
|
|
174
|
+
|
|
175
|
+
TESTS::
|
|
176
|
+
|
|
177
|
+
sage: R.<a,b,g> = QQ[]
|
|
178
|
+
sage: DU1 = algebras.DownUp(a, 1, g)
|
|
179
|
+
sage: DU2 = algebras.DownUp(a, R.one(), g)
|
|
180
|
+
sage: DU3 = algebras.DownUp(a, 1, g, R)
|
|
181
|
+
sage: DU1 is DU2 and DU2 is DU3
|
|
182
|
+
True
|
|
183
|
+
"""
|
|
184
|
+
if base_ring is None:
|
|
185
|
+
from sage.structure.element import get_coercion_model
|
|
186
|
+
base_ring = get_coercion_model().common_parent(alpha, beta, gamma)
|
|
187
|
+
if base_ring not in Rings().Commutative():
|
|
188
|
+
raise TypeError("base ring must be a commutative ring")
|
|
189
|
+
alpha = base_ring(alpha)
|
|
190
|
+
beta = base_ring(beta)
|
|
191
|
+
gamma = base_ring(gamma)
|
|
192
|
+
return super().__classcall__(cls, alpha, beta, gamma, base_ring=base_ring)
|
|
193
|
+
|
|
194
|
+
def __init__(self, alpha, beta, gamma, base_ring):
|
|
195
|
+
r"""
|
|
196
|
+
Initialize ``self``.
|
|
197
|
+
|
|
198
|
+
EXAMPLES::
|
|
199
|
+
|
|
200
|
+
sage: R.<a,b,g> = QQ[]
|
|
201
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
202
|
+
sage: d, u = DU.gens()
|
|
203
|
+
sage: elts = [d, u, d^2, u^2, d*u, u*d]
|
|
204
|
+
sage: TestSuite(DU).run(elements=elts)
|
|
205
|
+
sage: elts += [d*(d*u)*u]
|
|
206
|
+
sage: TestSuite(DU).run(elements=elts) # long time
|
|
207
|
+
"""
|
|
208
|
+
self._alpha = alpha
|
|
209
|
+
self._beta = beta
|
|
210
|
+
self._gamma = gamma
|
|
211
|
+
cat = Algebras(base_ring).WithBasis().Graded()
|
|
212
|
+
if self._beta:
|
|
213
|
+
from sage.categories.domains import Domains
|
|
214
|
+
cat &= Domains()
|
|
215
|
+
indices = cartesian_product([NonNegativeIntegers()] * 3)
|
|
216
|
+
CombinatorialFreeModule.__init__(self, base_ring, indices, category=cat, sorting_reverse=True)
|
|
217
|
+
self._assign_names(['d', 'u'])
|
|
218
|
+
|
|
219
|
+
def _repr_(self):
|
|
220
|
+
r"""
|
|
221
|
+
Return a string representation of ``self``.
|
|
222
|
+
|
|
223
|
+
EXAMPLES::
|
|
224
|
+
|
|
225
|
+
sage: DU = algebras.DownUp(1, 2, 3)
|
|
226
|
+
sage: DU
|
|
227
|
+
Down-Up algebra with parameters (1, 2, 3) over Integer Ring
|
|
228
|
+
"""
|
|
229
|
+
return "Down-Up algebra with parameters ({}, {}, {}) over {}".format(
|
|
230
|
+
self._alpha, self._beta, self._gamma, self.base_ring())
|
|
231
|
+
|
|
232
|
+
def _latex_(self):
|
|
233
|
+
r"""
|
|
234
|
+
Return a latex representation of ``self``.
|
|
235
|
+
|
|
236
|
+
EXAMPLES::
|
|
237
|
+
|
|
238
|
+
sage: R.<a,b,g> = QQ[]
|
|
239
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
240
|
+
sage: latex(DU)
|
|
241
|
+
\mathcal{DU}(a,b,g)
|
|
242
|
+
"""
|
|
243
|
+
return "\\mathcal{DU}(%s,%s,%s)" % (self._alpha, self._beta, self._gamma)
|
|
244
|
+
|
|
245
|
+
def _repr_term(self, m):
|
|
246
|
+
r"""
|
|
247
|
+
Return a string representation of the basis element indexed by ``m``.
|
|
248
|
+
|
|
249
|
+
EXAMPLES::
|
|
250
|
+
|
|
251
|
+
sage: R.<a,b,g> = QQ[]
|
|
252
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
253
|
+
sage: I = DU.indices()
|
|
254
|
+
sage: DU._repr_term(I([1,0,5]))
|
|
255
|
+
'u*d^5'
|
|
256
|
+
sage: DU._repr_term(I([6,3,1]))
|
|
257
|
+
'u^6*(d*u)^3*d'
|
|
258
|
+
sage: DU._repr_term(I([0,1,2]))
|
|
259
|
+
'(d*u)*d^2'
|
|
260
|
+
sage: DU._repr_term(I([0,0,0]))
|
|
261
|
+
'1'
|
|
262
|
+
"""
|
|
263
|
+
if not any(m):
|
|
264
|
+
return '1'
|
|
265
|
+
ret = ''
|
|
266
|
+
for i, s in enumerate(['u', '(d*u)', 'd']):
|
|
267
|
+
if not m[i]:
|
|
268
|
+
continue
|
|
269
|
+
if ret:
|
|
270
|
+
ret += '*'
|
|
271
|
+
if m[i] == 1:
|
|
272
|
+
ret += s
|
|
273
|
+
else:
|
|
274
|
+
ret += f"{s}^{m[i]}"
|
|
275
|
+
return ret
|
|
276
|
+
|
|
277
|
+
def _latex_term(self, m):
|
|
278
|
+
r"""
|
|
279
|
+
Return a latex representation for the basis element indexed by ``m``.
|
|
280
|
+
|
|
281
|
+
EXAMPLES::
|
|
282
|
+
|
|
283
|
+
sage: R.<a,b,g> = QQ[]
|
|
284
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
285
|
+
sage: I = DU.indices()
|
|
286
|
+
sage: DU._latex_term(I([1,0,5]))
|
|
287
|
+
'ud^{5}'
|
|
288
|
+
sage: DU._latex_term(I([6,3,1]))
|
|
289
|
+
'u^{6}(du)^{3}d'
|
|
290
|
+
sage: DU._latex_term(I([0,1,2]))
|
|
291
|
+
'(du)d^{2}'
|
|
292
|
+
sage: DU._latex_term(I([0,0,0]))
|
|
293
|
+
'1'
|
|
294
|
+
"""
|
|
295
|
+
if all(val == 0 for val in m):
|
|
296
|
+
return '1'
|
|
297
|
+
ret = ''
|
|
298
|
+
for i, s in enumerate(['u', '(du)', 'd']):
|
|
299
|
+
if not m[i]:
|
|
300
|
+
continue
|
|
301
|
+
if m[i] == 1:
|
|
302
|
+
ret += s
|
|
303
|
+
else:
|
|
304
|
+
ret += f"{s}^{{{m[i]}}}"
|
|
305
|
+
return ret
|
|
306
|
+
|
|
307
|
+
@cached_method
|
|
308
|
+
def algebra_generators(self):
|
|
309
|
+
r"""
|
|
310
|
+
Return the algebra generators of ``self``.
|
|
311
|
+
|
|
312
|
+
EXAMPLES::
|
|
313
|
+
|
|
314
|
+
sage: DU = algebras.DownUp(2, 3, 4)
|
|
315
|
+
sage: dict(DU.algebra_generators())
|
|
316
|
+
{'d': d, 'u': u}
|
|
317
|
+
"""
|
|
318
|
+
u = self.monomial(self._indices([1,0,0]))
|
|
319
|
+
d = self.monomial(self._indices([0,0,1]))
|
|
320
|
+
return Family({'d': d, 'u': u})
|
|
321
|
+
|
|
322
|
+
@cached_method
|
|
323
|
+
def gens(self) -> tuple:
|
|
324
|
+
r"""
|
|
325
|
+
Return the generators of ``self``.
|
|
326
|
+
|
|
327
|
+
EXAMPLES::
|
|
328
|
+
|
|
329
|
+
sage: DU = algebras.DownUp(2, 3, 4)
|
|
330
|
+
sage: DU.gens()
|
|
331
|
+
(d, u)
|
|
332
|
+
"""
|
|
333
|
+
G = self.algebra_generators()
|
|
334
|
+
return (G['d'], G['u'])
|
|
335
|
+
|
|
336
|
+
@cached_method
|
|
337
|
+
def one_basis(self):
|
|
338
|
+
r"""
|
|
339
|
+
Return the index of the basis element of `1`.
|
|
340
|
+
|
|
341
|
+
EXAMPLES::
|
|
342
|
+
|
|
343
|
+
sage: DU = algebras.DownUp(2, 3, 4)
|
|
344
|
+
sage: DU.one_basis()
|
|
345
|
+
(0, 0, 0)
|
|
346
|
+
"""
|
|
347
|
+
return self._indices([0, 0, 0])
|
|
348
|
+
|
|
349
|
+
def product_on_basis(self, m1, m2):
|
|
350
|
+
r"""
|
|
351
|
+
Return the product of the basis elements indexed by ``m1`` and ``m2``.
|
|
352
|
+
|
|
353
|
+
EXAMPLES::
|
|
354
|
+
|
|
355
|
+
sage: R.<a,b,g> = QQ[]
|
|
356
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
357
|
+
sage: I = DU.indices()
|
|
358
|
+
sage: DU.product_on_basis(I([2,0,0]), I([4,0,0]))
|
|
359
|
+
u^6
|
|
360
|
+
sage: DU.product_on_basis(I([2,0,0]), I([0,4,0]))
|
|
361
|
+
u^2*(d*u)^4
|
|
362
|
+
sage: DU.product_on_basis(I([2,0,0]), I([0,0,4]))
|
|
363
|
+
u^2*d^4
|
|
364
|
+
sage: DU.product_on_basis(I([0,2,0]), I([0,4,0]))
|
|
365
|
+
(d*u)^6
|
|
366
|
+
sage: DU.product_on_basis(I([0,2,0]), I([0,0,4]))
|
|
367
|
+
(d*u)^2*d^4
|
|
368
|
+
sage: DU.product_on_basis(I([0,0,2]), I([0,0,4]))
|
|
369
|
+
d^6
|
|
370
|
+
sage: DU.product_on_basis(I([5,3,1]), I([1,0,4]))
|
|
371
|
+
u^5*(d*u)^4*d^4
|
|
372
|
+
|
|
373
|
+
sage: DU.product_on_basis(I([0,1,0]), I([1,0,0]))
|
|
374
|
+
b*u^2*d + a*u*(d*u) + g*u
|
|
375
|
+
sage: DU.product_on_basis(I([0,0,2]), I([1,0,0]))
|
|
376
|
+
b*u*d^2 + a*(d*u)*d + g*d
|
|
377
|
+
sage: DU.product_on_basis(I([0,0,1]), I([2,0,0]))
|
|
378
|
+
b*u^2*d + a*u*(d*u) + g*u
|
|
379
|
+
sage: DU.product_on_basis(I([0,0,1]), I([0,1,0]))
|
|
380
|
+
b*u*d^2 + a*(d*u)*d + g*d
|
|
381
|
+
|
|
382
|
+
sage: DU.product_on_basis(I([0,1,0]), I([3,0,0]))
|
|
383
|
+
(a^2*b+b^2)*u^4*d + (a^3+2*a*b)*u^3*(d*u) + (a^2*g+a*g+b*g+g)*u^3
|
|
384
|
+
sage: DU.product_on_basis(I([1,1,3]), I([0,1,1]))
|
|
385
|
+
(a^2*b^2+b^3)*u^3*d^6 + (a^3*b+a*b^2)*u^2*(d*u)*d^5 + (a^2*b*g+b^2*g)*u^2*d^5
|
|
386
|
+
+ (a^3+2*a*b)*u*(d*u)^2*d^4 + (a^2*g+a*g+b*g+g)*u*(d*u)*d^4
|
|
387
|
+
"""
|
|
388
|
+
# Check trivial cases
|
|
389
|
+
if not any(m1):
|
|
390
|
+
return self.monomial(m2)
|
|
391
|
+
if not any(m2):
|
|
392
|
+
return self.monomial(m1)
|
|
393
|
+
|
|
394
|
+
u1, du1, d1 = m1
|
|
395
|
+
u2, du2, d2 = m2
|
|
396
|
+
I = self._indices
|
|
397
|
+
|
|
398
|
+
if not d1:
|
|
399
|
+
if not u2:
|
|
400
|
+
return self.monomial(I([u1, du1+du2, d2]))
|
|
401
|
+
# else u2 > 0
|
|
402
|
+
if not du1:
|
|
403
|
+
return self.monomial(I([u1+u2, du2, d2]))
|
|
404
|
+
# Perform du * u reduction
|
|
405
|
+
lhs = self.monomial(I([u1, du1-1, 0]))
|
|
406
|
+
mid = self._from_dict({I([1,1,0]): self._alpha,
|
|
407
|
+
I([2,0,1]): self._beta,
|
|
408
|
+
I([1,0,0]): self._gamma})
|
|
409
|
+
rhs = self.monomial(I([u2-1, du2, d2]))
|
|
410
|
+
else: # d1 > 0
|
|
411
|
+
if not u2:
|
|
412
|
+
if not du2:
|
|
413
|
+
return self.monomial(I([u1, du1, d1+d2]))
|
|
414
|
+
# Perform a d * du reduction
|
|
415
|
+
lhs = self.monomial(I([u1, du1, d1-1]))
|
|
416
|
+
mid = self._from_dict({I([0,1,1]): self._alpha,
|
|
417
|
+
I([1,0,2]): self._beta,
|
|
418
|
+
I([0,0,1]): self._gamma})
|
|
419
|
+
rhs = self.monomial(I([0, du2-1, d2]))
|
|
420
|
+
elif u2 > 1:
|
|
421
|
+
# Perform d * u^2 reduction
|
|
422
|
+
lhs = self.monomial(I([u1, du1, d1-1]))
|
|
423
|
+
mid = self._from_dict({I([1,1,0]): self._alpha,
|
|
424
|
+
I([2,0,1]): self._beta,
|
|
425
|
+
I([1,0,0]): self._gamma})
|
|
426
|
+
rhs = self.monomial(I([u2-2, du2, d2]))
|
|
427
|
+
elif u2 == 1:
|
|
428
|
+
if d1 == 1:
|
|
429
|
+
return self.monomial(I([u1, du1+du2+1, d2]))
|
|
430
|
+
# Perform a d^2 * u reduction
|
|
431
|
+
lhs = self.monomial(I([u1, du1, d1-2]))
|
|
432
|
+
mid = self._from_dict({I([0,1,1]): self._alpha,
|
|
433
|
+
I([1,0,2]): self._beta,
|
|
434
|
+
I([0,0,1]): self._gamma})
|
|
435
|
+
rhs = self.monomial(I([0, du2, d2]))
|
|
436
|
+
|
|
437
|
+
if lhs == self.one():
|
|
438
|
+
if rhs == self.one():
|
|
439
|
+
return mid
|
|
440
|
+
return mid * rhs
|
|
441
|
+
if rhs == self.one():
|
|
442
|
+
return lhs * mid
|
|
443
|
+
return lhs * mid * rhs
|
|
444
|
+
|
|
445
|
+
def degree_on_basis(self, m):
|
|
446
|
+
r"""
|
|
447
|
+
Return the degree of the basis element indexed by ``m``.
|
|
448
|
+
|
|
449
|
+
EXAMPLES::
|
|
450
|
+
|
|
451
|
+
sage: R.<a,b,g> = QQ[]
|
|
452
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
453
|
+
sage: I = DU.indices()
|
|
454
|
+
sage: DU.degree_on_basis(I([0, 3, 2]))
|
|
455
|
+
-2
|
|
456
|
+
sage: DU.degree_on_basis(I([2, 3, 0]))
|
|
457
|
+
2
|
|
458
|
+
sage: DU.degree_on_basis(I([2, 0, 3]))
|
|
459
|
+
-1
|
|
460
|
+
sage: DU.degree_on_basis(I([3, 10, 3]))
|
|
461
|
+
0
|
|
462
|
+
"""
|
|
463
|
+
return m[0] - m[2]
|
|
464
|
+
|
|
465
|
+
def verma_module(self, la):
|
|
466
|
+
r"""
|
|
467
|
+
Return the :class:`Verma module
|
|
468
|
+
<sage.algebras.down_up_algebra.VermaModule>`
|
|
469
|
+
`V(\lambda)` of ``self``.
|
|
470
|
+
|
|
471
|
+
EXAMPLES::
|
|
472
|
+
|
|
473
|
+
sage: R.<a,b,g> = QQ[]
|
|
474
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
475
|
+
sage: DU.verma_module(5)
|
|
476
|
+
Verma module of weight 5 of Down-Up algebra with parameters (a, b, g)
|
|
477
|
+
over Multivariate Polynomial Ring in a, b, g over Rational Field
|
|
478
|
+
"""
|
|
479
|
+
return VermaModule(self, la)
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
class VermaModule(CombinatorialFreeModule):
|
|
483
|
+
r"""
|
|
484
|
+
The Verma module `V(\lambda)` of a down-up algebra.
|
|
485
|
+
|
|
486
|
+
The Verma module `V(\lambda)` for the down-up algebra generated
|
|
487
|
+
by `d, u` is the span of `\{v_n \mid n \in \ZZ_{\geq 0} \}`
|
|
488
|
+
satisfying the relations
|
|
489
|
+
|
|
490
|
+
.. MATH::
|
|
491
|
+
|
|
492
|
+
d \cdot v_n = \lambda_{n-1} v_{n-1}, \qquad\qquad
|
|
493
|
+
u \cdot v_n = v_{n+1},
|
|
494
|
+
|
|
495
|
+
where `\lambda_n = \alpha \lambda_{n-1} + \beta \lambda_{n-2} + \gamma`
|
|
496
|
+
and we set `\lambda_0 = \lambda` and `\lambda_{-1} = 0`.
|
|
497
|
+
|
|
498
|
+
By Proposition 2.4 in [BR1998]_, `V(\lambda)` is simple if and
|
|
499
|
+
only if `\lambda_n \neq 0` for all `n \geq 0`. Moreover, a maximal
|
|
500
|
+
submodule is spanned by `\{ v_n \mid n > m \}`, where `m` is the
|
|
501
|
+
minimal index such that `\lambda_m = 0`. Moreover, this is unique
|
|
502
|
+
unless `\gamma = \lambda = 0`.
|
|
503
|
+
|
|
504
|
+
EXAMPLES::
|
|
505
|
+
|
|
506
|
+
sage: R.<a,b> = QQ[]
|
|
507
|
+
sage: DU = algebras.DownUp(0, b, 1)
|
|
508
|
+
sage: d, u = DU.gens()
|
|
509
|
+
sage: V = DU.verma_module(a)
|
|
510
|
+
sage: list(V.weights()[:6])
|
|
511
|
+
[a, 1, a*b + 1, b + 1, a*b^2 + b + 1, b^2 + b + 1]
|
|
512
|
+
sage: v = V.basis()
|
|
513
|
+
sage: d^2 * v[2]
|
|
514
|
+
a*v[0]
|
|
515
|
+
sage: d * (d * v[2])
|
|
516
|
+
a*v[0]
|
|
517
|
+
|
|
518
|
+
The weight is computed by looking at the scalars associated to the
|
|
519
|
+
action of `du` and `ud`::
|
|
520
|
+
|
|
521
|
+
sage: d*u * v[3]
|
|
522
|
+
(b+1)*v[3]
|
|
523
|
+
sage: u*d * v[3]
|
|
524
|
+
(a*b+1)*v[3]
|
|
525
|
+
sage: v[3].weight()
|
|
526
|
+
(b + 1, a*b + 1)
|
|
527
|
+
|
|
528
|
+
An `U(\mathfrak{sl}_2)` example::
|
|
529
|
+
|
|
530
|
+
sage: DU = algebras.DownUp(2, -1, -2)
|
|
531
|
+
sage: d, u = DU.gens()
|
|
532
|
+
sage: V = DU.verma_module(5)
|
|
533
|
+
sage: list(V.weights()[:10])
|
|
534
|
+
[5, 8, 9, 8, 5, 0, -7, -16, -27, -40]
|
|
535
|
+
sage: v6 = V.basis()[6]
|
|
536
|
+
sage: d * v6
|
|
537
|
+
0
|
|
538
|
+
sage: [V.basis()[i].weight() for i in range(6)]
|
|
539
|
+
[(5, 0), (8, 5), (9, 8), (8, 9), (5, 8), (0, 5)]
|
|
540
|
+
|
|
541
|
+
Note that these are the same `\mathfrak{sl}_2` weights from the usual
|
|
542
|
+
construction of the irreducible representation `V(5)` (but they are
|
|
543
|
+
different as `\mathfrak{gl}_2` weights)::
|
|
544
|
+
|
|
545
|
+
sage: B = crystals.Tableaux(['A',1], shape=[5]) # needs sage.graphs
|
|
546
|
+
sage: [b.weight() for b in B] # needs sage.graphs
|
|
547
|
+
[(5, 0), (4, 1), (3, 2), (2, 3), (1, 4), (0, 5)]
|
|
548
|
+
|
|
549
|
+
An example with periodic weights (see Theorem 2.13 of [BR1998]_)::
|
|
550
|
+
|
|
551
|
+
sage: # needs sage.rings.number_field
|
|
552
|
+
sage: k.<z6> = CyclotomicField(6)
|
|
553
|
+
sage: al = z6 + 1
|
|
554
|
+
sage: (al - 1)^6 == 1
|
|
555
|
+
True
|
|
556
|
+
sage: DU = algebras.DownUp(al, 1-al, 0)
|
|
557
|
+
sage: V = DU.verma_module(5)
|
|
558
|
+
sage: list(V.weights()[:8])
|
|
559
|
+
[5, 5*z6 + 5, 10*z6, 10*z6 - 5, 5*z6 - 5, 0, 5, 5*z6 + 5]
|
|
560
|
+
"""
|
|
561
|
+
@staticmethod
|
|
562
|
+
def __classcall_private__(cls, DU, la):
|
|
563
|
+
"""
|
|
564
|
+
Normalize input to ensure a unique representation.
|
|
565
|
+
|
|
566
|
+
EXAMPLES::
|
|
567
|
+
|
|
568
|
+
sage: R.<a,b,g> = QQ[]
|
|
569
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
570
|
+
sage: from sage.algebras.down_up_algebra import VermaModule
|
|
571
|
+
sage: VermaModule(DU, 5) is VermaModule(DU, R(5))
|
|
572
|
+
True
|
|
573
|
+
sage: VermaModule(DU, 1/a)
|
|
574
|
+
Traceback (most recent call last):
|
|
575
|
+
...
|
|
576
|
+
TypeError: fraction must have unit denominator
|
|
577
|
+
"""
|
|
578
|
+
R = DU.base_ring()
|
|
579
|
+
la = R(la)
|
|
580
|
+
return super().__classcall__(cls, DU, la)
|
|
581
|
+
|
|
582
|
+
def __init__(self, DU, la):
|
|
583
|
+
"""
|
|
584
|
+
Initialize ``self``.
|
|
585
|
+
|
|
586
|
+
EXAMPLES::
|
|
587
|
+
|
|
588
|
+
sage: R.<a,b,g> = QQ[]
|
|
589
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
590
|
+
sage: V = DU.verma_module(5)
|
|
591
|
+
sage: TestSuite(V).run()
|
|
592
|
+
sage: V = DU.verma_module(0)
|
|
593
|
+
sage: TestSuite(V).run()
|
|
594
|
+
|
|
595
|
+
sage: DU = algebras.DownUp(a, 0, g)
|
|
596
|
+
sage: V = DU.verma_module(5)
|
|
597
|
+
sage: TestSuite(V).run()
|
|
598
|
+
sage: V = DU.verma_module(0)
|
|
599
|
+
sage: TestSuite(V).run()
|
|
600
|
+
|
|
601
|
+
sage: DU = algebras.DownUp(a, 1-a, 0)
|
|
602
|
+
sage: V = DU.verma_module(5)
|
|
603
|
+
sage: TestSuite(V).run()
|
|
604
|
+
sage: V = DU.verma_module(0)
|
|
605
|
+
sage: TestSuite(V).run()
|
|
606
|
+
"""
|
|
607
|
+
self._DU = DU
|
|
608
|
+
R = DU.base_ring()
|
|
609
|
+
|
|
610
|
+
def _la_iter():
|
|
611
|
+
m2 = la
|
|
612
|
+
yield la
|
|
613
|
+
m2 = R.zero()
|
|
614
|
+
m1 = la
|
|
615
|
+
while True:
|
|
616
|
+
cur = DU._alpha * m1 + DU._beta * m2 + DU._gamma
|
|
617
|
+
yield cur
|
|
618
|
+
m2 = m1
|
|
619
|
+
m1 = cur
|
|
620
|
+
|
|
621
|
+
self._weights = lazy_list(_la_iter())
|
|
622
|
+
cat = Modules(R).WithBasis()
|
|
623
|
+
CombinatorialFreeModule.__init__(self, R, NonNegativeIntegers(),
|
|
624
|
+
prefix='v', category=cat)
|
|
625
|
+
|
|
626
|
+
def _repr_(self):
|
|
627
|
+
r"""
|
|
628
|
+
Return a string representation of ``self``.
|
|
629
|
+
|
|
630
|
+
EXAMPLES::
|
|
631
|
+
|
|
632
|
+
sage: DU = algebras.DownUp(1, 2, 3)
|
|
633
|
+
sage: DU.verma_module(5)
|
|
634
|
+
Verma module of weight 5 of Down-Up algebra with parameters (1, 2, 3) over Integer Ring
|
|
635
|
+
"""
|
|
636
|
+
return f"Verma module of weight {self._weights[0]} of {self._DU}"
|
|
637
|
+
|
|
638
|
+
def _latex_(self):
|
|
639
|
+
r"""
|
|
640
|
+
Return a latex representation of ``self``.
|
|
641
|
+
|
|
642
|
+
EXAMPLES::
|
|
643
|
+
|
|
644
|
+
sage: DU = algebras.DownUp(1, 2, 3)
|
|
645
|
+
sage: latex(DU.verma_module(5))
|
|
646
|
+
V\left(5\right)
|
|
647
|
+
"""
|
|
648
|
+
return f"V\\left({self._weights[0]}\\right)"
|
|
649
|
+
|
|
650
|
+
def highest_weight_vector(self):
|
|
651
|
+
r"""
|
|
652
|
+
Return the highest weight vector of ``self`` that generates
|
|
653
|
+
``self`` as a down-up module.
|
|
654
|
+
|
|
655
|
+
EXAMPLES::
|
|
656
|
+
|
|
657
|
+
sage: DU = algebras.DownUp(1, 2, 3)
|
|
658
|
+
sage: V = DU.verma_module(5)
|
|
659
|
+
sage: V.highest_weight_vector()
|
|
660
|
+
v[0]
|
|
661
|
+
"""
|
|
662
|
+
return self.basis()[0]
|
|
663
|
+
|
|
664
|
+
def weights(self):
|
|
665
|
+
r"""
|
|
666
|
+
Return the sequence of weights `(\lambda_n)_{n=0}^{\infty}`.
|
|
667
|
+
|
|
668
|
+
EXAMPLES::
|
|
669
|
+
|
|
670
|
+
sage: R.<a,b,g> = QQ[]
|
|
671
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
672
|
+
sage: V = DU.verma_module(5)
|
|
673
|
+
sage: V.weights()
|
|
674
|
+
lazy list [5, 5*a + g, 5*a^2 + a*g + 5*b + g, ...]
|
|
675
|
+
|
|
676
|
+
sage: V = DU.verma_module(0)
|
|
677
|
+
sage: DU = algebras.DownUp(a, 1-a, 0)
|
|
678
|
+
sage: V = DU.verma_module(0)
|
|
679
|
+
sage: V.weights()
|
|
680
|
+
lazy list [0, 0, 0, ...]
|
|
681
|
+
|
|
682
|
+
We reproduce the Fibonacci numbers example from [BR1998]_::
|
|
683
|
+
|
|
684
|
+
sage: R.<la> = QQ[]
|
|
685
|
+
sage: DU = algebras.DownUp(1, 1, 0, R)
|
|
686
|
+
sage: V = DU.verma_module(la)
|
|
687
|
+
sage: list(V.weights()[:11])
|
|
688
|
+
[la, la, 2*la, 3*la, 5*la, 8*la, 13*la, 21*la, 34*la, 55*la, 89*la]
|
|
689
|
+
"""
|
|
690
|
+
return self._weights
|
|
691
|
+
|
|
692
|
+
def _action_on_basis(self, m, n):
|
|
693
|
+
r"""
|
|
694
|
+
Return the action of a basis element of the down-up algebra indexed
|
|
695
|
+
by ``m`` on the basis element of ``self`` indexed by ``n``.
|
|
696
|
+
|
|
697
|
+
EXAMPLES::
|
|
698
|
+
|
|
699
|
+
sage: R.<a,b,g> = QQ[]
|
|
700
|
+
sage: DU = algebras.DownUp(0, b, 1)
|
|
701
|
+
sage: I = DU.indices()
|
|
702
|
+
sage: V = DU.verma_module(1)
|
|
703
|
+
sage: V.weights()
|
|
704
|
+
lazy list [1, 1, b + 1, ...]
|
|
705
|
+
sage: V._action_on_basis(I([0,0,1]), 0)
|
|
706
|
+
0
|
|
707
|
+
sage: V._action_on_basis(I([0,1,0]), 0)
|
|
708
|
+
v[0]
|
|
709
|
+
sage: V._action_on_basis(I([1,0,0]), 0)
|
|
710
|
+
v[1]
|
|
711
|
+
|
|
712
|
+
sage: V._action_on_basis(I([0,0,1]), 3)
|
|
713
|
+
(b+1)*v[2]
|
|
714
|
+
sage: V._action_on_basis(I([0,1,0]), 3)
|
|
715
|
+
(b+1)*v[3]
|
|
716
|
+
sage: V._action_on_basis(I([1,0,0]), 3)
|
|
717
|
+
v[4]
|
|
718
|
+
|
|
719
|
+
sage: V._action_on_basis(I([0,0,3]), 3)
|
|
720
|
+
(b+1)*v[0]
|
|
721
|
+
sage: V._action_on_basis(I([1,2,1]), 3)
|
|
722
|
+
(b^3+3*b^2+3*b+1)*v[3]
|
|
723
|
+
|
|
724
|
+
sage: V = DU.verma_module(0)
|
|
725
|
+
sage: V._action_on_basis(I([0,0,1]), 1)
|
|
726
|
+
0
|
|
727
|
+
"""
|
|
728
|
+
if m[2] > n:
|
|
729
|
+
return self.zero()
|
|
730
|
+
np = n - m[2]
|
|
731
|
+
coeff = prod(self._weights[np:n]) * self._weights[np] ** m[1]
|
|
732
|
+
return self.term(n - m[2] + m[0], coeff)
|
|
733
|
+
|
|
734
|
+
class Element(CombinatorialFreeModule.Element):
|
|
735
|
+
r"""
|
|
736
|
+
An element of a Verma module of a down-up algebra.
|
|
737
|
+
"""
|
|
738
|
+
def _acted_upon_(self, scalar, self_on_left):
|
|
739
|
+
r"""
|
|
740
|
+
Return the action of ``scalar`` (an element of the base ring or
|
|
741
|
+
the defining down-up algebra) on ``self``.
|
|
742
|
+
|
|
743
|
+
EXAMPLES::
|
|
744
|
+
|
|
745
|
+
sage: R.<a,b> = QQ[]
|
|
746
|
+
sage: DU = algebras.DownUp(0, b, 1)
|
|
747
|
+
sage: d, u = DU.gens()
|
|
748
|
+
sage: V = DU.verma_module(a)
|
|
749
|
+
sage: it = iter(DU.basis())
|
|
750
|
+
sage: scalars = [next(it) for _ in range(10)]; scalars
|
|
751
|
+
[1, u, (d*u), d, u^2, u*(d*u), u*d, (d*u)^2, (d*u)*d, d^2]
|
|
752
|
+
sage: vecs = [V.basis()[0], V.basis()[1], V.basis()[6]]
|
|
753
|
+
sage: all((x * y) * v == x * (y * v)
|
|
754
|
+
....: for x in scalars for y in scalars for v in vecs)
|
|
755
|
+
True
|
|
756
|
+
sage: 5 * V.basis()[3]
|
|
757
|
+
5*v[3]
|
|
758
|
+
sage: V.basis()[0] * d
|
|
759
|
+
Traceback (most recent call last):
|
|
760
|
+
...
|
|
761
|
+
TypeError: unsupported operand parent(s) for *:
|
|
762
|
+
'Verma module of weight a of Down-Up algebra ...'
|
|
763
|
+
and 'Down-Up algebra ...'
|
|
764
|
+
"""
|
|
765
|
+
ret = super()._acted_upon_(scalar, self_on_left)
|
|
766
|
+
if ret is not None:
|
|
767
|
+
return ret
|
|
768
|
+
P = self.parent()
|
|
769
|
+
try:
|
|
770
|
+
scalar = P._DU(scalar)
|
|
771
|
+
except (TypeError, ValueError):
|
|
772
|
+
return None
|
|
773
|
+
if self_on_left:
|
|
774
|
+
return None
|
|
775
|
+
return P.linear_combination((P._action_on_basis(m, n), mc*nc)
|
|
776
|
+
for m, mc in scalar._monomial_coefficients.items()
|
|
777
|
+
for n, nc in self._monomial_coefficients.items())
|
|
778
|
+
|
|
779
|
+
def is_weight_vector(self):
|
|
780
|
+
r"""
|
|
781
|
+
Return if ``self`` is a weight vector.
|
|
782
|
+
|
|
783
|
+
EXAMPLES::
|
|
784
|
+
|
|
785
|
+
sage: DU = algebras.DownUp(2, -1, -2)
|
|
786
|
+
sage: V = DU.verma_module(5)
|
|
787
|
+
sage: V.zero().is_weight_vector()
|
|
788
|
+
False
|
|
789
|
+
sage: B = V.basis()
|
|
790
|
+
sage: [B[i].weight() for i in range(6)]
|
|
791
|
+
[(5, 0), (8, 5), (9, 8), (8, 9), (5, 8), (0, 5)]
|
|
792
|
+
sage: B[5].is_weight_vector()
|
|
793
|
+
True
|
|
794
|
+
sage: v = B[0] + B[1]
|
|
795
|
+
sage: v.is_weight_vector()
|
|
796
|
+
False
|
|
797
|
+
|
|
798
|
+
sage: DU = algebras.DownUp(2, -1, 0)
|
|
799
|
+
sage: V = DU.verma_module(0)
|
|
800
|
+
sage: B = V.basis()
|
|
801
|
+
sage: v = sum(i*B[i] for i in range(1,5))
|
|
802
|
+
sage: v.is_weight_vector()
|
|
803
|
+
True
|
|
804
|
+
"""
|
|
805
|
+
if not self:
|
|
806
|
+
return False
|
|
807
|
+
|
|
808
|
+
P = self.parent()
|
|
809
|
+
R = P.base_ring()
|
|
810
|
+
|
|
811
|
+
def get_wt(n):
|
|
812
|
+
if not n:
|
|
813
|
+
return (R(P._weights[0]), R.zero())
|
|
814
|
+
return (R(P._weights[n]), R(P._weights[n-1]))
|
|
815
|
+
|
|
816
|
+
it = iter(self._monomial_coefficients)
|
|
817
|
+
wt = get_wt(next(it))
|
|
818
|
+
return all(get_wt(n) == wt for n in it)
|
|
819
|
+
|
|
820
|
+
def weight(self):
|
|
821
|
+
r"""
|
|
822
|
+
Return the weight of ``self``.
|
|
823
|
+
|
|
824
|
+
For `v_n`, this is the vector with the pair
|
|
825
|
+
`(\lambda_n, \lambda_{n-1})`.
|
|
826
|
+
|
|
827
|
+
EXAMPLES::
|
|
828
|
+
|
|
829
|
+
sage: R.<a,b,g> = QQ[]
|
|
830
|
+
sage: DU = algebras.DownUp(a, b, g)
|
|
831
|
+
sage: V = DU.verma_module(5)
|
|
832
|
+
sage: B = V.basis()
|
|
833
|
+
sage: B[0].weight()
|
|
834
|
+
(5, 0)
|
|
835
|
+
sage: B[1].weight()
|
|
836
|
+
(5*a + g, 5)
|
|
837
|
+
sage: B[2].weight()
|
|
838
|
+
(5*a^2 + a*g + 5*b + g, 5*a + g)
|
|
839
|
+
|
|
840
|
+
sage: V.zero().weight()
|
|
841
|
+
Traceback (most recent call last):
|
|
842
|
+
...
|
|
843
|
+
ValueError: the zero element does not have well-defined weight
|
|
844
|
+
sage: (B[0] + B[1]).weight()
|
|
845
|
+
Traceback (most recent call last):
|
|
846
|
+
...
|
|
847
|
+
ValueError: not a weight vector
|
|
848
|
+
"""
|
|
849
|
+
if not self:
|
|
850
|
+
raise ValueError("the zero element does not have well-defined weight")
|
|
851
|
+
if not self.is_weight_vector():
|
|
852
|
+
raise ValueError("not a weight vector")
|
|
853
|
+
P = self.parent()
|
|
854
|
+
R = P.base_ring()
|
|
855
|
+
V = FreeModule(R, 2)
|
|
856
|
+
it = iter(self._monomial_coefficients)
|
|
857
|
+
n = next(it)
|
|
858
|
+
if not n:
|
|
859
|
+
return V([P._weights[0], R.zero()])
|
|
860
|
+
return V([P._weights[n], P._weights[n - 1]])
|