passagemath-combinat 10.6.31rc3__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.
Potentially problematic release.
This version of passagemath-combinat might be problematic. Click here for more details.
- passagemath_combinat-10.6.31rc3.dist-info/METADATA +159 -0
- passagemath_combinat-10.6.31rc3.dist-info/RECORD +399 -0
- passagemath_combinat-10.6.31rc3.dist-info/WHEEL +5 -0
- passagemath_combinat-10.6.31rc3.dist-info/top_level.txt +2 -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 +25 -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 +765 -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,935 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-combinat
|
|
2
|
+
# sage.doctest: needs sage.combinat sage.modules
|
|
3
|
+
"""
|
|
4
|
+
Askey-Wilson Algebras
|
|
5
|
+
|
|
6
|
+
AUTHORS:
|
|
7
|
+
|
|
8
|
+
- Travis Scrimshaw (2018-08): initial version
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
# ****************************************************************************
|
|
12
|
+
# Copyright (C) 2018 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.cartesian_product import cartesian_product
|
|
24
|
+
from sage.categories.rings import Rings
|
|
25
|
+
from sage.combinat.free_module import CombinatorialFreeModule
|
|
26
|
+
from sage.modules.with_basis.morphism import ModuleMorphismByLinearity
|
|
27
|
+
from sage.sets.family import Family
|
|
28
|
+
from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing
|
|
29
|
+
from sage.sets.non_negative_integers import NonNegativeIntegers
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class AskeyWilsonAlgebra(CombinatorialFreeModule):
|
|
33
|
+
r"""
|
|
34
|
+
The (universal) Askey-Wilson algebra.
|
|
35
|
+
|
|
36
|
+
Let `R` be a commutative ring. The *universal Askey-Wilson* algebra
|
|
37
|
+
is an associative unital algebra `\Delta_q` over `R[q,q^-1]` given
|
|
38
|
+
by the generators `A, B, C, \alpha, \beta, \gamma` that satisfy the
|
|
39
|
+
following relations:
|
|
40
|
+
|
|
41
|
+
.. MATH::
|
|
42
|
+
|
|
43
|
+
\begin{aligned}
|
|
44
|
+
(q-q^{-1}) \alpha &= (q^2-q^{-2}) A + qBC - q^{-1}CB, \\
|
|
45
|
+
(q-q^{-1}) \beta &= (q^2-q^{-2}) B + qCA - q^{-1}AC, \\
|
|
46
|
+
(q-q^{-1}) \gamma &= (q^2-q^{-2}) C + qAB - q^{-1}BA.
|
|
47
|
+
\end{aligned}
|
|
48
|
+
|
|
49
|
+
The universal Askey-Wilson contains a
|
|
50
|
+
:meth:`Casimir element <casimir_element>` `\Omega`, and the elements
|
|
51
|
+
`\alpha`, `\beta`, `\gamma`, `\Omega` generate the center of `\Delta_q`,
|
|
52
|
+
which is isomorphic to the polynomial ring
|
|
53
|
+
`(R[q,q^-1])[\alpha,\beta,\gamma,\Omega]` (assuming `q` is not a root
|
|
54
|
+
of unity). Furthermore, the relations imply that `\Delta_q` has a basis
|
|
55
|
+
given by monomials `A^i B^j C^k \alpha^r \beta^s \gamma^t`, where
|
|
56
|
+
`i, j, k, r, s, t \in \ZZ_{\geq 0}`.
|
|
57
|
+
|
|
58
|
+
The universal Askey-Wilson algebra also admits a faithful action
|
|
59
|
+
of `PSL_2(\ZZ)` given by the automorphisms `\rho`
|
|
60
|
+
(:meth:`permutation_automorphism`):
|
|
61
|
+
|
|
62
|
+
.. MATH::
|
|
63
|
+
|
|
64
|
+
A \mapsto B \mapsto C \mapsto A,
|
|
65
|
+
\qquad
|
|
66
|
+
\alpha \mapsto \beta \mapsto \gamma \mapsto \alpha.
|
|
67
|
+
|
|
68
|
+
and `\sigma` (:meth:`reflection_automorphism`):
|
|
69
|
+
|
|
70
|
+
.. MATH::
|
|
71
|
+
|
|
72
|
+
A \mapsto B \mapsto A,
|
|
73
|
+
C \mapsto C + \frac{AB - BA}{q-q^{-1}},
|
|
74
|
+
\qquad
|
|
75
|
+
\alpha \mapsto \beta \mapsto \alpha,
|
|
76
|
+
\gamma \mapsto \gamma.
|
|
77
|
+
|
|
78
|
+
Note that `\rho^3 = \sigma^2 = 1` and
|
|
79
|
+
|
|
80
|
+
.. MATH::
|
|
81
|
+
|
|
82
|
+
\sigma(C) = C - q AB - (1+q^2) C + q \gamma
|
|
83
|
+
= C - q AB - q^2 C + q \gamma.
|
|
84
|
+
|
|
85
|
+
The Askey-Wilson `AW_q(a,b,c)` algebra is a specialization of the
|
|
86
|
+
universal Askey-Wilson algebra by `\alpha = a`, \beta = b`,
|
|
87
|
+
`\gamma = c`, where `a,b,c \in R`. `AW_q(a,b,c)` was first introduced
|
|
88
|
+
by [Zhedanov1991]_ to describe the Askey-Wilson polynomials. The
|
|
89
|
+
Askey-Wilson algebra has a central extension of `\Delta_q`.
|
|
90
|
+
|
|
91
|
+
INPUT:
|
|
92
|
+
|
|
93
|
+
- ``R`` -- a commutative ring
|
|
94
|
+
- ``q`` -- (optional) the parameter `q`; must be invertible in ``R``
|
|
95
|
+
|
|
96
|
+
If ``q`` is not specified, then ``R`` is taken to be the base
|
|
97
|
+
ring of a Laurent polynomial ring with variable `q`. Otherwise
|
|
98
|
+
the element ``q`` must be an element of ``R``.
|
|
99
|
+
|
|
100
|
+
.. NOTE::
|
|
101
|
+
|
|
102
|
+
No check is performed to ensure ``q`` is not a root of unity,
|
|
103
|
+
which may lead to violations of the results in [Terwilliger2011]_.
|
|
104
|
+
|
|
105
|
+
EXAMPLES:
|
|
106
|
+
|
|
107
|
+
We create the universal Askey-Wilson algebra and check
|
|
108
|
+
the defining relations::
|
|
109
|
+
|
|
110
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
111
|
+
sage: AW.inject_variables()
|
|
112
|
+
Defining A, B, C, a, b, g
|
|
113
|
+
sage: q = AW.q()
|
|
114
|
+
sage: (q^2-q^-2)*A + q*B*C - q^-1*C*B == (q-q^-1)*a
|
|
115
|
+
True
|
|
116
|
+
sage: (q^2-q^-2)*B + q*C*A - q^-1*A*C == (q-q^-1)*b
|
|
117
|
+
True
|
|
118
|
+
sage: (q^2-q^-2)*C + q*A*B - q^-1*B*A == (q-q^-1)*g
|
|
119
|
+
True
|
|
120
|
+
|
|
121
|
+
Next, we perform some computations::
|
|
122
|
+
|
|
123
|
+
sage: C * A
|
|
124
|
+
(q^-2)*A*C + (q^-3-q)*B - (q^-2-1)*b
|
|
125
|
+
sage: B^2 * g^2 * A
|
|
126
|
+
q^4*A*B^2*g^2 - (q^-1-q^7)*B*C*g^2 + (1-q^4)*B*g^3
|
|
127
|
+
+ (1-2*q^4+q^8)*A*g^2 - (q-q^3-q^5+q^7)*a*g^2
|
|
128
|
+
sage: (B^3 - A) * (C^2 + q*A*B)
|
|
129
|
+
q^7*A*B^4 + B^3*C^2 - (q^2-q^14)*B^3*C + (q-q^7)*B^3*g - q*A^2*B
|
|
130
|
+
+ (3*q^3-4*q^7+q^19)*A*B^2 - A*C^2 - (1-q^6-q^8+q^14)*B^2*a
|
|
131
|
+
- (q^-2-3*q^6+3*q^14-q^22)*B*C
|
|
132
|
+
+ (q^-1+q-3*q^3-q^5+2*q^7-q^9+q^13+q^15-q^19)*B*g
|
|
133
|
+
+ (2*q^-1-6*q^3+5*q^7-2*q^19+q^23)*A
|
|
134
|
+
- (2-2*q^2-4*q^4+4*q^6+q^8-q^10+q^12-q^14+q^16-q^18-q^20+q^22)*a
|
|
135
|
+
|
|
136
|
+
We check the elements `\alpha`, `\beta`, and `\gamma`
|
|
137
|
+
are in the center::
|
|
138
|
+
|
|
139
|
+
sage: all(x * gen == gen * x for gen in AW.algebra_generators() for x in [a,b,g])
|
|
140
|
+
True
|
|
141
|
+
|
|
142
|
+
We verify that the :meth:`Casimir element <casimir_element>`
|
|
143
|
+
is in the center::
|
|
144
|
+
|
|
145
|
+
sage: Omega = AW.casimir_element()
|
|
146
|
+
sage: all(x * Omega == Omega * x for x in [A,B,C])
|
|
147
|
+
True
|
|
148
|
+
|
|
149
|
+
sage: x = AW.an_element()
|
|
150
|
+
sage: O2 = Omega^2
|
|
151
|
+
sage: x * O2 == O2 * x
|
|
152
|
+
True
|
|
153
|
+
|
|
154
|
+
We prove Lemma 2.1 in [Terwilliger2011]_::
|
|
155
|
+
|
|
156
|
+
sage: (q^2-q^-2) * C == (q-q^-1) * g - (q*A*B - q^-1*B*A)
|
|
157
|
+
True
|
|
158
|
+
sage: (q-q^-1) * (q^2-q^-2) * a == (B^2*A - (q^2+q^-2)*B*A*B + A*B^2
|
|
159
|
+
....: + (q^2-q^-2)^2*A + (q-q^-1)^2*B*g)
|
|
160
|
+
True
|
|
161
|
+
sage: (q-q^-1) * (q^2-q^-2) * b == (A^2*B - (q^2+q^-2)*A*B*A + B*A^2
|
|
162
|
+
....: + (q^2-q^-2)^2*B + (q-q^-1)^2*A*g)
|
|
163
|
+
True
|
|
164
|
+
|
|
165
|
+
We prove Theorem 2.2 in [Terwilliger2011]_::
|
|
166
|
+
|
|
167
|
+
sage: q3 = q^-2 + 1 + q^2
|
|
168
|
+
sage: A^3*B - q3*A^2*B*A + q3*A*B*A^2 - B*A^3 == -(q^2-q^-2)^2 * (A*B - B*A)
|
|
169
|
+
True
|
|
170
|
+
sage: B^3*A - q3*B^2*A*B + q3*B*A*B^2 - A*B^3 == -(q^2-q^-2)^2 * (B*A - A*B)
|
|
171
|
+
True
|
|
172
|
+
sage: (A^2*B^2 - B^2*A^2 + (q^2+q^-2)*(B*A*B*A-A*B*A*B)
|
|
173
|
+
....: == -(q^1-q^-1)^2 * (A*B - B*A) * g)
|
|
174
|
+
True
|
|
175
|
+
|
|
176
|
+
We construct an Askey-Wilson algebra over `\GF{5}` at `q=2`::
|
|
177
|
+
|
|
178
|
+
sage: AW = algebras.AskeyWilson(GF(5), q=2)
|
|
179
|
+
sage: A,B,C,a,b,g = AW.algebra_generators()
|
|
180
|
+
sage: q = AW.q()
|
|
181
|
+
sage: Omega = AW.casimir_element()
|
|
182
|
+
|
|
183
|
+
sage: B * A
|
|
184
|
+
4*A*B + 2*g
|
|
185
|
+
sage: C * A
|
|
186
|
+
4*A*C + 2*b
|
|
187
|
+
sage: C * B
|
|
188
|
+
4*B*C + 2*a
|
|
189
|
+
sage: Omega^2
|
|
190
|
+
A^2*B^2*C^2 + A^3*B*C + A*B^3*C + A*B*C^3 + A^4 + 4*A^3*a
|
|
191
|
+
+ 2*A^2*B^2 + A^2*B*b + 2*A^2*C^2 + 4*A^2*C*g + 4*A^2*a^2
|
|
192
|
+
+ 4*A*B^2*a + 4*A*C^2*a + B^4 + B^3*b + 2*B^2*C^2 + 4*B^2*C*g
|
|
193
|
+
+ 4*B^2*b^2 + B*C^2*b + C^4 + 4*C^3*g + 4*C^2*g^2 + 2*a*b*g
|
|
194
|
+
|
|
195
|
+
sage: (q^2-q^-2)*A + q*B*C - q^-1*C*B == (q-q^-1)*a
|
|
196
|
+
True
|
|
197
|
+
sage: (q^2-q^-2)*B + q*C*A - q^-1*A*C == (q-q^-1)*b
|
|
198
|
+
True
|
|
199
|
+
sage: (q^2-q^-2)*C + q*A*B - q^-1*B*A == (q-q^-1)*g
|
|
200
|
+
True
|
|
201
|
+
sage: all(x * Omega == Omega * x for x in [A,B,C])
|
|
202
|
+
True
|
|
203
|
+
|
|
204
|
+
REFERENCES:
|
|
205
|
+
|
|
206
|
+
- [Terwilliger2011]_
|
|
207
|
+
"""
|
|
208
|
+
@staticmethod
|
|
209
|
+
def __classcall_private__(cls, R, q=None):
|
|
210
|
+
r"""
|
|
211
|
+
Normalize input to ensure a unique representation.
|
|
212
|
+
|
|
213
|
+
TESTS::
|
|
214
|
+
|
|
215
|
+
sage: R.<q> = LaurentPolynomialRing(QQ)
|
|
216
|
+
sage: AW1 = algebras.AskeyWilson(QQ)
|
|
217
|
+
sage: AW2 = algebras.AskeyWilson(R, q)
|
|
218
|
+
sage: AW1 is AW2
|
|
219
|
+
True
|
|
220
|
+
|
|
221
|
+
sage: AW = algebras.AskeyWilson(ZZ, 0)
|
|
222
|
+
Traceback (most recent call last):
|
|
223
|
+
...
|
|
224
|
+
ValueError: q cannot be 0
|
|
225
|
+
|
|
226
|
+
sage: AW = algebras.AskeyWilson(ZZ, 3)
|
|
227
|
+
Traceback (most recent call last):
|
|
228
|
+
...
|
|
229
|
+
ValueError: q=3 is not invertible in Integer Ring
|
|
230
|
+
"""
|
|
231
|
+
if q is None:
|
|
232
|
+
R = LaurentPolynomialRing(R, 'q')
|
|
233
|
+
q = R.gen()
|
|
234
|
+
else:
|
|
235
|
+
q = R(q)
|
|
236
|
+
if q == 0:
|
|
237
|
+
raise ValueError("q cannot be 0")
|
|
238
|
+
if 1 / q not in R:
|
|
239
|
+
raise ValueError("q={} is not invertible in {}".format(q, R))
|
|
240
|
+
if R not in Rings().Commutative():
|
|
241
|
+
raise ValueError("{} is not a commutative ring".format(R))
|
|
242
|
+
return super().__classcall__(cls, R, q)
|
|
243
|
+
|
|
244
|
+
def __init__(self, R, q) -> None:
|
|
245
|
+
r"""
|
|
246
|
+
Initialize ``self``.
|
|
247
|
+
|
|
248
|
+
EXAMPLES::
|
|
249
|
+
|
|
250
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
251
|
+
sage: TestSuite(AW).run() # long time
|
|
252
|
+
"""
|
|
253
|
+
self._q = q
|
|
254
|
+
cat = Algebras(Rings().Commutative()).WithBasis()
|
|
255
|
+
indices = cartesian_product([NonNegativeIntegers()]*6)
|
|
256
|
+
CombinatorialFreeModule.__init__(self, R, indices, prefix='AW',
|
|
257
|
+
sorting_key=_basis_key,
|
|
258
|
+
sorting_reverse=True,
|
|
259
|
+
category=cat)
|
|
260
|
+
self._assign_names('A,B,C,a,b,g')
|
|
261
|
+
|
|
262
|
+
def _repr_term(self, t) -> str:
|
|
263
|
+
r"""
|
|
264
|
+
Return a string representation of the basis element indexed by ``t``.
|
|
265
|
+
|
|
266
|
+
EXAMPLES::
|
|
267
|
+
|
|
268
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
269
|
+
sage: AW._repr_term((0,0,0,0,0,0))
|
|
270
|
+
'1'
|
|
271
|
+
sage: AW._repr_term((5,1,2,3,7,2))
|
|
272
|
+
'A^5*B*C^2*a^3*b^7*g^2'
|
|
273
|
+
sage: AW._repr_term((0,1,0,3,7,2))
|
|
274
|
+
'B*a^3*b^7*g^2'
|
|
275
|
+
"""
|
|
276
|
+
def exp(l, e):
|
|
277
|
+
if e == 0:
|
|
278
|
+
return ''
|
|
279
|
+
if e == 1:
|
|
280
|
+
return '*' + l
|
|
281
|
+
return '*' + l + '^{}'.format(e)
|
|
282
|
+
ret = ''.join(exp(l, e) for l, e in zip('ABCabg', t))
|
|
283
|
+
if not ret:
|
|
284
|
+
return '1'
|
|
285
|
+
if ret[0] == '*':
|
|
286
|
+
ret = ret[1:]
|
|
287
|
+
return ret
|
|
288
|
+
|
|
289
|
+
def _latex_term(self, t) -> str:
|
|
290
|
+
r"""
|
|
291
|
+
Return a latex representation of the basis element indexed by ``t``.
|
|
292
|
+
|
|
293
|
+
EXAMPLES::
|
|
294
|
+
|
|
295
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
296
|
+
sage: AW._latex_term((0,0,0,0,0,0))
|
|
297
|
+
'1'
|
|
298
|
+
sage: AW._latex_term((5,1,2,3,7,2))
|
|
299
|
+
'A^{5}BC^{2}\\alpha^{3}\\beta^{7}\\gamma^{2}'
|
|
300
|
+
sage: AW._latex_term((0,1,0,3,7,2))
|
|
301
|
+
'B\\alpha^{3}\\beta^{7}\\gamma^{2}'
|
|
302
|
+
"""
|
|
303
|
+
if sum(t) == 0:
|
|
304
|
+
return '1'
|
|
305
|
+
|
|
306
|
+
def exp(l, e):
|
|
307
|
+
if e == 0:
|
|
308
|
+
return ''
|
|
309
|
+
if e == 1:
|
|
310
|
+
return l
|
|
311
|
+
return l + '^{{{}}}'.format(e)
|
|
312
|
+
var_names = ['A', 'B', 'C', '\\alpha', '\\beta', '\\gamma']
|
|
313
|
+
return ''.join(exp(l, e) for l, e in zip(var_names, t))
|
|
314
|
+
|
|
315
|
+
def _repr_(self):
|
|
316
|
+
r"""
|
|
317
|
+
Return a string representation of ``self``.
|
|
318
|
+
|
|
319
|
+
EXAMPLES::
|
|
320
|
+
|
|
321
|
+
sage: algebras.AskeyWilson(QQ)
|
|
322
|
+
Askey-Wilon algebra with q=q over
|
|
323
|
+
Univariate Laurent Polynomial Ring in q over Rational Field
|
|
324
|
+
"""
|
|
325
|
+
return "Askey-Wilon algebra with q={} over {}".format(self._q, self.base_ring())
|
|
326
|
+
|
|
327
|
+
@cached_method
|
|
328
|
+
def algebra_generators(self):
|
|
329
|
+
r"""
|
|
330
|
+
Return the algebra generators of ``self``.
|
|
331
|
+
|
|
332
|
+
EXAMPLES::
|
|
333
|
+
|
|
334
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
335
|
+
sage: G = AW.algebra_generators()
|
|
336
|
+
sage: G['A']
|
|
337
|
+
A
|
|
338
|
+
sage: G['a']
|
|
339
|
+
a
|
|
340
|
+
sage: list(G)
|
|
341
|
+
[A, B, C, a, b, g]
|
|
342
|
+
"""
|
|
343
|
+
A = self.variable_names()
|
|
344
|
+
|
|
345
|
+
def build_monomial(g):
|
|
346
|
+
exp = [0] * 6
|
|
347
|
+
exp[A.index(g)] = 1
|
|
348
|
+
return self.monomial(self._indices(exp))
|
|
349
|
+
return Family(A, build_monomial)
|
|
350
|
+
|
|
351
|
+
@cached_method
|
|
352
|
+
def gens(self) -> tuple:
|
|
353
|
+
r"""
|
|
354
|
+
Return the generators of ``self``.
|
|
355
|
+
|
|
356
|
+
EXAMPLES::
|
|
357
|
+
|
|
358
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
359
|
+
sage: AW.gens()
|
|
360
|
+
(A, B, C, a, b, g)
|
|
361
|
+
"""
|
|
362
|
+
return tuple(self.algebra_generators())
|
|
363
|
+
|
|
364
|
+
@cached_method
|
|
365
|
+
def one_basis(self):
|
|
366
|
+
r"""
|
|
367
|
+
Return the index of the basis element `1` of ``self``.
|
|
368
|
+
|
|
369
|
+
EXAMPLES::
|
|
370
|
+
|
|
371
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
372
|
+
sage: AW.one_basis()
|
|
373
|
+
(0, 0, 0, 0, 0, 0)
|
|
374
|
+
"""
|
|
375
|
+
return self._indices([0]*6)
|
|
376
|
+
|
|
377
|
+
def q(self):
|
|
378
|
+
r"""
|
|
379
|
+
Return the parameter `q` of ``self``.
|
|
380
|
+
|
|
381
|
+
EXAMPLES::
|
|
382
|
+
|
|
383
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
384
|
+
sage: q = AW.q()
|
|
385
|
+
sage: q
|
|
386
|
+
q
|
|
387
|
+
sage: q.parent()
|
|
388
|
+
Univariate Laurent Polynomial Ring in q over Rational Field
|
|
389
|
+
"""
|
|
390
|
+
return self._q
|
|
391
|
+
|
|
392
|
+
@cached_method
|
|
393
|
+
def _an_element_(self):
|
|
394
|
+
r"""
|
|
395
|
+
Return an element of ``self``.
|
|
396
|
+
|
|
397
|
+
EXAMPLES::
|
|
398
|
+
|
|
399
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
400
|
+
sage: AW.an_element()
|
|
401
|
+
(q^-3+3+2*q+q^2)*a*b*g^3 + q*A*C^2*b + 3*q^2*B*a^2*g + A
|
|
402
|
+
"""
|
|
403
|
+
q = self._q
|
|
404
|
+
I = self._indices
|
|
405
|
+
R = self.base_ring()
|
|
406
|
+
elt = {I((1,0,0,0,0,0)): R(1),
|
|
407
|
+
I((1,0,2,0,1,0)): R.an_element(),
|
|
408
|
+
I((0,1,0,2,0,1)): q**2 * R(3),
|
|
409
|
+
I((0,0,0,1,1,3)): q**-3 + R(3) + R(2)*q + q**2}
|
|
410
|
+
return self.element_class(self, elt)
|
|
411
|
+
|
|
412
|
+
def some_elements(self):
|
|
413
|
+
r"""
|
|
414
|
+
Return some elements of ``self``.
|
|
415
|
+
|
|
416
|
+
EXAMPLES::
|
|
417
|
+
|
|
418
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
419
|
+
sage: AW.some_elements()
|
|
420
|
+
(A, B, C, a, b, g, 1,
|
|
421
|
+
(q^-3+3+2*q+q^2)*a*b*g^3 + q*A*C^2*b + 3*q^2*B*a^2*g + A,
|
|
422
|
+
q*A*B*C + q^2*A^2 - q*A*a + (q^-2)*B^2 - (q^-1)*B*b + q^2*C^2 - q*C*g)
|
|
423
|
+
"""
|
|
424
|
+
return self.gens() + (self.one(), self.an_element(), self.casimir_element())
|
|
425
|
+
|
|
426
|
+
@cached_method
|
|
427
|
+
def casimir_element(self):
|
|
428
|
+
r"""
|
|
429
|
+
Return the Casimir element of ``self``.
|
|
430
|
+
|
|
431
|
+
The Casimir element of the Askey-Wilson algebra `\Delta_q` is
|
|
432
|
+
|
|
433
|
+
.. MATH::
|
|
434
|
+
|
|
435
|
+
\Omega = q ABC + q^2 A^2 + q^{-2} B^2 + q^2 C^2
|
|
436
|
+
- q A\alpha - q^{-1} B\beta - q C\gamma.
|
|
437
|
+
|
|
438
|
+
The center `Z(\Delta_q)` is generated by `\alpha`, `\beta`,
|
|
439
|
+
`\gamma`, and `\Omega`.
|
|
440
|
+
|
|
441
|
+
EXAMPLES::
|
|
442
|
+
|
|
443
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
444
|
+
sage: AW.casimir_element()
|
|
445
|
+
q*A*B*C + q^2*A^2 - q*A*a + (q^-2)*B^2 - (q^-1)*B*b + q^2*C^2 - q*C*g
|
|
446
|
+
|
|
447
|
+
We check that the Casimir element is in the center::
|
|
448
|
+
|
|
449
|
+
sage: Omega = AW.casimir_element()
|
|
450
|
+
sage: all(Omega * gen == gen * Omega for gen in AW.algebra_generators())
|
|
451
|
+
True
|
|
452
|
+
"""
|
|
453
|
+
q = self._q
|
|
454
|
+
I = self._indices
|
|
455
|
+
d = {I((1, 1, 1, 0, 0, 0)): q, # q ABC
|
|
456
|
+
I((2, 0, 0, 0, 0, 0)): q**2, # q^2 A^2
|
|
457
|
+
I((0, 2, 0, 0, 0, 0)): q**-2, # q^-2 B^2
|
|
458
|
+
I((0, 0, 2, 0, 0, 0)): q**2, # q^2 C^2
|
|
459
|
+
I((1, 0, 0, 1, 0, 0)): -q, # -q A\alpha
|
|
460
|
+
I((0, 1, 0, 0, 1, 0)): -q**-1, # -q^-1 B\beta
|
|
461
|
+
I((0, 0, 1, 0, 0, 1)): -q} # -q C\gamma
|
|
462
|
+
return self.element_class(self, d)
|
|
463
|
+
|
|
464
|
+
@cached_method
|
|
465
|
+
def product_on_basis(self, x, y):
|
|
466
|
+
"""
|
|
467
|
+
Return the product of the basis elements indexed by ``x`` and ``y``.
|
|
468
|
+
|
|
469
|
+
INPUT:
|
|
470
|
+
|
|
471
|
+
- ``x``, ``y`` -- tuple of length 6
|
|
472
|
+
|
|
473
|
+
EXAMPLES::
|
|
474
|
+
|
|
475
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
476
|
+
sage: AW.product_on_basis((0,0,0,0,0,0), (3,5,2,0,12,3))
|
|
477
|
+
A^3*B^5*C^2*b^12*g^3
|
|
478
|
+
sage: AW.product_on_basis((0,0,0,5,3,5), (3,5,2,0,12,3))
|
|
479
|
+
A^3*B^5*C^2*a^5*b^15*g^8
|
|
480
|
+
sage: AW.product_on_basis((7,0,0,5,3,5), (0,5,2,0,12,3))
|
|
481
|
+
A^7*B^5*C^2*a^5*b^15*g^8
|
|
482
|
+
sage: AW.product_on_basis((7,3,0,5,3,5), (0,2,2,0,12,3))
|
|
483
|
+
A^7*B^5*C^2*a^5*b^15*g^8
|
|
484
|
+
sage: AW.product_on_basis((0,1,0,5,3,5), (2,0,0,0,5,3))
|
|
485
|
+
q^4*A^2*B*a^5*b^8*g^8 - (q^-3-q^5)*A*C*a^5*b^8*g^8
|
|
486
|
+
+ (1-q^4)*A*a^5*b^8*g^9 - (q^-4-2+q^4)*B*a^5*b^8*g^8
|
|
487
|
+
+ (q^-3-q^-1-q+q^3)*a^5*b^9*g^8
|
|
488
|
+
sage: AW.product_on_basis((0,2,1,0,2,0), (1,1,0,2,1,0))
|
|
489
|
+
q^4*A*B^3*C*a^2*b^3 - (q^5-q^9)*A^2*B^2*a^2*b^3
|
|
490
|
+
+ (q^2-q^4)*A*B^2*a^3*b^3 + (q^-3-q)*B^4*a^2*b^3
|
|
491
|
+
- (q^-2-1)*B^3*a^2*b^4 - (q-q^9)*B^2*C^2*a^2*b^3
|
|
492
|
+
+ (1-q^4)*B^2*C*a^2*b^3*g + (q^-4+2-5*q^4+2*q^12)*A*B*C*a^2*b^3
|
|
493
|
+
- (q^-1+q-2*q^3-2*q^5+q^7+q^9)*A*B*a^2*b^3*g
|
|
494
|
+
- (q^-3-q^3-2*q^5+q^7+q^9)*B*C*a^3*b^3
|
|
495
|
+
+ (q^-2-1-q^2+q^4)*B*a^3*b^3*g
|
|
496
|
+
- (q^-3-2*q+2*q^9-q^13)*A^2*a^2*b^3
|
|
497
|
+
+ (2*q^-2-2-3*q^2+3*q^4+q^10-q^12)*A*a^3*b^3
|
|
498
|
+
+ (q^-7-2*q^-3+2*q^5-q^9)*B^2*a^2*b^3
|
|
499
|
+
- (q^-6-q^-4-q^-2+1-q^2+q^4+q^6-q^8)*B*a^2*b^4
|
|
500
|
+
- (q^-7-q^-3-2*q+2*q^5+q^9-q^13)*C^2*a^2*b^3
|
|
501
|
+
+ (q^-6-3-2*q^2+5*q^4-q^8+q^10-q^12)*C*a^2*b^3*g
|
|
502
|
+
- (q^-1-2*q+2*q^5-q^7)*a^4*b^3
|
|
503
|
+
- (q^-3-q^-1-2*q+2*q^3+q^5-q^7)*a^2*b^3*g^2
|
|
504
|
+
"""
|
|
505
|
+
I = self._indices
|
|
506
|
+
# Commute the central parts to the right
|
|
507
|
+
lhs = list(x[:3])
|
|
508
|
+
rhs = list(y)
|
|
509
|
+
for i in range(3, 6):
|
|
510
|
+
rhs[i] += x[i]
|
|
511
|
+
|
|
512
|
+
# No ABC variables on the RHS to move past
|
|
513
|
+
if sum(rhs[:3]) == 0:
|
|
514
|
+
return self.monomial(I(lhs + rhs[3:]))
|
|
515
|
+
|
|
516
|
+
# We recurse using the PBW-type basis property:
|
|
517
|
+
# that YX = XY + lower order terms (see Theorem 4.1 in Terwilliger).
|
|
518
|
+
q = self._q
|
|
519
|
+
if lhs[2] > 0: # lhs has a C
|
|
520
|
+
if rhs[0] > 0: # rhs has an A to commute with C
|
|
521
|
+
lhs[2] -= 1
|
|
522
|
+
rhs[0] -= 1
|
|
523
|
+
rel = {I((1, 0, 1, 0, 0, 0)): q**-2, # q^2 AC
|
|
524
|
+
I((0, 1, 0, 0, 0, 0)): q**-3 - q**1, # q^-1(q^-2-q^2) B
|
|
525
|
+
I((0, 0, 0, 0, 1, 0)): 1 - q**-2} # -q^-1(q^-1-q) b
|
|
526
|
+
rel = self.element_class(self, rel)
|
|
527
|
+
return self.monomial(I(lhs+[0]*3)) * (rel * self.monomial(I(rhs)))
|
|
528
|
+
elif rhs[1] > 0: # rhs has a B to commute with C
|
|
529
|
+
lhs[2] -= 1
|
|
530
|
+
rhs[1] -= 1
|
|
531
|
+
rel = {I((0, 1, 1, 0, 0, 0)): q**2, # q^2 BC
|
|
532
|
+
I((1, 0, 0, 0, 0, 0)): q**3 - q**-1, # q(q^2-q^-2) A
|
|
533
|
+
I((0, 0, 0, 1, 0, 0)): -q**2 + 1} # -q(q-q^-1) a
|
|
534
|
+
rel = self.element_class(self, rel)
|
|
535
|
+
return self.monomial(I(lhs+[0]*3)) * (rel * self.monomial(I(rhs)))
|
|
536
|
+
else: # nothing to commute as rhs has no A nor B
|
|
537
|
+
rhs[2] += lhs[2]
|
|
538
|
+
rhs[1] = lhs[1]
|
|
539
|
+
rhs[0] = lhs[0]
|
|
540
|
+
return self.monomial(I(rhs))
|
|
541
|
+
|
|
542
|
+
elif lhs[1] > 0: # lhs has a B
|
|
543
|
+
if rhs[0] > 0: # rhs has an A to commute with B
|
|
544
|
+
lhs[1] -= 1
|
|
545
|
+
rhs[0] -= 1
|
|
546
|
+
rel = {I((1, 1, 0, 0, 0, 0)): q**2, # q^2 AB
|
|
547
|
+
I((0, 0, 1, 0, 0, 0)): q**3 - q**-1, # q(q^2-q^-2) C
|
|
548
|
+
I((0, 0, 0, 0, 0, 1)): -q**2 + 1} # -q(q-q^-1) g
|
|
549
|
+
rel = self.element_class(self, rel)
|
|
550
|
+
return self.monomial(I(lhs+[0]*3)) * (rel * self.monomial(I(rhs)))
|
|
551
|
+
else: # nothing to commute as rhs has no A
|
|
552
|
+
rhs[1] += lhs[1]
|
|
553
|
+
rhs[0] = lhs[0]
|
|
554
|
+
return self.monomial(I(rhs))
|
|
555
|
+
|
|
556
|
+
elif lhs[0] > 0: # lhs has an A
|
|
557
|
+
rhs[0] += lhs[0]
|
|
558
|
+
return self.monomial(I(rhs))
|
|
559
|
+
|
|
560
|
+
# otherwise, lhs is just 1
|
|
561
|
+
return self.monomial(I(rhs))
|
|
562
|
+
|
|
563
|
+
def permutation_automorphism(self):
|
|
564
|
+
r"""
|
|
565
|
+
Return the permutation automorphism `\rho` of ``self``.
|
|
566
|
+
|
|
567
|
+
We define the automorphism `\rho` by
|
|
568
|
+
|
|
569
|
+
.. MATH::
|
|
570
|
+
|
|
571
|
+
A \mapsto B \mapsto C \mapsto A,
|
|
572
|
+
\qquad
|
|
573
|
+
\alpha \mapsto \beta \mapsto \gamma \mapsto \alpha.
|
|
574
|
+
|
|
575
|
+
EXAMPLES::
|
|
576
|
+
|
|
577
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
578
|
+
sage: rho = AW.permutation_automorphism()
|
|
579
|
+
sage: [rho(gen) for gen in AW.algebra_generators()]
|
|
580
|
+
[B, C, A, b, g, a]
|
|
581
|
+
|
|
582
|
+
sage: AW.an_element()
|
|
583
|
+
(q^-3+3+2*q+q^2)*a*b*g^3 + q*A*C^2*b + 3*q^2*B*a^2*g + A
|
|
584
|
+
sage: rho(AW.an_element())
|
|
585
|
+
(q^-3+3+2*q+q^2)*a^3*b*g + q^5*A^2*B*g + 3*q^2*C*a*b^2
|
|
586
|
+
- (q^-2-q^6)*A*C*g + (q-q^5)*A*g^2 - (q^-3-2*q+q^5)*B*g
|
|
587
|
+
+ (q^-2-1-q^2+q^4)*b*g + B
|
|
588
|
+
|
|
589
|
+
sage: r3 = rho * rho * rho
|
|
590
|
+
sage: [r3(gen) for gen in AW.algebra_generators()]
|
|
591
|
+
[A, B, C, a, b, g]
|
|
592
|
+
sage: r3(AW.an_element()) == AW.an_element()
|
|
593
|
+
True
|
|
594
|
+
"""
|
|
595
|
+
A,B,C,a,b,g = self.gens()
|
|
596
|
+
return AlgebraMorphism(self, [B,C,A,b,g,a], codomain=self)
|
|
597
|
+
|
|
598
|
+
rho = permutation_automorphism
|
|
599
|
+
|
|
600
|
+
def reflection_automorphism(self):
|
|
601
|
+
r"""
|
|
602
|
+
Return the reflection automorphism `\sigma` of ``self``.
|
|
603
|
+
|
|
604
|
+
We define the automorphism `\sigma` by
|
|
605
|
+
|
|
606
|
+
.. MATH::
|
|
607
|
+
|
|
608
|
+
A \mapsto B \mapsto A,
|
|
609
|
+
\qquad
|
|
610
|
+
C \mapsto C + \frac{AB - BA}{q-q^{-1}}
|
|
611
|
+
= C - qAB - (1+q^2) C + q \gamma,
|
|
612
|
+
|
|
613
|
+
.. MATH::
|
|
614
|
+
|
|
615
|
+
\alpha \mapsto \beta \mapsto \alpha,
|
|
616
|
+
\gamma \mapsto \gamma.
|
|
617
|
+
|
|
618
|
+
EXAMPLES::
|
|
619
|
+
|
|
620
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
621
|
+
sage: sigma = AW.reflection_automorphism()
|
|
622
|
+
sage: [sigma(gen) for gen in AW.algebra_generators()]
|
|
623
|
+
[B, A, -q*A*B - q^2*C + q*g, b, a, g]
|
|
624
|
+
|
|
625
|
+
sage: AW.an_element()
|
|
626
|
+
(q^-3+3+2*q+q^2)*a*b*g^3 + q*A*C^2*b + 3*q^2*B*a^2*g + A
|
|
627
|
+
sage: sigma(AW.an_element())
|
|
628
|
+
q^9*A^2*B^3*a + (q^10+q^14)*A*B^2*C*a - (q^7+q^9)*A*B^2*a*g
|
|
629
|
+
+ (q^-3+3+2*q+q^2)*a*b*g^3 + (q-3*q^9+q^13+q^17)*A^2*B*a
|
|
630
|
+
- (q^2-q^6-q^8+q^14)*A*B*a^2 + 3*q^2*A*b^2*g + (q^5-q^9)*B^3*a
|
|
631
|
+
- (q^6-q^8)*B^2*a*b + q^13*B*C^2*a - 2*q^10*B*C*a*g + q^7*B*a*g^2
|
|
632
|
+
+ (q^2-2*q^10+q^18)*A*C*a - (q-q^7-2*q^9+2*q^11-q^15+q^17)*A*a*g
|
|
633
|
+
- (q^3-q^7-q^9+q^13)*C*a^2 + (q^2-q^6-2*q^8+2*q^10)*a^2*g
|
|
634
|
+
+ (q-3*q^5+3*q^9-q^13)*B*a - (q^2-q^4-2*q^6+2*q^8+q^10-q^12)*a*b + B
|
|
635
|
+
|
|
636
|
+
sage: s2 = sigma * sigma
|
|
637
|
+
sage: [s2(gen) for gen in AW.algebra_generators()]
|
|
638
|
+
[A, B, C, a, b, g]
|
|
639
|
+
sage: s2(AW.an_element()) == AW.an_element()
|
|
640
|
+
True
|
|
641
|
+
"""
|
|
642
|
+
A,B,C,a,b,g = self.gens()
|
|
643
|
+
q = self._q
|
|
644
|
+
# Note that sage: (A*B-B*A) / (q-q^-1) == -q*A*B - (1+q^2)*C + q*g
|
|
645
|
+
Cp = C - q*A*B - (1+q**2)*C + q*g
|
|
646
|
+
return AlgebraMorphism(self, [B,A,Cp,b,a,g], codomain=self)
|
|
647
|
+
|
|
648
|
+
sigma = reflection_automorphism
|
|
649
|
+
|
|
650
|
+
def loop_representation(self):
|
|
651
|
+
r"""
|
|
652
|
+
Return the map `\pi` from ``self`` to `2 \times 2` matrices
|
|
653
|
+
over `R[\lambda,\lambda^{-1}]`, where `F` is the fraction field
|
|
654
|
+
of the base ring of ``self``.
|
|
655
|
+
|
|
656
|
+
Let `AW` be the Askey-Wilson algebra over `R`, and let `F` be
|
|
657
|
+
the fraction field of `R`. Let `M` be the space of `2 \times 2`
|
|
658
|
+
matrices over `F[\lambda, \lambda^{-1}]`. Consider the following
|
|
659
|
+
elements of `M`:
|
|
660
|
+
|
|
661
|
+
.. MATH::
|
|
662
|
+
|
|
663
|
+
\mathcal{A} = \begin{pmatrix}
|
|
664
|
+
\lambda & 1 - \lambda^{-1} \\ 0 & \lambda^{-1}
|
|
665
|
+
\end{pmatrix},
|
|
666
|
+
\qquad
|
|
667
|
+
\mathcal{B} = \begin{pmatrix}
|
|
668
|
+
\lambda^{-1} & 0 \\ \lambda - 1 & \lambda
|
|
669
|
+
\end{pmatrix},
|
|
670
|
+
\qquad
|
|
671
|
+
\mathcal{C} = \begin{pmatrix}
|
|
672
|
+
1 & \lambda - 1 \\ 1 - \lambda^{-1} & \lambda + \lambda^{-1} - 1
|
|
673
|
+
\end{pmatrix}.
|
|
674
|
+
|
|
675
|
+
From Lemma 3.11 of [Terwilliger2011]_, we define a
|
|
676
|
+
representation `\pi: AW \to M` by
|
|
677
|
+
|
|
678
|
+
.. MATH::
|
|
679
|
+
|
|
680
|
+
A \mapsto q \mathcal{A} + q^{-1} \mathcal{A}^{-1},
|
|
681
|
+
\qquad
|
|
682
|
+
B \mapsto q \mathcal{B} + q^{-1} \mathcal{B}^{-1},
|
|
683
|
+
\qquad
|
|
684
|
+
C \mapsto q \mathcal{C} + q^{-1} \mathcal{C}^{-1},
|
|
685
|
+
|
|
686
|
+
.. MATH::
|
|
687
|
+
|
|
688
|
+
\alpha, \beta, \gamma \mapsto \nu I,
|
|
689
|
+
|
|
690
|
+
where `\nu = (q^2 + q^-2)(\lambda + \lambda^{-1})
|
|
691
|
+
+ (\lambda + \lambda^{-1})^2`.
|
|
692
|
+
|
|
693
|
+
We call this representation the *loop representation* as
|
|
694
|
+
it is a representation using the loop group
|
|
695
|
+
`SL_2(F[\lambda,\lambda^{-1}])`.
|
|
696
|
+
|
|
697
|
+
EXAMPLES::
|
|
698
|
+
|
|
699
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
700
|
+
sage: q = AW.q()
|
|
701
|
+
sage: pi = AW.loop_representation()
|
|
702
|
+
sage: A,B,C,a,b,g = [pi(gen) for gen in AW.algebra_generators()]
|
|
703
|
+
sage: A
|
|
704
|
+
[ 1/q*lambda^-1 + q*lambda ((-q^2 + 1)/q)*lambda^-1 + ((q^2 - 1)/q)]
|
|
705
|
+
[ 0 q*lambda^-1 + 1/q*lambda]
|
|
706
|
+
sage: B
|
|
707
|
+
[ q*lambda^-1 + 1/q*lambda 0]
|
|
708
|
+
[((-q^2 + 1)/q) + ((q^2 - 1)/q)*lambda 1/q*lambda^-1 + q*lambda]
|
|
709
|
+
sage: C
|
|
710
|
+
[1/q*lambda^-1 + ((q^2 - 1)/q) + 1/q*lambda ((q^2 - 1)/q) + ((-q^2 + 1)/q)*lambda]
|
|
711
|
+
[ ((q^2 - 1)/q)*lambda^-1 + ((-q^2 + 1)/q) q*lambda^-1 + ((-q^2 + 1)/q) + q*lambda]
|
|
712
|
+
sage: a
|
|
713
|
+
[lambda^-2 + ((q^4 + 1)/q^2)*lambda^-1 + 2 + ((q^4 + 1)/q^2)*lambda + lambda^2 0]
|
|
714
|
+
[ 0 lambda^-2 + ((q^4 + 1)/q^2)*lambda^-1 + 2 + ((q^4 + 1)/q^2)*lambda + lambda^2]
|
|
715
|
+
sage: a == b
|
|
716
|
+
True
|
|
717
|
+
sage: a == g
|
|
718
|
+
True
|
|
719
|
+
|
|
720
|
+
sage: AW.an_element()
|
|
721
|
+
(q^-3+3+2*q+q^2)*a*b*g^3 + q*A*C^2*b + 3*q^2*B*a^2*g + A
|
|
722
|
+
sage: x = pi(AW.an_element())
|
|
723
|
+
sage: y = (q^-3+3+2*q+q^2)*a*b*g^3 + q*A*C^2*b + 3*q^2*B*a^2*g + A
|
|
724
|
+
sage: x == y
|
|
725
|
+
True
|
|
726
|
+
|
|
727
|
+
We check the defining relations of the Askey-Wilson algebra::
|
|
728
|
+
|
|
729
|
+
sage: A + (q*B*C - q^-1*C*B) / (q^2 - q^-2) == a / (q + q^-1)
|
|
730
|
+
True
|
|
731
|
+
sage: B + (q*C*A - q^-1*A*C) / (q^2 - q^-2) == b / (q + q^-1)
|
|
732
|
+
True
|
|
733
|
+
sage: C + (q*A*B - q^-1*B*A) / (q^2 - q^-2) == g / (q + q^-1)
|
|
734
|
+
True
|
|
735
|
+
|
|
736
|
+
We check Lemma 3.12 in [Terwilliger2011]_::
|
|
737
|
+
|
|
738
|
+
sage: M = pi.codomain()
|
|
739
|
+
sage: la = M.base_ring().gen()
|
|
740
|
+
sage: p = M([[0,-1],[1,1]])
|
|
741
|
+
sage: s = M([[0,1],[la,0]])
|
|
742
|
+
sage: rho = AW.rho()
|
|
743
|
+
sage: sigma = AW.sigma()
|
|
744
|
+
sage: all(p*pi(gen)*~p == pi(rho(gen)) for gen in AW.algebra_generators())
|
|
745
|
+
True
|
|
746
|
+
sage: all(s*pi(gen)*~s == pi(sigma(gen)) for gen in AW.algebra_generators())
|
|
747
|
+
True
|
|
748
|
+
"""
|
|
749
|
+
from sage.matrix.matrix_space import MatrixSpace
|
|
750
|
+
q = self._q
|
|
751
|
+
base = LaurentPolynomialRing(self.base_ring().fraction_field(), 'lambda')
|
|
752
|
+
la = base.gen()
|
|
753
|
+
inv = ~la
|
|
754
|
+
M = MatrixSpace(base, 2)
|
|
755
|
+
A = M([[la,1-inv],[0,inv]])
|
|
756
|
+
Ai = M([[inv,inv-1],[0,la]])
|
|
757
|
+
B = M([[inv,0],[la-1,la]])
|
|
758
|
+
Bi = M([[la,0],[1-la,inv]])
|
|
759
|
+
C = M([[1,1-la],[inv-1,la+inv-1]])
|
|
760
|
+
Ci = M([[la+inv-1,la-1],[1-inv,1]])
|
|
761
|
+
mu = la + inv
|
|
762
|
+
nu = (self._q**2 + self._q**-2) * mu + mu**2
|
|
763
|
+
nuI = M(nu)
|
|
764
|
+
# After #29374 is fixed, the category can become
|
|
765
|
+
# Algebras(Rings().Commutative()) as it was before #29399.
|
|
766
|
+
category = Rings()
|
|
767
|
+
return AlgebraMorphism(self, [q*A + q**-1*Ai, q*B + q**-1*Bi, q*C + q**-1*Ci,
|
|
768
|
+
nuI, nuI, nuI],
|
|
769
|
+
codomain=M, category=category)
|
|
770
|
+
|
|
771
|
+
pi = loop_representation
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
def _basis_key(t):
|
|
775
|
+
"""
|
|
776
|
+
Return a key for the basis element of the Askey-Wilson algebra
|
|
777
|
+
indexed by ``t``.
|
|
778
|
+
|
|
779
|
+
EXAMPLES::
|
|
780
|
+
|
|
781
|
+
sage: from sage.algebras.askey_wilson import _basis_key
|
|
782
|
+
sage: I = algebras.AskeyWilson(QQ).indices()
|
|
783
|
+
sage: _basis_key(I((0,2,3,1,2,5)))
|
|
784
|
+
(13, (0, 2, 3, 1, 2, 5))
|
|
785
|
+
"""
|
|
786
|
+
return (sum(t), t.value)
|
|
787
|
+
|
|
788
|
+
|
|
789
|
+
class AlgebraMorphism(ModuleMorphismByLinearity):
|
|
790
|
+
"""
|
|
791
|
+
An algebra morphism of the Askey-Wilson algebra defined by
|
|
792
|
+
the images of the generators.
|
|
793
|
+
"""
|
|
794
|
+
def __init__(self, domain, on_generators, position=0, codomain=None,
|
|
795
|
+
category=None):
|
|
796
|
+
"""
|
|
797
|
+
Given a map on the multiplicative basis of a free algebra, this method
|
|
798
|
+
returns the algebra morphism that is the linear extension of its image
|
|
799
|
+
on generators.
|
|
800
|
+
|
|
801
|
+
INPUT:
|
|
802
|
+
|
|
803
|
+
- ``domain`` -- an Askey-Wilson algebra
|
|
804
|
+
- ``on_generators`` -- list of length 6 corresponding to
|
|
805
|
+
the images of the generators
|
|
806
|
+
- ``codomain`` -- (optional) the codomain
|
|
807
|
+
- ``position`` -- integer (default: 0)
|
|
808
|
+
- ``category`` -- (optional) category
|
|
809
|
+
|
|
810
|
+
OUTPUT: module morphism
|
|
811
|
+
|
|
812
|
+
EXAMPLES::
|
|
813
|
+
|
|
814
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
815
|
+
sage: sigma = AW.sigma()
|
|
816
|
+
sage: TestSuite(sigma).run()
|
|
817
|
+
"""
|
|
818
|
+
if category is None:
|
|
819
|
+
category = Algebras(Rings().Commutative()).WithBasis()
|
|
820
|
+
self._on_generators = tuple(on_generators)
|
|
821
|
+
ModuleMorphismByLinearity.__init__(self, domain=domain, codomain=codomain,
|
|
822
|
+
position=position, category=category)
|
|
823
|
+
|
|
824
|
+
def __eq__(self, other):
|
|
825
|
+
"""
|
|
826
|
+
Check equality.
|
|
827
|
+
|
|
828
|
+
EXAMPLES::
|
|
829
|
+
|
|
830
|
+
sage: from sage.algebras.askey_wilson import AlgebraMorphism
|
|
831
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
832
|
+
sage: rho = AW.rho()
|
|
833
|
+
sage: sigma = AW.sigma()
|
|
834
|
+
sage: id = AlgebraMorphism(AW, AW.gens(), codomain=AW)
|
|
835
|
+
sage: sigma * sigma == id
|
|
836
|
+
True
|
|
837
|
+
sage: id == rho * rho * rho
|
|
838
|
+
True
|
|
839
|
+
"""
|
|
840
|
+
return (self.__class__ is other.__class__ and self.parent() == other.parent()
|
|
841
|
+
and self._zero == other._zero
|
|
842
|
+
and self._on_generators == other._on_generators
|
|
843
|
+
and self._position == other._position
|
|
844
|
+
and self._is_module_with_basis_over_same_base_ring
|
|
845
|
+
== other._is_module_with_basis_over_same_base_ring)
|
|
846
|
+
|
|
847
|
+
def _on_basis(self, c):
|
|
848
|
+
r"""
|
|
849
|
+
Compute the image of this morphism on the basis element
|
|
850
|
+
indexed by ``c``.
|
|
851
|
+
|
|
852
|
+
INPUT:
|
|
853
|
+
|
|
854
|
+
- ``c`` -- tuple of length 6
|
|
855
|
+
|
|
856
|
+
OUTPUT: element of the codomain
|
|
857
|
+
|
|
858
|
+
EXAMPLES::
|
|
859
|
+
|
|
860
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
861
|
+
sage: AW.inject_variables()
|
|
862
|
+
Defining A, B, C, a, b, g
|
|
863
|
+
sage: rho = AW.rho()
|
|
864
|
+
sage: sigma = AW.sigma()
|
|
865
|
+
sage: rho._on_basis((2,1,1,2,0,5))
|
|
866
|
+
q^2*A*B^2*C*a^5*b^2 + (q^-3-q)*B^3*a^5*b^2 - (q^-2-1)*B^2*a^5*b^3
|
|
867
|
+
- (q^-3-q^5)*B*C^2*a^5*b^2 + (q^-2-q^2)*B*C*a^5*b^2*g
|
|
868
|
+
+ (q^-2-2*q^2+q^6)*A*C*a^5*b^2 - (q^-1-q-q^3+q^5)*C*a^6*b^2
|
|
869
|
+
|
|
870
|
+
sage: sigma._on_basis((2,1,1,2,0,5))
|
|
871
|
+
-q^9*A^2*B^3*b^2*g^5 + (q^2-q^10-q^14)*A*B^2*C*b^2*g^5
|
|
872
|
+
- (q^3-q^7-q^9)*A*B^2*b^2*g^6
|
|
873
|
+
- (2*q-q^5-3*q^9+q^13+q^17)*A^2*B*b^2*g^5
|
|
874
|
+
+ (1-q^6-q^8+q^14)*A*B*a*b^2*g^5 + (q^-3-q-q^5+q^9)*B^3*b^2*g^5
|
|
875
|
+
- (q^-2-1-q^6+q^8)*B^2*b^3*g^5 + (q^5-q^13)*B*C^2*b^2*g^5
|
|
876
|
+
- (q^2+q^6-2*q^10)*B*C*b^2*g^6 + (q^3-q^7)*B*b^2*g^7
|
|
877
|
+
+ (q^-6-4*q^2+2*q^6+2*q^10-q^18)*A*C*b^2*g^5
|
|
878
|
+
- (q^-3+q^-1-3*q-2*q^3+q^5+2*q^7+2*q^9-2*q^11+q^15-q^17)*A*b^2*g^6
|
|
879
|
+
- (q^-3-2*q-q^3+q^5+q^7+q^9-q^13)*C*a*b^2*g^5
|
|
880
|
+
+ (q^-2-1-q^2-q^4+2*q^6+2*q^8-2*q^10)*a*b^2*g^6
|
|
881
|
+
+ (q^-7-3*q^-3+2*q+2*q^5-3*q^9+q^13)*B*b^2*g^5
|
|
882
|
+
- (q^-6-q^-4-2*q^-2+2+2*q^6-2*q^8-q^10+q^12)*b^3*g^5
|
|
883
|
+
|
|
884
|
+
sage: rho(B*A)
|
|
885
|
+
q^2*B*C - (q^-1-q^3)*A + (1-q^2)*a
|
|
886
|
+
sage: rho(A*B)
|
|
887
|
+
B*C
|
|
888
|
+
sage: rho(A*B*C)
|
|
889
|
+
A*B*C + (q^-3-q)*B^2 - (q^-2-1)*B*b - (q^-3-q)*C^2 + (q^-2-1)*C*g
|
|
890
|
+
sage: rho(B*C*A)
|
|
891
|
+
A*B*C - (q^-3-q)*A^2 + (q^-2-1)*A*a + (q^-3-q)*B^2 - (q^-2-1)*B*b
|
|
892
|
+
sage: rho(C*A*B)
|
|
893
|
+
A*B*C
|
|
894
|
+
|
|
895
|
+
sage: rho(C^2*a*b^6*g^2)
|
|
896
|
+
A^2*a^2*b*g^6
|
|
897
|
+
|
|
898
|
+
sage: sigma(C^2)
|
|
899
|
+
q^4*A^2*B^2 + (q^3+q^7)*A*B*C - (q^2+q^4)*A*B*g
|
|
900
|
+
- (q^4-q^8)*A^2 + (q^5-q^7)*A*a + (1-q^4)*B^2
|
|
901
|
+
- (q-q^3)*B*b + q^4*C^2 - 2*q^3*C*g + q^2*g^2
|
|
902
|
+
sage: sigma(A*B)
|
|
903
|
+
q^2*A*B - (q^-1-q^3)*C + (1-q^2)*g
|
|
904
|
+
sage: sigma(C + 3*g*A*B)
|
|
905
|
+
3*q^2*A*B*g - q*A*B - (3*q^-1-3*q^3)*C*g
|
|
906
|
+
+ (3-3*q^2)*g^2 - q^2*C + q*g
|
|
907
|
+
"""
|
|
908
|
+
return self.codomain().prod(self._on_generators[i]**exp
|
|
909
|
+
for i, exp in enumerate(c))
|
|
910
|
+
|
|
911
|
+
def _composition_(self, right, homset):
|
|
912
|
+
"""
|
|
913
|
+
Return the composition of ``self`` and ``right`` in ``homset``.
|
|
914
|
+
|
|
915
|
+
EXAMPLES::
|
|
916
|
+
|
|
917
|
+
sage: AW = algebras.AskeyWilson(QQ)
|
|
918
|
+
sage: rho = AW.rho()
|
|
919
|
+
sage: sigma = AW.sigma()
|
|
920
|
+
sage: s2 = sigma * sigma
|
|
921
|
+
sage: s2._on_generators
|
|
922
|
+
(A, B, C, a, b, g)
|
|
923
|
+
sage: sr = sigma * rho
|
|
924
|
+
sage: sr._on_generators
|
|
925
|
+
(C, B, -q*B*C - q^2*A + q*a, g, b, a)
|
|
926
|
+
sage: rs = rho * sigma
|
|
927
|
+
sage: rs._on_generators
|
|
928
|
+
(A, -q*A*B - q^2*C + q*g, B, a, g, b)
|
|
929
|
+
"""
|
|
930
|
+
if isinstance(right, AlgebraMorphism):
|
|
931
|
+
cat = homset.homset_category()
|
|
932
|
+
return AlgebraMorphism(homset.domain(),
|
|
933
|
+
[right(g) for g in self._on_generators],
|
|
934
|
+
codomain=homset.codomain(), category=cat)
|
|
935
|
+
return super()._composition_(right, homset)
|