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,1006 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-combinat
|
|
2
|
+
# sage.doctest: needs sage.combinat sage.modules
|
|
3
|
+
r"""
|
|
4
|
+
Quantum Matrix Coordinate Algebras
|
|
5
|
+
|
|
6
|
+
AUTHORS:
|
|
7
|
+
|
|
8
|
+
- Travis Scrimshaw (01-2016): initial version
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
##############################################################################
|
|
12
|
+
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh at umn.edu>
|
|
13
|
+
#
|
|
14
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
15
|
+
#
|
|
16
|
+
# The full text of the GPL is available at:
|
|
17
|
+
#
|
|
18
|
+
# https://www.gnu.org/licenses/
|
|
19
|
+
##############################################################################
|
|
20
|
+
|
|
21
|
+
from sage.misc.cachefunc import cached_method
|
|
22
|
+
from sage.misc.lazy_attribute import lazy_attribute
|
|
23
|
+
from sage.sets.family import Family
|
|
24
|
+
from sage.categories.algebras import Algebras
|
|
25
|
+
from sage.categories.bialgebras import Bialgebras
|
|
26
|
+
from sage.categories.hopf_algebras import HopfAlgebras
|
|
27
|
+
from sage.combinat.free_module import CombinatorialFreeModule
|
|
28
|
+
from sage.monoids.indexed_free_monoid import IndexedFreeAbelianMonoid
|
|
29
|
+
from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing
|
|
30
|
+
from sage.rings.integer_ring import ZZ
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class QuantumMatrixCoordinateAlgebra_abstract(CombinatorialFreeModule):
|
|
34
|
+
"""
|
|
35
|
+
Abstract base class for quantum coordinate algebras of a set
|
|
36
|
+
of matrices.
|
|
37
|
+
"""
|
|
38
|
+
@staticmethod
|
|
39
|
+
def __classcall__(cls, q=None, bar=None, R=None, **kwds):
|
|
40
|
+
"""
|
|
41
|
+
Normalize input to ensure a unique representation.
|
|
42
|
+
|
|
43
|
+
EXAMPLES::
|
|
44
|
+
|
|
45
|
+
sage: R.<q> = LaurentPolynomialRing(ZZ)
|
|
46
|
+
sage: O1 = algebras.QuantumMatrixCoordinate(4)
|
|
47
|
+
sage: O2 = algebras.QuantumMatrixCoordinate(4, 4, q=q)
|
|
48
|
+
sage: O3 = algebras.QuantumMatrixCoordinate(4, R=ZZ)
|
|
49
|
+
sage: O4 = algebras.QuantumMatrixCoordinate(4, R=R, q=q)
|
|
50
|
+
sage: O1 is O2 and O2 is O3 and O3 is O4
|
|
51
|
+
True
|
|
52
|
+
sage: O5 = algebras.QuantumMatrixCoordinate(4, R=QQ)
|
|
53
|
+
sage: O1 is O5
|
|
54
|
+
False
|
|
55
|
+
"""
|
|
56
|
+
if R is None:
|
|
57
|
+
R = ZZ
|
|
58
|
+
else:
|
|
59
|
+
if q is not None:
|
|
60
|
+
q = R(q)
|
|
61
|
+
if q is None:
|
|
62
|
+
q = LaurentPolynomialRing(R, 'q').gen()
|
|
63
|
+
return super().__classcall__(cls,
|
|
64
|
+
q=q, bar=bar, R=q.parent(), **kwds)
|
|
65
|
+
|
|
66
|
+
def __init__(self, gp_indices, n, q, bar, R, category, indices_key=None):
|
|
67
|
+
"""
|
|
68
|
+
Initialize ``self``.
|
|
69
|
+
|
|
70
|
+
TESTS::
|
|
71
|
+
|
|
72
|
+
sage: O = algebras.QuantumMatrixCoordinate(3, 2)
|
|
73
|
+
sage: TestSuite(O).run()
|
|
74
|
+
"""
|
|
75
|
+
self._n = n
|
|
76
|
+
self._q = q
|
|
77
|
+
if bar is None:
|
|
78
|
+
def bar(x):
|
|
79
|
+
return x.subs(q=~self._q)
|
|
80
|
+
self._bar = bar
|
|
81
|
+
if indices_key is None:
|
|
82
|
+
indices = IndexedFreeAbelianMonoid(gp_indices)
|
|
83
|
+
else:
|
|
84
|
+
indices = IndexedFreeAbelianMonoid(gp_indices, sorting_key=indices_key)
|
|
85
|
+
CombinatorialFreeModule.__init__(self, R, indices, category=category)
|
|
86
|
+
|
|
87
|
+
def _repr_term(self, m):
|
|
88
|
+
r"""
|
|
89
|
+
Return a string representation of the term indexed by ``m``.
|
|
90
|
+
|
|
91
|
+
EXAMPLES::
|
|
92
|
+
|
|
93
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
94
|
+
sage: I = O.indices()
|
|
95
|
+
sage: x = I.an_element(); x
|
|
96
|
+
F[(1, 1)]^2*F[(1, 2)]^2*F[(1, 3)]^3
|
|
97
|
+
sage: O._repr_term(x)
|
|
98
|
+
'x[1,1]^2*x[1,2]^2*x[1,3]^3'
|
|
99
|
+
sage: O._repr_term(I.one())
|
|
100
|
+
'1'
|
|
101
|
+
sage: O.q() * O.one()
|
|
102
|
+
q
|
|
103
|
+
"""
|
|
104
|
+
S = m._sorted_items()
|
|
105
|
+
if not S:
|
|
106
|
+
return '1'
|
|
107
|
+
|
|
108
|
+
def exp(e):
|
|
109
|
+
return '^{}'.format(e) if e > 1 else ''
|
|
110
|
+
return '*'.join(('x[{},{}]'.format(*k) if k != 'c' else 'c') + exp(e)
|
|
111
|
+
for k, e in m._sorted_items())
|
|
112
|
+
|
|
113
|
+
def _latex_term(self, m):
|
|
114
|
+
r"""
|
|
115
|
+
Return a latex representation of the term indexed by ``m``.
|
|
116
|
+
|
|
117
|
+
EXAMPLES::
|
|
118
|
+
|
|
119
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
120
|
+
sage: I = O.indices()
|
|
121
|
+
sage: x = I.an_element(); x
|
|
122
|
+
F[(1, 1)]^2*F[(1, 2)]^2*F[(1, 3)]^3
|
|
123
|
+
sage: O._latex_term(x)
|
|
124
|
+
'x_{1,1}^{2} x_{1,2}^{2} x_{1,3}^{3}'
|
|
125
|
+
sage: O._latex_term(I.one())
|
|
126
|
+
'1'
|
|
127
|
+
sage: latex(O.q() * O.one())
|
|
128
|
+
q
|
|
129
|
+
"""
|
|
130
|
+
S = m._sorted_items()
|
|
131
|
+
if not S:
|
|
132
|
+
return '1'
|
|
133
|
+
|
|
134
|
+
def exp(e):
|
|
135
|
+
return '^{{{}}}'.format(e) if e > 1 else ''
|
|
136
|
+
return ' '.join(('x_{{{},{}}}'.format(*k) if k != 'c' else 'c') + exp(e)
|
|
137
|
+
for k, e in m._sorted_items())
|
|
138
|
+
|
|
139
|
+
def n(self):
|
|
140
|
+
"""
|
|
141
|
+
Return the value `n`.
|
|
142
|
+
|
|
143
|
+
EXAMPLES::
|
|
144
|
+
|
|
145
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
146
|
+
sage: O.n()
|
|
147
|
+
4
|
|
148
|
+
sage: O = algebras.QuantumMatrixCoordinate(4, 6)
|
|
149
|
+
sage: O.n()
|
|
150
|
+
6
|
|
151
|
+
"""
|
|
152
|
+
return self._n
|
|
153
|
+
|
|
154
|
+
def q(self):
|
|
155
|
+
"""
|
|
156
|
+
Return the variable ``q``.
|
|
157
|
+
|
|
158
|
+
EXAMPLES::
|
|
159
|
+
|
|
160
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
161
|
+
sage: O.q()
|
|
162
|
+
q
|
|
163
|
+
sage: O.q().parent()
|
|
164
|
+
Univariate Laurent Polynomial Ring in q over Integer Ring
|
|
165
|
+
sage: O.q().parent() is O.base_ring()
|
|
166
|
+
True
|
|
167
|
+
"""
|
|
168
|
+
return self._q
|
|
169
|
+
|
|
170
|
+
@cached_method
|
|
171
|
+
def one_basis(self):
|
|
172
|
+
"""
|
|
173
|
+
Return the basis element indexing `1`.
|
|
174
|
+
|
|
175
|
+
EXAMPLES::
|
|
176
|
+
|
|
177
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
178
|
+
sage: O.one_basis()
|
|
179
|
+
1
|
|
180
|
+
sage: O.one()
|
|
181
|
+
1
|
|
182
|
+
|
|
183
|
+
TESTS::
|
|
184
|
+
|
|
185
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
186
|
+
sage: O.one_basis() == O.indices().one()
|
|
187
|
+
True
|
|
188
|
+
"""
|
|
189
|
+
return self._indices.one()
|
|
190
|
+
|
|
191
|
+
@cached_method
|
|
192
|
+
def gens(self) -> tuple:
|
|
193
|
+
r"""
|
|
194
|
+
Return the generators of ``self`` as a tuple.
|
|
195
|
+
|
|
196
|
+
EXAMPLES::
|
|
197
|
+
|
|
198
|
+
sage: O = algebras.QuantumMatrixCoordinate(3)
|
|
199
|
+
sage: O.gens()
|
|
200
|
+
(x[1,1], x[1,2], x[1,3],
|
|
201
|
+
x[2,1], x[2,2], x[2,3],
|
|
202
|
+
x[3,1], x[3,2], x[3,3])
|
|
203
|
+
"""
|
|
204
|
+
return tuple(self.algebra_generators())
|
|
205
|
+
|
|
206
|
+
@cached_method
|
|
207
|
+
def quantum_determinant(self):
|
|
208
|
+
r"""
|
|
209
|
+
Return the quantum determinant of ``self``.
|
|
210
|
+
|
|
211
|
+
The quantum determinant is defined by
|
|
212
|
+
|
|
213
|
+
.. MATH::
|
|
214
|
+
|
|
215
|
+
\det_q = \sum_{\sigma \in S_n} (-q)^{\ell(\sigma)}
|
|
216
|
+
x_{1, \sigma(1)} x_{2, \sigma(2)} \cdots x_{n, \sigma(n)}.
|
|
217
|
+
|
|
218
|
+
EXAMPLES::
|
|
219
|
+
|
|
220
|
+
sage: O = algebras.QuantumMatrixCoordinate(2)
|
|
221
|
+
sage: O.quantum_determinant()
|
|
222
|
+
x[1,1]*x[2,2] - q*x[1,2]*x[2,1]
|
|
223
|
+
|
|
224
|
+
We verify that the quantum determinant is central::
|
|
225
|
+
|
|
226
|
+
sage: for n in range(2,5):
|
|
227
|
+
....: O = algebras.QuantumMatrixCoordinate(n)
|
|
228
|
+
....: qdet = O.quantum_determinant()
|
|
229
|
+
....: assert all(g * qdet == qdet * g for g in O.algebra_generators())
|
|
230
|
+
|
|
231
|
+
We also verify that it is group-like::
|
|
232
|
+
|
|
233
|
+
sage: for n in range(2,4):
|
|
234
|
+
....: O = algebras.QuantumMatrixCoordinate(n)
|
|
235
|
+
....: qdet = O.quantum_determinant()
|
|
236
|
+
....: assert qdet.coproduct() == tensor([qdet, qdet])
|
|
237
|
+
"""
|
|
238
|
+
if hasattr(self, '_m') and self._m != self._n:
|
|
239
|
+
raise ValueError("undefined for non-square quantum matrices")
|
|
240
|
+
from sage.combinat.permutation import Permutations
|
|
241
|
+
q = self._q
|
|
242
|
+
return self._from_dict({self._indices({(i, p(i)): 1 for i in range(1, self._n + 1)}):
|
|
243
|
+
(-q) ** p.length() for p in Permutations(self._n)})
|
|
244
|
+
|
|
245
|
+
def product_on_basis(self, a, b):
|
|
246
|
+
"""
|
|
247
|
+
Return the product of basis elements indexed by ``a`` and ``b``.
|
|
248
|
+
|
|
249
|
+
EXAMPLES::
|
|
250
|
+
|
|
251
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
252
|
+
sage: x = O.algebra_generators()
|
|
253
|
+
sage: b = x[1,4] * x[2,1] * x[3,4] # indirect doctest
|
|
254
|
+
sage: b * (b * b) == (b * b) * b
|
|
255
|
+
True
|
|
256
|
+
sage: p = prod(list(O.algebra_generators())[:10])
|
|
257
|
+
sage: p * (p * p) == (p * p) * p # long time
|
|
258
|
+
True
|
|
259
|
+
sage: x = O.an_element()
|
|
260
|
+
sage: y = x^2 + x[4,4] * x[3,3] * x[1,2]
|
|
261
|
+
sage: z = x[2,2] * x[1,4] * x[3,4] * x[1,1]
|
|
262
|
+
sage: x * (y * z) == (x * y) * z
|
|
263
|
+
True
|
|
264
|
+
"""
|
|
265
|
+
al = a._sorted_items()
|
|
266
|
+
bl = b._sorted_items()
|
|
267
|
+
# Check for multiplication by 1
|
|
268
|
+
if not al:
|
|
269
|
+
return self.monomial(b)
|
|
270
|
+
if not bl:
|
|
271
|
+
return self.monomial(a)
|
|
272
|
+
if al[-1][0] < bl[0][0]: # Already in order
|
|
273
|
+
return self.monomial(a * b)
|
|
274
|
+
G = self._indices.monoid_generators()
|
|
275
|
+
one = self.base_ring().one()
|
|
276
|
+
q = self._q
|
|
277
|
+
qi = q ** -1
|
|
278
|
+
monomial = b
|
|
279
|
+
coeff = one
|
|
280
|
+
for pos in range(len(al) - 1, -1, -1):
|
|
281
|
+
ax, ae = al[pos]
|
|
282
|
+
for bx, be in bl:
|
|
283
|
+
if ax[0] < bx[0]:
|
|
284
|
+
# In order, so nothing more to do
|
|
285
|
+
break
|
|
286
|
+
elif ax[0] == bx[0]:
|
|
287
|
+
if ax[1] > bx[1]:
|
|
288
|
+
# x_{it} x_{ij} = q^{-1} x_{ij} x_{it} if t < j
|
|
289
|
+
coeff *= qi ** (ae * be)
|
|
290
|
+
else:
|
|
291
|
+
# In order, so nothing more to do
|
|
292
|
+
break
|
|
293
|
+
elif ax[1] == bx[1]:
|
|
294
|
+
# x_{sj} x_{ij} = q^{-1} x_{ij} x_{sj} if s > i
|
|
295
|
+
coeff *= qi ** (ae * be)
|
|
296
|
+
elif ax[1] > bx[1]: # By this point, we must have ax[0] > bx[0]
|
|
297
|
+
# x_{st} x_{ij} = x_{ij} x_{st} + (q^-1 - q) x_{it} x_{sj}
|
|
298
|
+
# if s > i, t > j
|
|
299
|
+
|
|
300
|
+
# By Lemma 2.7 (with fixed typo) in H. Zhang and R.B. Zhang:
|
|
301
|
+
# x_{st} x_{ij}^k = x_{ij}^k x_{st}
|
|
302
|
+
# + (q^{1-2k} - q) x_{ij}^{k-1} x_{it} x_{sj}
|
|
303
|
+
m1 = G[bx] ** be * G[ax]
|
|
304
|
+
m2 = G[bx] ** (be - 1) * G[(bx[0], ax[1])] * G[(ax[0], bx[1])]
|
|
305
|
+
ret = self._from_dict({m1: one, m2: (q ** (1 - 2 * be) - q)})
|
|
306
|
+
ml = monomial._sorted_items()
|
|
307
|
+
index = ml.index((bx, be))
|
|
308
|
+
a_key = self._indices(dict(al[:pos]))
|
|
309
|
+
bp_key = self._indices(dict(ml[:index])) * G[ax] ** (ae - 1)
|
|
310
|
+
return (self.monomial(a_key) *
|
|
311
|
+
self.monomial(bp_key) *
|
|
312
|
+
ret *
|
|
313
|
+
self.term(self._indices(dict(ml[index + 1:])),
|
|
314
|
+
coeff))
|
|
315
|
+
|
|
316
|
+
# Otherwise ax[1] > bx[1], but for this case they commute:
|
|
317
|
+
# x_{st} x_{ij} = x_{ij} x_{st} if s > i, t < j
|
|
318
|
+
# So there is nothing to do to coeff
|
|
319
|
+
monomial *= G[ax] ** ae
|
|
320
|
+
return self.term(monomial, coeff)
|
|
321
|
+
|
|
322
|
+
@cached_method
|
|
323
|
+
def _bar_on_basis(self, x):
|
|
324
|
+
"""
|
|
325
|
+
Return the bar involution on the basis element indexed by ``x``.
|
|
326
|
+
|
|
327
|
+
EXAMPLES::
|
|
328
|
+
|
|
329
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
330
|
+
sage: O._bar_on_basis(O._indices.an_element())
|
|
331
|
+
(q^-16)*x[1,1]^2*x[1,2]^2*x[1,3]^3
|
|
332
|
+
"""
|
|
333
|
+
ret = self.one()
|
|
334
|
+
for k, e in reversed(x._sorted_items()):
|
|
335
|
+
ret *= self.monomial(self._indices({k: e}))
|
|
336
|
+
return ret
|
|
337
|
+
|
|
338
|
+
def counit_on_basis(self, x):
|
|
339
|
+
r"""
|
|
340
|
+
Return the counit on the basis element indexed by ``x``.
|
|
341
|
+
|
|
342
|
+
EXAMPLES::
|
|
343
|
+
|
|
344
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
345
|
+
sage: G = O.algebra_generators()
|
|
346
|
+
sage: I = [1,2,3,4]
|
|
347
|
+
sage: matrix([[G[i,j].counit() for i in I] for j in I]) # indirect doctest
|
|
348
|
+
[1 0 0 0]
|
|
349
|
+
[0 1 0 0]
|
|
350
|
+
[0 0 1 0]
|
|
351
|
+
[0 0 0 1]
|
|
352
|
+
"""
|
|
353
|
+
if all(t == 'c' or t[0] == t[1] for t, e in x._sorted_items()):
|
|
354
|
+
return self.base_ring().one()
|
|
355
|
+
else:
|
|
356
|
+
return self.base_ring().zero()
|
|
357
|
+
|
|
358
|
+
class Element(CombinatorialFreeModule.Element):
|
|
359
|
+
"""
|
|
360
|
+
An element of a quantum matrix coordinate algebra.
|
|
361
|
+
"""
|
|
362
|
+
def bar(self):
|
|
363
|
+
r"""
|
|
364
|
+
Return the image of ``self`` under the bar involution.
|
|
365
|
+
|
|
366
|
+
The bar involution is the `\QQ`-algebra anti-automorphism
|
|
367
|
+
defined by `x_{ij} \mapsto x_{ji}` and `q \mapsto q^{-1}`.
|
|
368
|
+
|
|
369
|
+
EXAMPLES::
|
|
370
|
+
|
|
371
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
372
|
+
sage: x = O.an_element()
|
|
373
|
+
sage: x.bar()
|
|
374
|
+
1 + 2*x[1,1] + (q^-16)*x[1,1]^2*x[1,2]^2*x[1,3]^3 + 3*x[1,2]
|
|
375
|
+
sage: x = O.an_element() * O.algebra_generators()[2,4]; x
|
|
376
|
+
x[1,1]^2*x[1,2]^2*x[1,3]^3*x[2,4] + 2*x[1,1]*x[2,4]
|
|
377
|
+
+ 3*x[1,2]*x[2,4] + x[2,4]
|
|
378
|
+
sage: xb = x.bar(); xb
|
|
379
|
+
(q^-16)*x[1,1]^2*x[1,2]^2*x[1,3]^3*x[2,4]
|
|
380
|
+
+ (q^-21-q^-15)*x[1,1]^2*x[1,2]^2*x[1,3]^2*x[1,4]*x[2,3]
|
|
381
|
+
+ (q^-22-q^-18)*x[1,1]^2*x[1,2]*x[1,3]^3*x[1,4]*x[2,2]
|
|
382
|
+
+ (q^-24-q^-20)*x[1,1]*x[1,2]^2*x[1,3]^3*x[1,4]*x[2,1]
|
|
383
|
+
+ 2*x[1,1]*x[2,4] + 3*x[1,2]*x[2,4]
|
|
384
|
+
+ (2*q^-1-2*q)*x[1,4]*x[2,1]
|
|
385
|
+
+ (3*q^-1-3*q)*x[1,4]*x[2,2] + x[2,4]
|
|
386
|
+
sage: xb.bar() == x
|
|
387
|
+
True
|
|
388
|
+
"""
|
|
389
|
+
P = self.parent()
|
|
390
|
+
return P.sum(P._bar(c) * P._bar_on_basis(m) for m, c in self)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
class QuantumMatrixCoordinateAlgebra(QuantumMatrixCoordinateAlgebra_abstract):
|
|
394
|
+
r"""
|
|
395
|
+
A quantum matrix coordinate algebra.
|
|
396
|
+
|
|
397
|
+
Let `R` be a commutative ring. The quantum matrix coordinate algebra
|
|
398
|
+
of `M(m, n)` is the associative algebra over `R[q, q^{-1}]`
|
|
399
|
+
generated by `x_{ij}`, for `i = 1, 2, \ldots, m`, `j = 1, 2, \ldots, n`,
|
|
400
|
+
and subject to the following relations:
|
|
401
|
+
|
|
402
|
+
.. MATH::
|
|
403
|
+
|
|
404
|
+
\begin{array}{ll}
|
|
405
|
+
x_{it} x_{ij} = q^{-1} x_{ij} x_{it} & \text{if } j < t, \\
|
|
406
|
+
x_{sj} x_{ij} = q^{-1} x_{ij} x_{sj} & \text{if } i < s, \\
|
|
407
|
+
x_{st} x_{ij} = x_{ij} x_{st} & \text{if } i < s, j > t, \\
|
|
408
|
+
x_{st} x_{ij} = x_{ij} x_{st} + (q^{-1} - q) x_{it} x_{sj}
|
|
409
|
+
& \text{if } i < s, j < t. \\
|
|
410
|
+
\end{array}
|
|
411
|
+
|
|
412
|
+
The quantum matrix coordinate algebra is denoted by
|
|
413
|
+
`\mathcal{O}_q(M(m, n))`. For `m = n`, it is also a bialgebra given by
|
|
414
|
+
|
|
415
|
+
.. MATH::
|
|
416
|
+
|
|
417
|
+
\Delta(x_{ij}) = \sum_{k=1}^n x_{ik} \otimes x_{kj},
|
|
418
|
+
\varepsilon(x_{ij}) = \delta_{ij}.
|
|
419
|
+
|
|
420
|
+
Moreover, there is a central group-like element called the
|
|
421
|
+
*quantum determinant* that is defined by
|
|
422
|
+
|
|
423
|
+
.. MATH::
|
|
424
|
+
|
|
425
|
+
\det_q = \sum_{\sigma \in S_n} (-q)^{\ell(\sigma)}
|
|
426
|
+
x_{1,\sigma(1)} x_{2,\sigma(2)} \cdots x_{n,\sigma(n)}.
|
|
427
|
+
|
|
428
|
+
The quantum matrix coordinate algebra also has natural inclusions
|
|
429
|
+
when restricting to submatrices. That is, let
|
|
430
|
+
`I \subseteq \{1, 2, \ldots, m\}` and `J \subseteq \{1, 2, \ldots, n\}`.
|
|
431
|
+
Then the subalgebra generated by `\{ x_{ij} \mid i \in I, j \in J \}`
|
|
432
|
+
is naturally isomorphic to `\mathcal{O}_q(M(|I|, |J|))`.
|
|
433
|
+
|
|
434
|
+
.. NOTE::
|
|
435
|
+
|
|
436
|
+
The `q` considered here is `q^2` in some references, e.g., [ZZ2005]_.
|
|
437
|
+
|
|
438
|
+
INPUT:
|
|
439
|
+
|
|
440
|
+
- ``m`` -- the integer `m`
|
|
441
|
+
- ``n`` -- the integer `n`
|
|
442
|
+
- ``R`` -- (optional) the ring `R` if `q` is not specified
|
|
443
|
+
(the default is `\ZZ`); otherwise the ring containing `q`
|
|
444
|
+
- ``q`` -- (optional) the variable `q`; the default is
|
|
445
|
+
`q \in R[q, q^{-1}]`
|
|
446
|
+
- ``bar`` -- (optional) the involution on the base ring; the
|
|
447
|
+
default is `q \mapsto q^{-1}`
|
|
448
|
+
|
|
449
|
+
EXAMPLES:
|
|
450
|
+
|
|
451
|
+
We construct `\mathcal{O}_q(M(2,3))` and the variables::
|
|
452
|
+
|
|
453
|
+
sage: O = algebras.QuantumMatrixCoordinate(2,3)
|
|
454
|
+
sage: O.inject_variables()
|
|
455
|
+
Defining x11, x12, x13, x21, x22, x23
|
|
456
|
+
|
|
457
|
+
We do some basic computations::
|
|
458
|
+
|
|
459
|
+
sage: x21 * x11
|
|
460
|
+
(q^-1)*x[1,1]*x[2,1]
|
|
461
|
+
sage: x23 * x12 * x11
|
|
462
|
+
(q^-1)*x[1,1]*x[1,2]*x[2,3] + (q^-2-1)*x[1,1]*x[1,3]*x[2,2]
|
|
463
|
+
+ (q^-3-q^-1)*x[1,2]*x[1,3]*x[2,1]
|
|
464
|
+
|
|
465
|
+
We construct the maximal quantum minors::
|
|
466
|
+
|
|
467
|
+
sage: q = O.q()
|
|
468
|
+
sage: qm12 = x11*x22 - q*x12*x21
|
|
469
|
+
sage: qm13 = x11*x23 - q*x13*x21
|
|
470
|
+
sage: qm23 = x12*x23 - q*x13*x22
|
|
471
|
+
|
|
472
|
+
However, unlike for the quantum determinant, they are not central::
|
|
473
|
+
|
|
474
|
+
sage: all(qm12 * g == g * qm12 for g in O.algebra_generators())
|
|
475
|
+
False
|
|
476
|
+
sage: all(qm13 * g == g * qm13 for g in O.algebra_generators())
|
|
477
|
+
False
|
|
478
|
+
sage: all(qm23 * g == g * qm23 for g in O.algebra_generators())
|
|
479
|
+
False
|
|
480
|
+
|
|
481
|
+
REFERENCES:
|
|
482
|
+
|
|
483
|
+
- [FRT1990]_
|
|
484
|
+
- [ZZ2005]_
|
|
485
|
+
"""
|
|
486
|
+
@staticmethod
|
|
487
|
+
def __classcall_private__(cls, m, n=None, q=None, bar=None, R=None):
|
|
488
|
+
r"""
|
|
489
|
+
Normalize input to ensure a unique representation.
|
|
490
|
+
|
|
491
|
+
EXAMPLES::
|
|
492
|
+
|
|
493
|
+
sage: R.<q> = LaurentPolynomialRing(ZZ)
|
|
494
|
+
sage: O1 = algebras.QuantumMatrixCoordinate(4)
|
|
495
|
+
sage: O2 = algebras.QuantumMatrixCoordinate(4, 4, q=q)
|
|
496
|
+
sage: O3 = algebras.QuantumMatrixCoordinate(4, R=ZZ)
|
|
497
|
+
sage: O4 = algebras.QuantumMatrixCoordinate(4, R=R, q=q)
|
|
498
|
+
sage: O1 is O2 and O2 is O3 and O3 is O4
|
|
499
|
+
True
|
|
500
|
+
sage: O5 = algebras.QuantumMatrixCoordinate(4, R=QQ)
|
|
501
|
+
sage: O1 is O5
|
|
502
|
+
False
|
|
503
|
+
"""
|
|
504
|
+
if n is None:
|
|
505
|
+
n = m
|
|
506
|
+
return super().__classcall__(cls, m=m, n=n,
|
|
507
|
+
q=q, bar=bar,
|
|
508
|
+
R=R)
|
|
509
|
+
|
|
510
|
+
def __init__(self, m, n, q, bar, R):
|
|
511
|
+
"""
|
|
512
|
+
Initialize ``self``.
|
|
513
|
+
|
|
514
|
+
TESTS::
|
|
515
|
+
|
|
516
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
517
|
+
sage: TestSuite(O).run()
|
|
518
|
+
|
|
519
|
+
sage: O = algebras.QuantumMatrixCoordinate(10)
|
|
520
|
+
sage: O.variable_names()
|
|
521
|
+
('x0101', ..., 'x1010')
|
|
522
|
+
sage: O = algebras.QuantumMatrixCoordinate(11,3)
|
|
523
|
+
sage: O.variable_names()
|
|
524
|
+
('x011', ..., 'x113')
|
|
525
|
+
sage: O = algebras.QuantumMatrixCoordinate(3,11)
|
|
526
|
+
sage: O.variable_names()
|
|
527
|
+
('x101', ..., 'x311')
|
|
528
|
+
"""
|
|
529
|
+
gp_indices = [(i, j) for i in range(1, m + 1) for j in range(1, n + 1)]
|
|
530
|
+
|
|
531
|
+
if m == n:
|
|
532
|
+
cat = Bialgebras(R.category()).WithBasis()
|
|
533
|
+
else:
|
|
534
|
+
cat = Algebras(R.category()).WithBasis()
|
|
535
|
+
|
|
536
|
+
self._m = m
|
|
537
|
+
QuantumMatrixCoordinateAlgebra_abstract.__init__(self, gp_indices, n, q, bar, R, cat)
|
|
538
|
+
# Set the names
|
|
539
|
+
mb = len(str(m))
|
|
540
|
+
nb = len(str(n))
|
|
541
|
+
base = 'x{{:0>{}}}{{:0>{}}}'.format(mb,nb)
|
|
542
|
+
names = [base.format(*k) for k in gp_indices]
|
|
543
|
+
self._assign_names(names)
|
|
544
|
+
|
|
545
|
+
def _repr_(self):
|
|
546
|
+
r"""
|
|
547
|
+
Return a string representation of ``self``.
|
|
548
|
+
|
|
549
|
+
EXAMPLES::
|
|
550
|
+
|
|
551
|
+
sage: algebras.QuantumMatrixCoordinate(4)
|
|
552
|
+
Quantized coordinate algebra of M(4, 4) with q=q over
|
|
553
|
+
Univariate Laurent Polynomial Ring in q over Integer Ring
|
|
554
|
+
|
|
555
|
+
sage: algebras.QuantumMatrixCoordinate(4, 2)
|
|
556
|
+
Quantized coordinate algebra of M(4, 2) with q=q over
|
|
557
|
+
Univariate Laurent Polynomial Ring in q over Integer Ring
|
|
558
|
+
"""
|
|
559
|
+
txt = "Quantized coordinate algebra of M({}, {}) with q={} over {}"
|
|
560
|
+
return txt.format(self._m, self._n, self._q, self.base_ring())
|
|
561
|
+
|
|
562
|
+
def _latex_(self):
|
|
563
|
+
r"""
|
|
564
|
+
Return a latex representation of ``self``.
|
|
565
|
+
|
|
566
|
+
EXAMPLES::
|
|
567
|
+
|
|
568
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
569
|
+
sage: latex(O)
|
|
570
|
+
\mathcal{O}_{q}(M(4, 4))
|
|
571
|
+
"""
|
|
572
|
+
return "\\mathcal{O}_{%s}(M(%s, %s))" % (self._q, self._m, self._n)
|
|
573
|
+
|
|
574
|
+
def m(self):
|
|
575
|
+
"""
|
|
576
|
+
Return the value `m`.
|
|
577
|
+
|
|
578
|
+
EXAMPLES::
|
|
579
|
+
|
|
580
|
+
sage: O = algebras.QuantumMatrixCoordinate(4, 6)
|
|
581
|
+
sage: O.m()
|
|
582
|
+
4
|
|
583
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
584
|
+
sage: O.m()
|
|
585
|
+
4
|
|
586
|
+
"""
|
|
587
|
+
return self._m
|
|
588
|
+
|
|
589
|
+
@cached_method
|
|
590
|
+
def algebra_generators(self) -> Family:
|
|
591
|
+
"""
|
|
592
|
+
Return the algebra generators of ``self``.
|
|
593
|
+
|
|
594
|
+
EXAMPLES::
|
|
595
|
+
|
|
596
|
+
sage: O = algebras.QuantumMatrixCoordinate(2)
|
|
597
|
+
sage: O.algebra_generators()
|
|
598
|
+
Finite family {(1, 1): x[1,1], (1, 2): x[1,2], (2, 1): x[2,1], (2, 2): x[2,2]}
|
|
599
|
+
"""
|
|
600
|
+
l = [(i, j) for i in range(1, self._m + 1)
|
|
601
|
+
for j in range(1, self._n + 1)]
|
|
602
|
+
G = self._indices.monoid_generators()
|
|
603
|
+
one = self.base_ring().one()
|
|
604
|
+
return Family(l, lambda x: self.element_class(self, {G[x]: one}))
|
|
605
|
+
|
|
606
|
+
def coproduct_on_basis(self, x):
|
|
607
|
+
r"""
|
|
608
|
+
Return the coproduct on the basis element indexed by ``x``.
|
|
609
|
+
|
|
610
|
+
EXAMPLES::
|
|
611
|
+
|
|
612
|
+
sage: O = algebras.QuantumMatrixCoordinate(4)
|
|
613
|
+
sage: x24 = O.algebra_generators()[2,4]
|
|
614
|
+
sage: O.coproduct_on_basis(x24.leading_support())
|
|
615
|
+
x[2,1] # x[1,4] + x[2,2] # x[2,4] + x[2,3] # x[3,4] + x[2,4] # x[4,4]
|
|
616
|
+
|
|
617
|
+
TESTS:
|
|
618
|
+
|
|
619
|
+
We check that it is an algebra morphism::
|
|
620
|
+
|
|
621
|
+
sage: O = algebras.QuantumMatrixCoordinate(3)
|
|
622
|
+
sage: G = O.algebra_generators()
|
|
623
|
+
sage: all(x.coproduct() * y.coproduct() == (x * y).coproduct()
|
|
624
|
+
....: for x in G for y in G)
|
|
625
|
+
True
|
|
626
|
+
"""
|
|
627
|
+
if self._m != self._n:
|
|
628
|
+
raise ValueError("undefined for non-square quantum matrices")
|
|
629
|
+
T = self.tensor_square()
|
|
630
|
+
I = self._indices.monoid_generators()
|
|
631
|
+
return T.prod(T.sum_of_monomials((I[t[0], k], I[k, t[1]])
|
|
632
|
+
for k in range(1, self._n + 1)) ** e
|
|
633
|
+
for t, e in x._sorted_items())
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
class QuantumGL(QuantumMatrixCoordinateAlgebra_abstract):
|
|
637
|
+
r"""
|
|
638
|
+
Quantum coordinate algebra of `GL(n)`.
|
|
639
|
+
|
|
640
|
+
The quantum coordinate algebra of `GL(n)`, or quantum `GL(n)`
|
|
641
|
+
for short and denoted by `\mathcal{O}_q(GL(n))`, is the quantum
|
|
642
|
+
coordinate algebra of `M_R(n, n)` with the addition of the
|
|
643
|
+
additional central group-like element `c` which satisfies
|
|
644
|
+
`c d = d c = 1`, where `d` is the quantum determinant.
|
|
645
|
+
|
|
646
|
+
Quantum `GL(n)` is a Hopf algebra where `\varepsilon(c) = 1`
|
|
647
|
+
and the antipode `S` is given by the (quantum) matrix inverse.
|
|
648
|
+
That is to say, we have `S(c) = c^-1 = d` and
|
|
649
|
+
|
|
650
|
+
.. MATH::
|
|
651
|
+
|
|
652
|
+
S(x_{ij}) = c * (-q)^{i-j} * \tilde{t}_{ji},
|
|
653
|
+
|
|
654
|
+
where we have the quantum minor
|
|
655
|
+
|
|
656
|
+
.. MATH::
|
|
657
|
+
|
|
658
|
+
\tilde{t}_{ij} = \sum_{\sigma} (-q)^{\ell(\sigma)}
|
|
659
|
+
x_{1, \sigma(1)} \cdots x_{i-1, \sigma(i-1)} x_{i+1, \sigma(i+1)}
|
|
660
|
+
\cdots x_{n, \sigma(n)}
|
|
661
|
+
|
|
662
|
+
with the sum over permutations `\sigma \colon \{1, \ldots, i-1, i+1,
|
|
663
|
+
\ldots n\} \to \{1, \ldots, j-1, j+1, \ldots, n\}`.
|
|
664
|
+
|
|
665
|
+
.. SEEALSO::
|
|
666
|
+
|
|
667
|
+
:class:`QuantumMatrixCoordinateAlgebra`
|
|
668
|
+
|
|
669
|
+
INPUT:
|
|
670
|
+
|
|
671
|
+
- ``n`` -- the integer `n`
|
|
672
|
+
- ``R`` -- (optional) the ring `R` if `q` is not specified
|
|
673
|
+
(the default is `\ZZ`); otherwise the ring containing `q`
|
|
674
|
+
- ``q`` -- (optional) the variable `q`; the default is
|
|
675
|
+
`q \in R[q, q^{-1}]`
|
|
676
|
+
- ``bar`` -- (optional) the involution on the base ring; the
|
|
677
|
+
default is `q \mapsto q^{-1}`
|
|
678
|
+
|
|
679
|
+
EXAMPLES:
|
|
680
|
+
|
|
681
|
+
We construct `\mathcal{O}_q(GL(3))` and the variables::
|
|
682
|
+
|
|
683
|
+
sage: O = algebras.QuantumGL(3)
|
|
684
|
+
sage: O.inject_variables()
|
|
685
|
+
Defining x11, x12, x13, x21, x22, x23, x31, x32, x33, c
|
|
686
|
+
|
|
687
|
+
We do some basic computations::
|
|
688
|
+
|
|
689
|
+
sage: x33 * x12
|
|
690
|
+
x[1,2]*x[3,3] + (q^-1-q)*x[1,3]*x[3,2]
|
|
691
|
+
sage: x23 * x12 * x11
|
|
692
|
+
(q^-1)*x[1,1]*x[1,2]*x[2,3] + (q^-2-1)*x[1,1]*x[1,3]*x[2,2]
|
|
693
|
+
+ (q^-3-q^-1)*x[1,2]*x[1,3]*x[2,1]
|
|
694
|
+
sage: c * O.quantum_determinant()
|
|
695
|
+
1
|
|
696
|
+
|
|
697
|
+
We verify the quantum determinant is in the center and is group-like::
|
|
698
|
+
|
|
699
|
+
sage: qdet = O.quantum_determinant()
|
|
700
|
+
sage: all(qdet * g == g * qdet for g in O.algebra_generators())
|
|
701
|
+
True
|
|
702
|
+
sage: qdet.coproduct() == tensor([qdet, qdet])
|
|
703
|
+
True
|
|
704
|
+
|
|
705
|
+
We check that the inverse of the quantum determinant is also in
|
|
706
|
+
the center and group-like::
|
|
707
|
+
|
|
708
|
+
sage: all(c * g == g * c for g in O.algebra_generators())
|
|
709
|
+
True
|
|
710
|
+
sage: c.coproduct() == tensor([c, c])
|
|
711
|
+
True
|
|
712
|
+
|
|
713
|
+
Moreover, the antipode interchanges the quantum determinant and
|
|
714
|
+
its inverse::
|
|
715
|
+
|
|
716
|
+
sage: c.antipode() == qdet
|
|
717
|
+
True
|
|
718
|
+
sage: qdet.antipode() == c
|
|
719
|
+
True
|
|
720
|
+
|
|
721
|
+
REFERENCES:
|
|
722
|
+
|
|
723
|
+
- [DD1991]_
|
|
724
|
+
- [Kar1993]_
|
|
725
|
+
"""
|
|
726
|
+
@staticmethod
|
|
727
|
+
def __classcall_private__(cls, n, q=None, bar=None, R=None):
|
|
728
|
+
"""
|
|
729
|
+
Normalize input to ensure a unique representation.
|
|
730
|
+
|
|
731
|
+
EXAMPLES::
|
|
732
|
+
|
|
733
|
+
sage: R.<q> = LaurentPolynomialRing(ZZ)
|
|
734
|
+
sage: O1 = algebras.QuantumGL(4)
|
|
735
|
+
sage: O2 = algebras.QuantumGL(4, R=ZZ)
|
|
736
|
+
sage: O3 = algebras.QuantumGL(4, R=R, q=q)
|
|
737
|
+
sage: O1 is O2 and O2 is O3
|
|
738
|
+
True
|
|
739
|
+
sage: O4 = algebras.QuantumGL(4, R=QQ)
|
|
740
|
+
sage: O1 is O4
|
|
741
|
+
False
|
|
742
|
+
"""
|
|
743
|
+
return super().__classcall__(cls, n=n, q=q, bar=bar, R=R)
|
|
744
|
+
|
|
745
|
+
def __init__(self, n, q, bar, R):
|
|
746
|
+
"""
|
|
747
|
+
Initialize ``self``.
|
|
748
|
+
|
|
749
|
+
TESTS::
|
|
750
|
+
|
|
751
|
+
sage: O = algebras.QuantumGL(2)
|
|
752
|
+
sage: elts = list(O.algebra_generators())
|
|
753
|
+
sage: elts += [O.quantum_determinant(), O.an_element()]
|
|
754
|
+
sage: TestSuite(O).run(elements=elts) # long time
|
|
755
|
+
"""
|
|
756
|
+
# Set the names
|
|
757
|
+
gp_indices = [(i, j) for i in range(1, n + 1) for j in range(1, n + 1)]
|
|
758
|
+
gp_indices.append('c')
|
|
759
|
+
cat = HopfAlgebras(R.category()).WithBasis()
|
|
760
|
+
QuantumMatrixCoordinateAlgebra_abstract.__init__(self, gp_indices, n, q,
|
|
761
|
+
bar, R, cat,
|
|
762
|
+
indices_key=_generator_key)
|
|
763
|
+
names = ['x{}{}'.format(*k) for k in gp_indices[:-1]]
|
|
764
|
+
names.append('c')
|
|
765
|
+
self._assign_names(names)
|
|
766
|
+
|
|
767
|
+
def _repr_(self):
|
|
768
|
+
r"""
|
|
769
|
+
Return a string representation of ``self``.
|
|
770
|
+
|
|
771
|
+
EXAMPLES::
|
|
772
|
+
|
|
773
|
+
sage: algebras.QuantumGL(4)
|
|
774
|
+
Quantized coordinate algebra of GL(4) with q=q over
|
|
775
|
+
Univariate Laurent Polynomial Ring in q over Integer Ring
|
|
776
|
+
"""
|
|
777
|
+
txt = "Quantized coordinate algebra of GL({}) with q={} over {}"
|
|
778
|
+
return txt.format(self._n, self._q, self.base_ring())
|
|
779
|
+
|
|
780
|
+
def _latex_(self):
|
|
781
|
+
r"""
|
|
782
|
+
Return a latex representation of ``self``.
|
|
783
|
+
|
|
784
|
+
EXAMPLES::
|
|
785
|
+
|
|
786
|
+
sage: O = algebras.QuantumGL(4)
|
|
787
|
+
sage: latex(O)
|
|
788
|
+
\mathcal{O}_{q}(GL(4))
|
|
789
|
+
"""
|
|
790
|
+
return "\\mathcal{O}_{%s}(GL(%s))" % (self._q, self._n)
|
|
791
|
+
|
|
792
|
+
@cached_method
|
|
793
|
+
def algebra_generators(self):
|
|
794
|
+
"""
|
|
795
|
+
Return the algebra generators of ``self``.
|
|
796
|
+
|
|
797
|
+
EXAMPLES::
|
|
798
|
+
|
|
799
|
+
sage: O = algebras.QuantumGL(2)
|
|
800
|
+
sage: O.algebra_generators()
|
|
801
|
+
Finite family {(1, 1): x[1,1], (1, 2): x[1,2], (2, 1): x[2,1], (2, 2): x[2,2], 'c': c}
|
|
802
|
+
"""
|
|
803
|
+
l = [(i, j) for i in range(1, self._n + 1)
|
|
804
|
+
for j in range(1, self._n + 1)]
|
|
805
|
+
l.append('c')
|
|
806
|
+
G = self._indices.monoid_generators()
|
|
807
|
+
one = self.base_ring().one()
|
|
808
|
+
return Family(l, lambda x: self.element_class(self, {G[x]: one}))
|
|
809
|
+
|
|
810
|
+
@lazy_attribute
|
|
811
|
+
def _qdet_cancel_monomial(self):
|
|
812
|
+
"""
|
|
813
|
+
Return the trailing monomial of the quantum determinant.
|
|
814
|
+
|
|
815
|
+
EXAMPLES::
|
|
816
|
+
|
|
817
|
+
sage: O = algebras.QuantumGL(2)
|
|
818
|
+
sage: O._qdet_cancel_monomial
|
|
819
|
+
F[(1, 1)]*F[(2, 2)]
|
|
820
|
+
"""
|
|
821
|
+
I = self._indices
|
|
822
|
+
gens = I.monoid_generators()
|
|
823
|
+
return I.prod(gens[i, i] for i in range(1, self._n + 1))
|
|
824
|
+
|
|
825
|
+
@lazy_attribute
|
|
826
|
+
def _qdet_remaining(self):
|
|
827
|
+
r"""
|
|
828
|
+
Return the remaining terms when cancelling the leading term.
|
|
829
|
+
|
|
830
|
+
Consider `d = m + L`, where `m` is the leading term of the
|
|
831
|
+
quantum determinant `d`. Then we have `c d = cm + cL = 1`,
|
|
832
|
+
which we rewrite as `cm = 1 - cL`. This lazy attribute
|
|
833
|
+
is `1 - cL`.
|
|
834
|
+
|
|
835
|
+
EXAMPLES::
|
|
836
|
+
|
|
837
|
+
sage: O = algebras.QuantumGL(2)
|
|
838
|
+
sage: O._qdet_remaining
|
|
839
|
+
1 + q*c*x[1,2]*x[2,1]
|
|
840
|
+
"""
|
|
841
|
+
temp = self.monomial(self._qdet_cancel_monomial) - self.quantum_determinant()
|
|
842
|
+
c = self._indices.monoid_generators()['c']
|
|
843
|
+
ret = {c * mon: coeff for mon, coeff in temp}
|
|
844
|
+
return self._from_dict(ret, remove_zeros=False) + self.one()
|
|
845
|
+
|
|
846
|
+
def product_on_basis(self, a, b):
|
|
847
|
+
r"""
|
|
848
|
+
Return the product of basis elements indexed by ``a`` and ``b``.
|
|
849
|
+
|
|
850
|
+
EXAMPLES::
|
|
851
|
+
|
|
852
|
+
sage: O = algebras.QuantumGL(2)
|
|
853
|
+
sage: I = O.indices().monoid_generators()
|
|
854
|
+
sage: O.product_on_basis(I[1,1], I[2,2])
|
|
855
|
+
x[1,1]*x[2,2]
|
|
856
|
+
sage: O.product_on_basis(I[2,2], I[1,1])
|
|
857
|
+
x[1,1]*x[2,2] + (q^-1-q)*x[1,2]*x[2,1]
|
|
858
|
+
|
|
859
|
+
TESTS::
|
|
860
|
+
|
|
861
|
+
sage: x11,x12,x21,x22,c = O.algebra_generators()
|
|
862
|
+
sage: x11 * x22
|
|
863
|
+
x[1,1]*x[2,2]
|
|
864
|
+
sage: x22 * x12
|
|
865
|
+
(q^-1)*x[1,2]*x[2,2]
|
|
866
|
+
sage: x22 * x11
|
|
867
|
+
x[1,1]*x[2,2] + (q^-1-q)*x[1,2]*x[2,1]
|
|
868
|
+
sage: c * (x11 * O.quantum_determinant())
|
|
869
|
+
x[1,1]
|
|
870
|
+
"""
|
|
871
|
+
I = self._indices
|
|
872
|
+
c_exp = 0
|
|
873
|
+
if 'c' in a._monomial:
|
|
874
|
+
da = dict(a._monomial) # Make a copy
|
|
875
|
+
c_exp += da.pop('c')
|
|
876
|
+
a = I(da)
|
|
877
|
+
if 'c' in b._monomial:
|
|
878
|
+
db = dict(b._monomial) # Make a copy
|
|
879
|
+
c_exp += db.pop('c')
|
|
880
|
+
b = I(db)
|
|
881
|
+
# a and b contain no powers of c
|
|
882
|
+
p = super().product_on_basis(a, b)
|
|
883
|
+
if c_exp == 0:
|
|
884
|
+
return p
|
|
885
|
+
c = self._indices.monoid_generators()['c']
|
|
886
|
+
ret = {}
|
|
887
|
+
other = self.zero()
|
|
888
|
+
for mon, coeff in p:
|
|
889
|
+
try:
|
|
890
|
+
# Given that cz = R and we have a monomial ab, we need to
|
|
891
|
+
# rewrite zx in terms of ab plus lower order terms L:
|
|
892
|
+
# zx = X * ab + L
|
|
893
|
+
# c * zx = R * x = c * X * ab + c * L
|
|
894
|
+
# c * ab = (R * x - c * L) / X
|
|
895
|
+
rem = self.monomial(mon // self._qdet_cancel_monomial)
|
|
896
|
+
L = self.monomial(self._qdet_cancel_monomial) * rem
|
|
897
|
+
co = L[mon]
|
|
898
|
+
del L._monomial_coefficients[mon]
|
|
899
|
+
temp = self.term(c ** (c_exp - 1), coeff) * self._qdet_remaining * rem
|
|
900
|
+
if L != self.zero():
|
|
901
|
+
temp -= self.term(c ** c_exp, coeff) * L
|
|
902
|
+
for k in temp._monomial_coefficients:
|
|
903
|
+
temp._monomial_coefficients[k] //= co
|
|
904
|
+
other += temp
|
|
905
|
+
except ValueError: # We cannot cancel, so we just add on the correct power of c
|
|
906
|
+
ret[c ** c_exp * mon] = coeff
|
|
907
|
+
return self._from_dict(ret, remove_zeros=False) + other
|
|
908
|
+
|
|
909
|
+
@cached_method
|
|
910
|
+
def _antipode_on_generator(self, i, j):
|
|
911
|
+
"""
|
|
912
|
+
Return the antipode on the generator indexed by ``(i, j)``.
|
|
913
|
+
|
|
914
|
+
EXAMPLES::
|
|
915
|
+
|
|
916
|
+
sage: O = algebras.QuantumGL(2)
|
|
917
|
+
sage: [[O._antipode_on_generator(i, j) for i in [1,2]] for j in [1,2]]
|
|
918
|
+
[[c*x[2,2], -q*c*x[2,1]],
|
|
919
|
+
[-(q^-1)*c*x[1,2], c*x[1,1]]]
|
|
920
|
+
"""
|
|
921
|
+
from sage.combinat.permutation import Permutations
|
|
922
|
+
q = self._q
|
|
923
|
+
I = list(range(1, j)) + list(range(j + 1, self._n + 1))
|
|
924
|
+
|
|
925
|
+
def lift(p):
|
|
926
|
+
return [val if val < i else val + 1 for val in p]
|
|
927
|
+
gens = self.algebra_generators()
|
|
928
|
+
t_tilde = self.sum((-q) ** p.length() * gens['c'] *
|
|
929
|
+
self.prod(gens[I[k], val]
|
|
930
|
+
for k, val in enumerate(lift(p)))
|
|
931
|
+
for p in Permutations(self._n - 1))
|
|
932
|
+
return (-q) ** (i - j) * t_tilde
|
|
933
|
+
|
|
934
|
+
def antipode_on_basis(self, x):
|
|
935
|
+
r"""
|
|
936
|
+
Return the antipode of the basis element indexed by ``x``.
|
|
937
|
+
|
|
938
|
+
EXAMPLES::
|
|
939
|
+
|
|
940
|
+
sage: O = algebras.QuantumGL(3)
|
|
941
|
+
sage: x = O.indices().monoid_generators()
|
|
942
|
+
sage: O.antipode_on_basis(x[1,2])
|
|
943
|
+
-(q^-1)*c*x[1,2]*x[3,3] + c*x[1,3]*x[3,2]
|
|
944
|
+
sage: O.antipode_on_basis(x[2,2])
|
|
945
|
+
c*x[1,1]*x[3,3] - q*c*x[1,3]*x[3,1]
|
|
946
|
+
sage: O.antipode_on_basis(x['c']) == O.quantum_determinant()
|
|
947
|
+
True
|
|
948
|
+
"""
|
|
949
|
+
ret = self.one()
|
|
950
|
+
for k, e in reversed(x._sorted_items()):
|
|
951
|
+
if k == 'c':
|
|
952
|
+
ret *= self.quantum_determinant() ** e
|
|
953
|
+
else:
|
|
954
|
+
ret *= self._antipode_on_generator(*k) ** e
|
|
955
|
+
return ret
|
|
956
|
+
|
|
957
|
+
def coproduct_on_basis(self, x):
|
|
958
|
+
r"""
|
|
959
|
+
Return the coproduct on the basis element indexed by ``x``.
|
|
960
|
+
|
|
961
|
+
EXAMPLES::
|
|
962
|
+
|
|
963
|
+
sage: O = algebras.QuantumGL(3)
|
|
964
|
+
sage: x = O.indices().monoid_generators()
|
|
965
|
+
sage: O.coproduct_on_basis(x[1,2])
|
|
966
|
+
x[1,1] # x[1,2] + x[1,2] # x[2,2] + x[1,3] # x[3,2]
|
|
967
|
+
sage: O.coproduct_on_basis(x[2,2])
|
|
968
|
+
x[2,1] # x[1,2] + x[2,2] # x[2,2] + x[2,3] # x[3,2]
|
|
969
|
+
sage: O.coproduct_on_basis(x['c'])
|
|
970
|
+
c # c
|
|
971
|
+
"""
|
|
972
|
+
T = self.tensor_square()
|
|
973
|
+
I = self._indices.monoid_generators()
|
|
974
|
+
return T.prod(T.sum_of_monomials((I[t[0], k], I[k, t[1]])
|
|
975
|
+
for k in range(1, self._n + 1)) ** e
|
|
976
|
+
if t != 'c' else T.monomial((I['c'], I['c'])) ** e
|
|
977
|
+
for t, e in x._sorted_items())
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
def _generator_key(t):
|
|
981
|
+
"""
|
|
982
|
+
Helper function to make ``'c'`` less that all other indices for
|
|
983
|
+
sorting the monomials in :class:`QuantumGL`.
|
|
984
|
+
|
|
985
|
+
INPUT:
|
|
986
|
+
|
|
987
|
+
- ``t`` -- tuple (index, exponent)
|
|
988
|
+
|
|
989
|
+
OUTPUT: a tuple made from the index only
|
|
990
|
+
|
|
991
|
+
EXAMPLES::
|
|
992
|
+
|
|
993
|
+
sage: from sage.algebras.quantum_matrix_coordinate_algebra import _generator_key as k
|
|
994
|
+
sage: k(((1,2),1)) < k(('c',1))
|
|
995
|
+
False
|
|
996
|
+
sage: k(((1,2),1)) < k(((1,3),1))
|
|
997
|
+
True
|
|
998
|
+
sage: k(((1,2),1)) < k(((3,1),1))
|
|
999
|
+
True
|
|
1000
|
+
sage: k(('c',2)) < k(((1,1),1))
|
|
1001
|
+
True
|
|
1002
|
+
"""
|
|
1003
|
+
t = t[0]
|
|
1004
|
+
if isinstance(t, tuple):
|
|
1005
|
+
return t
|
|
1006
|
+
return ()
|