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,1473 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-combinat
|
|
2
|
+
# sage.doctest: needs sage.libs.pari (for factorization)
|
|
3
|
+
r"""
|
|
4
|
+
Cubic Hecke Base Rings
|
|
5
|
+
|
|
6
|
+
This module contains special classes of polynomial rings
|
|
7
|
+
(:class:`CubicHeckeRingOfDefinition` and :class:`CubicHeckeExtensionRing`)
|
|
8
|
+
used in the context of
|
|
9
|
+
:class:`cubic Hecke algebras
|
|
10
|
+
<sage.algebras.hecke_algebras.cubic_hecke_algebra.CubicHeckeAlgebra>`.
|
|
11
|
+
|
|
12
|
+
AUTHORS:
|
|
13
|
+
|
|
14
|
+
- Sebastian Oehms May 2020: initial version
|
|
15
|
+
"""
|
|
16
|
+
# ###########################################################################
|
|
17
|
+
# Copyright (C) 2020 Sebastian Oehms <seb.oehms@gmail.com>
|
|
18
|
+
#
|
|
19
|
+
# This program is free software: you can redistribute it and/or modify
|
|
20
|
+
# it under the terms of the GNU General Public License as published by
|
|
21
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
22
|
+
# (at your option) any later version.
|
|
23
|
+
# https://www.gnu.org/licenses/
|
|
24
|
+
# ###########################################################################
|
|
25
|
+
from sage.structure.category_object import normalize_names
|
|
26
|
+
from sage.structure.element import get_coercion_model
|
|
27
|
+
from sage.categories.action import Action
|
|
28
|
+
from sage.misc.verbose import verbose
|
|
29
|
+
from sage.misc.functional import cyclotomic_polynomial
|
|
30
|
+
from sage.misc.cachefunc import cached_method
|
|
31
|
+
from sage.rings.integer_ring import ZZ
|
|
32
|
+
from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing_mpair
|
|
33
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
34
|
+
from sage.rings.localization import Localization
|
|
35
|
+
from sage.algebras.splitting_algebra import solve_with_extension, SplittingAlgebra
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# -----------------------------------------------------------------------------
|
|
39
|
+
# local helper functions
|
|
40
|
+
# -----------------------------------------------------------------------------
|
|
41
|
+
def normalize_names_markov(names, markov_trace_version):
|
|
42
|
+
r"""
|
|
43
|
+
Return a tuple of strings of variable names of length 3 resp. 4 (if
|
|
44
|
+
``markov_trace_version`` is ``True``) according to the given input names.
|
|
45
|
+
|
|
46
|
+
INPUT:
|
|
47
|
+
|
|
48
|
+
- ``names`` -- passed to :func:`~sage.structure.category_object.normalize_names`
|
|
49
|
+
- ``markov_trace_version`` -- boolean; if set to ``True`` four names are
|
|
50
|
+
expected the last of which corresponds to the writhe factor of the
|
|
51
|
+
Markov trace
|
|
52
|
+
|
|
53
|
+
EXAMPLES::
|
|
54
|
+
|
|
55
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
56
|
+
sage: chbr.normalize_names_markov('a, b, c', False)
|
|
57
|
+
('a', 'b', 'c')
|
|
58
|
+
sage: chbr.normalize_names_markov(('u', 'v', 'w', 's'), False)
|
|
59
|
+
('u', 'v', 'w')
|
|
60
|
+
"""
|
|
61
|
+
if markov_trace_version:
|
|
62
|
+
names = normalize_names(4, names)
|
|
63
|
+
else:
|
|
64
|
+
if isinstance(names, tuple):
|
|
65
|
+
names = list(names)
|
|
66
|
+
if isinstance(names, list) and len(names) > 3:
|
|
67
|
+
names = normalize_names(3, names[0:3])
|
|
68
|
+
else:
|
|
69
|
+
names = normalize_names(3, names)
|
|
70
|
+
return names
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def register_ring_hom(ring_hom):
|
|
74
|
+
r"""
|
|
75
|
+
Register the given ring homomorphism as conversion map.
|
|
76
|
+
|
|
77
|
+
EXAMPLES::
|
|
78
|
+
|
|
79
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
80
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
81
|
+
sage: BR.create_specialization([E(5), E(7), E(3)]) # indirect doctest
|
|
82
|
+
Universal Cyclotomic Field
|
|
83
|
+
sage: _.convert_map_from(BR)
|
|
84
|
+
Ring morphism:
|
|
85
|
+
From: Multivariate Polynomial Ring in u, v, w
|
|
86
|
+
over Integer Ring localized at (w,)
|
|
87
|
+
To: Universal Cyclotomic Field
|
|
88
|
+
Defn: u |--> E(5)
|
|
89
|
+
v |--> E(7)
|
|
90
|
+
w |--> E(3)
|
|
91
|
+
"""
|
|
92
|
+
domain = ring_hom.domain()
|
|
93
|
+
codomain = ring_hom.codomain()
|
|
94
|
+
conversion_cached = codomain._is_conversion_cached(domain)
|
|
95
|
+
|
|
96
|
+
if conversion_cached:
|
|
97
|
+
test_map = codomain.convert_map_from(domain)
|
|
98
|
+
try:
|
|
99
|
+
if test_map != ring_hom:
|
|
100
|
+
verbose('\nConversion:\n%s\n already exists and is different from:\n%s\n' % (test_map, ring_hom))
|
|
101
|
+
except TypeError:
|
|
102
|
+
verbose('\n Conversion:\n%s\n already exists and is not comparable to:\n%s\n' % (test_map, ring_hom))
|
|
103
|
+
else:
|
|
104
|
+
try:
|
|
105
|
+
codomain.register_conversion(ring_hom)
|
|
106
|
+
except ValueError:
|
|
107
|
+
verbose('\nthe map:\n%s\ncannot be registered as conversion\n' % ring_hom)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
# -----------------------------------------------------------------------------
|
|
111
|
+
# class for the Galois Group action on the generic extension ring corresponding
|
|
112
|
+
# to the cubic equation
|
|
113
|
+
# -----------------------------------------------------------------------------
|
|
114
|
+
class GaloisGroupAction(Action):
|
|
115
|
+
r"""
|
|
116
|
+
Action on a multivariate polynomial ring by permuting the generators.
|
|
117
|
+
|
|
118
|
+
EXAMPLES::
|
|
119
|
+
|
|
120
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
121
|
+
sage: from operator import mul
|
|
122
|
+
sage: R.<x, y, z> = ZZ[]
|
|
123
|
+
sage: G = SymmetricGroup(3)
|
|
124
|
+
sage: p = 5*x*y + 3*z**2
|
|
125
|
+
sage: R._unset_coercions_used()
|
|
126
|
+
sage: R.register_action(chbr.GaloisGroupAction(G, R, op=mul))
|
|
127
|
+
sage: s = G([2,3,1])
|
|
128
|
+
sage: s*p
|
|
129
|
+
3*x^2 + 5*y*z
|
|
130
|
+
"""
|
|
131
|
+
def _act_(self, perm, pol):
|
|
132
|
+
r"""
|
|
133
|
+
Application of the action.
|
|
134
|
+
|
|
135
|
+
EXAMPLES::
|
|
136
|
+
|
|
137
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
138
|
+
sage: from operator import mul
|
|
139
|
+
sage: R.<x, y> = QQ[]
|
|
140
|
+
sage: G = SymmetricGroup(2)
|
|
141
|
+
sage: A = chbr.GaloisGroupAction(G, R, op=mul)
|
|
142
|
+
sage: p = ~5*x*y**2 + 3*x**2
|
|
143
|
+
sage: s = G([2,1])
|
|
144
|
+
sage: A._act_(s, p)
|
|
145
|
+
1/5*x^2*y + 3*y^2
|
|
146
|
+
"""
|
|
147
|
+
if not self.is_left():
|
|
148
|
+
perm, pol = pol, perm
|
|
149
|
+
pol_dict = {}
|
|
150
|
+
for key, value in pol.monomial_coefficients().items():
|
|
151
|
+
newkey = [0] * len(key)
|
|
152
|
+
for pos, k in enumerate(key):
|
|
153
|
+
newkey[perm(pos + 1) - 1] = k
|
|
154
|
+
pol_dict[tuple(newkey)] = value
|
|
155
|
+
return self.domain()(pol_dict)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
###############################################################################
|
|
159
|
+
# EXTENSION RING
|
|
160
|
+
# -----------------------------------------------------------------------------
|
|
161
|
+
# Definition of the generic extension ring for the cubic Hecke algebra as
|
|
162
|
+
# Laurent polynomial ring in 3 indeterminates over the cyclotomic field of a
|
|
163
|
+
# third root of unity This is the most general ring over which the cubic Hecke
|
|
164
|
+
# algebra is semi-simple. In opposite to the generic base ring class, this class
|
|
165
|
+
# does not inherits from UniqueRepresentation since _test_pickling fails
|
|
166
|
+
# -----------------------------------------------------------------------------
|
|
167
|
+
class CubicHeckeExtensionRing(LaurentPolynomialRing_mpair):
|
|
168
|
+
r"""
|
|
169
|
+
The generic splitting algebra for the irreducible representations of
|
|
170
|
+
the cubic Hecke algebra.
|
|
171
|
+
|
|
172
|
+
This ring must contain three invertible indeterminates (representing
|
|
173
|
+
the roots of the cubic equation) together with a third root of unity
|
|
174
|
+
(needed for the 18-dimensional irreducibles of the cubic Hecke algebra
|
|
175
|
+
on 4 strands).
|
|
176
|
+
|
|
177
|
+
Therefore this ring is constructed as a multivariate Laurent polynomial
|
|
178
|
+
ring in three indeterminates over a polynomial quotient ring over the
|
|
179
|
+
integers with respect to the minimal polynomial of a third root of unity.
|
|
180
|
+
|
|
181
|
+
The polynomial quotient ring is constructed as instance of
|
|
182
|
+
:class:`SplittingAlgebra`.
|
|
183
|
+
|
|
184
|
+
INPUT:
|
|
185
|
+
|
|
186
|
+
- ``names`` -- (default: ``'u,v,w'``) string containing the names of the
|
|
187
|
+
indeterminates separated by ``,`` or a triple of strings each of which
|
|
188
|
+
are the names of one of the three indeterminates
|
|
189
|
+
- ``order`` -- string (default: ``'degrevlex'``); the term order; see also
|
|
190
|
+
:class:`~sage.rings.polynomial.laurent_polynomial_ring.LaurentPolynomialRing_mpair`
|
|
191
|
+
- ``ring_of_definition`` -- (optional) a :class:`CubicHeckeRingOfDefinition`
|
|
192
|
+
to specify the generic cubic Hecke base ring over which ``self`` may be
|
|
193
|
+
realized as splitting ring via the ``as_splitting_algebra`` method
|
|
194
|
+
- ``third_unity_root_name`` -- string (default: ``'e3'``); for setting the
|
|
195
|
+
name of the third root if unity of ``self``
|
|
196
|
+
- ``markov_trace_version`` -- boolean (default: ``False``); if this is
|
|
197
|
+
set to ``True`` then ``self`` contains one invertible indeterminate in
|
|
198
|
+
addition which is meant to represent the writhe factor of a Markov trace
|
|
199
|
+
on the cubic Hecke algebra and which default name is ``s``
|
|
200
|
+
|
|
201
|
+
EXAMPLES::
|
|
202
|
+
|
|
203
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
204
|
+
sage: chbr.CubicHeckeExtensionRing('a, b, c')
|
|
205
|
+
Multivariate Laurent Polynomial Ring in a, b, c
|
|
206
|
+
over Splitting Algebra of x^2 + x + 1
|
|
207
|
+
with roots [e3, -e3 - 1]
|
|
208
|
+
over Integer Ring
|
|
209
|
+
sage: _.an_element()
|
|
210
|
+
b^2*c^-1 + e3*a
|
|
211
|
+
"""
|
|
212
|
+
def __init__(self, names, order='degrevlex', ring_of_definition=None, third_unity_root_name='e3', markov_trace_version=False):
|
|
213
|
+
r"""
|
|
214
|
+
Initialize ``self``.
|
|
215
|
+
|
|
216
|
+
TESTS::
|
|
217
|
+
|
|
218
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
219
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
220
|
+
sage: TestSuite(ER).run()
|
|
221
|
+
"""
|
|
222
|
+
# ----------------------------------------------------------------------
|
|
223
|
+
# Setting connection with generic base ring (if given)
|
|
224
|
+
# ----------------------------------------------------------------------
|
|
225
|
+
self._ring_of_definition = None
|
|
226
|
+
self._splitting_algebra = None
|
|
227
|
+
|
|
228
|
+
if ring_of_definition is not None:
|
|
229
|
+
if not isinstance(ring_of_definition, CubicHeckeRingOfDefinition):
|
|
230
|
+
raise TypeError("generic base ring must be an instance of CubicHeckeRingOfDefinition")
|
|
231
|
+
self._ring_of_definition = ring_of_definition
|
|
232
|
+
|
|
233
|
+
# ----------------------------------------------------------------------
|
|
234
|
+
# defining the base ring
|
|
235
|
+
# note that we can't use ZZ.extension since it isn't possible to define
|
|
236
|
+
# homomorphisms from orders in number fields, yet
|
|
237
|
+
# ----------------------------------------------------------------------
|
|
238
|
+
base_ring = SplittingAlgebra(cyclotomic_polynomial(3), [third_unity_root_name])
|
|
239
|
+
|
|
240
|
+
# ----------------------------------------------------------------------
|
|
241
|
+
# defining the ring itself
|
|
242
|
+
# ----------------------------------------------------------------------
|
|
243
|
+
self._names = normalize_names_markov(names, markov_trace_version)
|
|
244
|
+
self._order = order
|
|
245
|
+
|
|
246
|
+
pol_ring = PolynomialRing(base_ring, names=self._names, order=self._order, implementation=None)
|
|
247
|
+
LaurentPolynomialRing_mpair.__init__(self, pol_ring)
|
|
248
|
+
|
|
249
|
+
# ----------------------------------------------------------------------
|
|
250
|
+
# setting Galois group action
|
|
251
|
+
# ----------------------------------------------------------------------
|
|
252
|
+
from sage.groups.perm_gps.permgroup_named import SymmetricGroup
|
|
253
|
+
from operator import mul
|
|
254
|
+
self._galois_group = SymmetricGroup(3)
|
|
255
|
+
galois_group_action = GaloisGroupAction(self._galois_group, self, op=mul)
|
|
256
|
+
self._unset_coercions_used()
|
|
257
|
+
self.register_action(galois_group_action)
|
|
258
|
+
|
|
259
|
+
# ----------------------------------------------------------------------
|
|
260
|
+
# Init of data used on demand
|
|
261
|
+
# ----------------------------------------------------------------------
|
|
262
|
+
self._mirror = None
|
|
263
|
+
|
|
264
|
+
############################################################################
|
|
265
|
+
# overloaded inherited methods
|
|
266
|
+
############################################################################
|
|
267
|
+
def construction(self):
|
|
268
|
+
r"""
|
|
269
|
+
Return ``None`` since this construction is not functorial.
|
|
270
|
+
|
|
271
|
+
EXAMPLES::
|
|
272
|
+
|
|
273
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
274
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
275
|
+
sage: ER._test_category() # indirect doctest
|
|
276
|
+
"""
|
|
277
|
+
return None
|
|
278
|
+
|
|
279
|
+
def __reduce__(self):
|
|
280
|
+
r"""
|
|
281
|
+
Used in pickling.
|
|
282
|
+
|
|
283
|
+
TESTS::
|
|
284
|
+
|
|
285
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
286
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
287
|
+
sage: loads(dumps(ER)) == ER
|
|
288
|
+
True
|
|
289
|
+
"""
|
|
290
|
+
return CubicHeckeExtensionRing, (self._names, self._order, self._ring_of_definition)
|
|
291
|
+
|
|
292
|
+
def _element_constructor_(self, x, mon=None):
|
|
293
|
+
r"""
|
|
294
|
+
Inherited element constructor overloaded to allow construction from
|
|
295
|
+
``GAP3`` ``MVP`` expressions.
|
|
296
|
+
|
|
297
|
+
EXAMPLES::
|
|
298
|
+
|
|
299
|
+
sage: # optional - gap3
|
|
300
|
+
sage: CHA3 = algebras.CubicHecke(3)
|
|
301
|
+
sage: GER = CHA3.extension_ring(generic=True)
|
|
302
|
+
sage: sch7 = CHA3.chevie().SchurElements()[7]
|
|
303
|
+
sage: GER(sch7)
|
|
304
|
+
a*b*c^-2 + a^2*b^-1*c^-1 + a^-1*b^2*c^-1 + 2
|
|
305
|
+
+ a*b^-2*c + a^-2*b*c + a^-1*b^-1*c^2
|
|
306
|
+
sage: rep4_gap3 = CHA3.chevie().Representations(4)
|
|
307
|
+
sage: matrix(GER, rep4_gap3[1])
|
|
308
|
+
[ b 0]
|
|
309
|
+
[-b c]
|
|
310
|
+
"""
|
|
311
|
+
from sage.interfaces.gap3 import GAP3Element
|
|
312
|
+
if isinstance(x, GAP3Element):
|
|
313
|
+
return self._convert_from_gap3_mvp(x)
|
|
314
|
+
return super()._element_constructor_(x, mon=mon)
|
|
315
|
+
|
|
316
|
+
def _coerce_map_from_(self, R):
|
|
317
|
+
r"""
|
|
318
|
+
The rings that canonically coerce to ``self`` ar the ones from
|
|
319
|
+
inheritance and the base ring of definition of the cubic Hecke algebra.
|
|
320
|
+
|
|
321
|
+
EXAMPLES::
|
|
322
|
+
|
|
323
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
324
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
325
|
+
sage: ER = BR.extension_ring()
|
|
326
|
+
sage: ER(BR.an_element())
|
|
327
|
+
a*b + a*c + b*c + a*b^-1*c^-1 + 2*c^-1 + a^-1*b*c^-1 + 2*b^-1
|
|
328
|
+
+ 2*a^-1 + a^-1*b^-1*c
|
|
329
|
+
sage: MBR = chbr.CubicHeckeRingOfDefinition(markov_trace_version=True)
|
|
330
|
+
sage: MER = MBR.extension_ring()
|
|
331
|
+
sage: MER(MBR.an_element())
|
|
332
|
+
a*b*s^-1 + a*c*s^-1 + b*c*s^-1 + a*b^-1*c^-1 + 2*c^-1
|
|
333
|
+
+ a^-1*b*c^-1 + 2*b^-1 + 2*a^-1 + a^-1*b^-1*c
|
|
334
|
+
"""
|
|
335
|
+
if isinstance(R, CubicHeckeRingOfDefinition):
|
|
336
|
+
markov = R.markov_trace_version()
|
|
337
|
+
a, b, c, *rem = self.gens()
|
|
338
|
+
iu = a + b + c
|
|
339
|
+
iv = a * b + a * c + b * c
|
|
340
|
+
iw = a * b * c
|
|
341
|
+
im_gens = [iu, iv, iw]
|
|
342
|
+
if markov:
|
|
343
|
+
if self.markov_trace_version():
|
|
344
|
+
im_gens += rem
|
|
345
|
+
# check of embedding fails in this case as long as the images of
|
|
346
|
+
# ``iu`` and ``iv`` need to be invertible (see comment in
|
|
347
|
+
# :meth:`__init__`). # :class:`CubicHeckeRingOfDefinition`).
|
|
348
|
+
embedding_into_extension_ring = R.hom(im_gens, check=False)
|
|
349
|
+
else:
|
|
350
|
+
embedding_into_extension_ring = R.hom(im_gens)
|
|
351
|
+
return embedding_into_extension_ring
|
|
352
|
+
return super()._coerce_map_from_(R)
|
|
353
|
+
|
|
354
|
+
def hom(self, im_gens, codomain=None, check=True, base_map=None):
|
|
355
|
+
r"""
|
|
356
|
+
Return a homomorphism of ``self``.
|
|
357
|
+
|
|
358
|
+
INPUT:
|
|
359
|
+
|
|
360
|
+
- ``im_gens`` -- tuple for the image of the generators of ``self``
|
|
361
|
+
- ``codomain`` -- (optional) the codomain of the homomorphism
|
|
362
|
+
|
|
363
|
+
EXAMPLES::
|
|
364
|
+
|
|
365
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
366
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
367
|
+
sage: UCF = UniversalCyclotomicField()
|
|
368
|
+
sage: map = ER.hom((UCF.gen(3),) + (UCF(3),UCF(4),UCF(5)))
|
|
369
|
+
sage: ER.an_element()
|
|
370
|
+
b^2*c^-1 + e3*a
|
|
371
|
+
sage: map(_)
|
|
372
|
+
-1/5*E(3) - 16/5*E(3)^2
|
|
373
|
+
"""
|
|
374
|
+
gens = self.gens()
|
|
375
|
+
num_gens = len(gens)
|
|
376
|
+
|
|
377
|
+
if not isinstance(im_gens, (list, tuple)):
|
|
378
|
+
im_gens = [im_gens]
|
|
379
|
+
|
|
380
|
+
if len(im_gens) == num_gens + 1:
|
|
381
|
+
e3, *im_remain = im_gens
|
|
382
|
+
hom_cycl_gen = self.base_ring().hom([e3], codomain=e3.parent(), check=check, base_map=base_map)
|
|
383
|
+
verbose("hom_cycl_gen %s" % hom_cycl_gen, level=2)
|
|
384
|
+
return super().hom(im_remain, codomain=codomain, check=check, base_map=hom_cycl_gen)
|
|
385
|
+
else:
|
|
386
|
+
if base_map is None:
|
|
387
|
+
raise ValueError('number of images must be four (including a '
|
|
388
|
+
'third root of unity at first position) or a '
|
|
389
|
+
'base_map (on %s) must be given' % self.base_ring())
|
|
390
|
+
return super().hom(im_gens, codomain=codomain, check=check, base_map=base_map)
|
|
391
|
+
|
|
392
|
+
def _an_element_(self):
|
|
393
|
+
r"""
|
|
394
|
+
Return an element of ``self``.
|
|
395
|
+
|
|
396
|
+
EXAMPLES::
|
|
397
|
+
|
|
398
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
399
|
+
sage: ER = chbr.CubicHeckeExtensionRing('x, y, z')
|
|
400
|
+
sage: ER.an_element() # indirect doctest
|
|
401
|
+
y^2*z^-1 + e3*x
|
|
402
|
+
sage: MER = chbr.CubicHeckeExtensionRing('x, y, z, s', markov_trace_version=True)
|
|
403
|
+
sage: MER.an_element() # indirect doctest
|
|
404
|
+
y^2*z^-1 + e3*x*s^-1
|
|
405
|
+
"""
|
|
406
|
+
a, b, c, *rem = self.gens()
|
|
407
|
+
e3 = self.cyclotomic_generator()
|
|
408
|
+
s = self.one()
|
|
409
|
+
if rem:
|
|
410
|
+
s = rem[0]
|
|
411
|
+
return b**2/c + a*e3/s
|
|
412
|
+
|
|
413
|
+
############################################################################
|
|
414
|
+
# local methods
|
|
415
|
+
############################################################################
|
|
416
|
+
def _is_markov_trace_version(self) -> bool:
|
|
417
|
+
r"""
|
|
418
|
+
Return whether ``self`` is the version containing the writhe parameter
|
|
419
|
+
``s`` for the Markov trace.
|
|
420
|
+
|
|
421
|
+
EXAMPLES::
|
|
422
|
+
|
|
423
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
424
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
425
|
+
sage: ER._is_markov_trace_version()
|
|
426
|
+
False
|
|
427
|
+
sage: MER = chbr.CubicHeckeExtensionRing('a, b, c, s', markov_trace_version=True)
|
|
428
|
+
sage: MER._is_markov_trace_version()
|
|
429
|
+
True
|
|
430
|
+
"""
|
|
431
|
+
return len(self.gens()) == 4
|
|
432
|
+
|
|
433
|
+
# --------------------------------------------------------------------------
|
|
434
|
+
# helper for element construction
|
|
435
|
+
# --------------------------------------------------------------------------
|
|
436
|
+
def _convert_from_gap3_mvp(self, mvp_expression):
|
|
437
|
+
r"""
|
|
438
|
+
Convert an element of ``GAP3`` interface containing Jean
|
|
439
|
+
Michel's ``MVP`` (multivariate polynomials) to an element of ``self``.
|
|
440
|
+
|
|
441
|
+
INPUT:
|
|
442
|
+
|
|
443
|
+
- ``mvp_expression`` -- element of ``GAP3`` interface containing
|
|
444
|
+
Jean Michel's ``MVP`` (multivariate polynomials)
|
|
445
|
+
|
|
446
|
+
EXAMPLES::
|
|
447
|
+
|
|
448
|
+
sage: # optional - gap3
|
|
449
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
450
|
+
sage: CHA3 = algebras.CubicHecke(3)
|
|
451
|
+
sage: sch7 = CHA3.chevie().SchurElements()[7]
|
|
452
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
453
|
+
sage: ER._convert_from_gap3_mvp(sch7)
|
|
454
|
+
a*b*c^-2 + a^2*b^-1*c^-1 + a^-1*b^2*c^-1 + 2 + a*b^-2*c + a^-2*b*c + a^-1*b^-1*c^2
|
|
455
|
+
"""
|
|
456
|
+
from sage.misc.sage_eval import sage_eval
|
|
457
|
+
E3 = self.cyclotomic_generator()
|
|
458
|
+
a, b, c, *rem = self.gens()
|
|
459
|
+
na, nb, nc = self.variable_names()
|
|
460
|
+
lc = {na: a, nb: b, nc: c, 'E3': E3}
|
|
461
|
+
sage_expr = str(mvp_expression.FormatMaple())[1:-1]
|
|
462
|
+
return sage_eval(sage_expr, locals=lc)
|
|
463
|
+
|
|
464
|
+
############################################################################
|
|
465
|
+
# global methods
|
|
466
|
+
############################################################################
|
|
467
|
+
def cyclotomic_generator(self):
|
|
468
|
+
r"""
|
|
469
|
+
Return the third root of unity as generator of the base ring
|
|
470
|
+
of ``self``.
|
|
471
|
+
|
|
472
|
+
EXAMPLES::
|
|
473
|
+
|
|
474
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
475
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
476
|
+
sage: ER.cyclotomic_generator()
|
|
477
|
+
e3
|
|
478
|
+
sage: _**3 == 1
|
|
479
|
+
True
|
|
480
|
+
"""
|
|
481
|
+
return self(self.base_ring().gen())
|
|
482
|
+
|
|
483
|
+
def conjugation(self):
|
|
484
|
+
r"""
|
|
485
|
+
Return an involution that performs *complex conjugation* with respect
|
|
486
|
+
to base ring considered as order in the complex field.
|
|
487
|
+
|
|
488
|
+
EXAMPLES::
|
|
489
|
+
|
|
490
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
491
|
+
sage: ER = chbr.CubicHeckeExtensionRing('x, y, z')
|
|
492
|
+
sage: conj = ER.conjugation()
|
|
493
|
+
sage: conj(ER.an_element())
|
|
494
|
+
y^2*z^-1 + (-e3 - 1)*x
|
|
495
|
+
sage: MER = chbr.CubicHeckeExtensionRing('x, y, z, s', markov_trace_version=True)
|
|
496
|
+
sage: conj = MER.conjugation()
|
|
497
|
+
sage: conj(MER.an_element())
|
|
498
|
+
y^2*z^-1 + (-e3 - 1)*x*s^-1
|
|
499
|
+
"""
|
|
500
|
+
e3 = self.cyclotomic_generator()
|
|
501
|
+
return self.hom(tuple([e3**2] + list(self.gens())))
|
|
502
|
+
|
|
503
|
+
def cubic_equation_galois_group(self):
|
|
504
|
+
r"""
|
|
505
|
+
Return the Galois group of the cubic equation, which is the permutation
|
|
506
|
+
group on the three generators together with its action on ``self``.
|
|
507
|
+
|
|
508
|
+
EXAMPLES::
|
|
509
|
+
|
|
510
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
511
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
512
|
+
sage: G = ER.cubic_equation_galois_group()
|
|
513
|
+
sage: t = ER.an_element()
|
|
514
|
+
sage: [(g ,g*t) for g in G]
|
|
515
|
+
[((), b^2*c^-1 + e3*a),
|
|
516
|
+
((1,3,2), a^2*b^-1 + e3*c),
|
|
517
|
+
((1,2,3), e3*b + a^-1*c^2),
|
|
518
|
+
((2,3), e3*a + b^-1*c^2),
|
|
519
|
+
((1,3), a^-1*b^2 + e3*c),
|
|
520
|
+
((1,2), a^2*c^-1 + e3*b)]
|
|
521
|
+
"""
|
|
522
|
+
return self._galois_group
|
|
523
|
+
|
|
524
|
+
def mirror_involution(self):
|
|
525
|
+
r"""
|
|
526
|
+
Return the involution of ``self`` corresponding to the involution of
|
|
527
|
+
the cubic Hecke algebra (with the same name).
|
|
528
|
+
|
|
529
|
+
This means that it maps the generators of ``self`` to their inverses.
|
|
530
|
+
|
|
531
|
+
.. NOTE::
|
|
532
|
+
|
|
533
|
+
The mirror involution of the braid group does not factor through the
|
|
534
|
+
cubic Hecke algebra over its base ring, but it does if it is
|
|
535
|
+
considered as `\ZZ`-algebra. The base ring elements are transformed
|
|
536
|
+
by this automorphism.
|
|
537
|
+
|
|
538
|
+
OUTPUT: the involution as automorphism of ``self``
|
|
539
|
+
|
|
540
|
+
EXAMPLES::
|
|
541
|
+
|
|
542
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
543
|
+
sage: ER = chbr.CubicHeckeExtensionRing('p, q, r')
|
|
544
|
+
sage: ER.mirror_involution()
|
|
545
|
+
Ring endomorphism of Multivariate Laurent Polynomial Ring in p, q, r
|
|
546
|
+
over Splitting Algebra of x^2 + x + 1
|
|
547
|
+
with roots [e3, -e3 - 1]
|
|
548
|
+
over Integer Ring
|
|
549
|
+
Defn: p |--> p^-1
|
|
550
|
+
q |--> q^-1
|
|
551
|
+
r |--> r^-1
|
|
552
|
+
with map of base ring
|
|
553
|
+
sage: _(ER.an_element())
|
|
554
|
+
e3*p^-1 + q^-2*r
|
|
555
|
+
|
|
556
|
+
sage: MER = chbr.CubicHeckeExtensionRing('p, q, r, s', markov_trace_version=True)
|
|
557
|
+
sage: MER.mirror_involution()
|
|
558
|
+
Ring endomorphism of Multivariate Laurent Polynomial Ring in p, q, r, s
|
|
559
|
+
over Splitting Algebra of x^2 + x + 1
|
|
560
|
+
with roots [e3, -e3 - 1] over Integer Ring
|
|
561
|
+
Defn: p |--> p^-1
|
|
562
|
+
q |--> q^-1
|
|
563
|
+
r |--> r^-1
|
|
564
|
+
s |--> s^-1
|
|
565
|
+
with map of base ring
|
|
566
|
+
sage: _(MER.an_element())
|
|
567
|
+
e3*p^-1*s + q^-2*r
|
|
568
|
+
"""
|
|
569
|
+
if self._mirror is None:
|
|
570
|
+
e3 = self.base_ring().gen()
|
|
571
|
+
if self._is_markov_trace_version():
|
|
572
|
+
a, b, c, s = self.gens()
|
|
573
|
+
self._mirror = self.hom([e3, ~a, ~b, ~c, ~s])
|
|
574
|
+
else:
|
|
575
|
+
a, b, c = self.gens()
|
|
576
|
+
self._mirror = self.hom([e3, ~a, ~b, ~c])
|
|
577
|
+
|
|
578
|
+
return self._mirror
|
|
579
|
+
|
|
580
|
+
def create_specialization(self, im_cubic_equation_roots, im_writhe_parameter=None, var='T', third_unity_root_name='E3'):
|
|
581
|
+
r"""
|
|
582
|
+
Return an appropriate ring containing the elements from the list
|
|
583
|
+
``im_cubic_equation_roots`` defining a conversion map from ``self`` mapping
|
|
584
|
+
the cubic equation roots of ``self`` to ``im_cubic_equation_roots``.
|
|
585
|
+
|
|
586
|
+
INPUT:
|
|
587
|
+
|
|
588
|
+
- ``im_cubic_equation_roots`` -- list or tuple of three ring elements
|
|
589
|
+
such that there exists a ring homomorphism from the corresponding
|
|
590
|
+
elements of ``self`` to them
|
|
591
|
+
|
|
592
|
+
OUTPUT:
|
|
593
|
+
|
|
594
|
+
A common parent containing the elements of ``im_cubic_equation_roots``
|
|
595
|
+
together with their inverses.
|
|
596
|
+
|
|
597
|
+
EXAMPLES::
|
|
598
|
+
|
|
599
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
600
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
601
|
+
sage: t = ER.an_element(); t
|
|
602
|
+
b^2*c^-1 + e3*a
|
|
603
|
+
sage: Sp1 = ER.create_specialization([E(5), E(7), E(3)]); Sp1
|
|
604
|
+
Universal Cyclotomic Field
|
|
605
|
+
sage: Sp1(t)
|
|
606
|
+
-E(105)^11 - E(105)^16 - E(105)^26 - E(105)^37 - E(105)^41
|
|
607
|
+
- E(105)^58 - E(105)^71 - E(105)^79 - E(105)^86 - E(105)^101
|
|
608
|
+
sage: MER = chbr.CubicHeckeExtensionRing('a, b, c, s', markov_trace_version=True)
|
|
609
|
+
sage: MER.create_specialization([E(5), E(7), E(3)], im_writhe_parameter=E(4))
|
|
610
|
+
Universal Cyclotomic Field
|
|
611
|
+
sage: a, b, c, s = MER.gens()
|
|
612
|
+
sage: Sp1(MER(t)/s)
|
|
613
|
+
E(420) + E(420)^29 + E(420)^89 + E(420)^149 + E(420)^169 + E(420)^209
|
|
614
|
+
+ E(420)^253 + E(420)^269 + E(420)^337 + E(420)^389
|
|
615
|
+
|
|
616
|
+
sage: Z3 = CyclotomicField(3); E3=Z3.gen()
|
|
617
|
+
sage: Sp2 = ER.create_specialization([E3, E3**2, Z3(1)])
|
|
618
|
+
sage: Sp2(t)
|
|
619
|
+
-1
|
|
620
|
+
sage: MER.create_specialization([E3, E3**2, 1], im_writhe_parameter=2)
|
|
621
|
+
Cyclotomic Field of order 3 and degree 2
|
|
622
|
+
sage: Sp2(MER(t)*s)
|
|
623
|
+
-2
|
|
624
|
+
|
|
625
|
+
sage: Sp3 = ER.create_specialization([5, 7, 11])
|
|
626
|
+
sage: Sp3(t)
|
|
627
|
+
5*E3 + 49/11
|
|
628
|
+
"""
|
|
629
|
+
# ----------------------------------------------------------------------
|
|
630
|
+
# interpreting user given cubic equation roots and define the
|
|
631
|
+
# corresponding specialized extension ring.
|
|
632
|
+
# ----------------------------------------------------------------------
|
|
633
|
+
|
|
634
|
+
if isinstance(im_cubic_equation_roots, tuple):
|
|
635
|
+
im_cubic_equation_roots = list(im_cubic_equation_roots)
|
|
636
|
+
|
|
637
|
+
if not isinstance(im_cubic_equation_roots, list):
|
|
638
|
+
raise TypeError('cubic_equation_roots must be a list of three elements')
|
|
639
|
+
|
|
640
|
+
if len(im_cubic_equation_roots) != 3:
|
|
641
|
+
raise ValueError('there must be exactly three cubic_equation_roots')
|
|
642
|
+
|
|
643
|
+
gens = self.gens()
|
|
644
|
+
num_gens = len(gens)
|
|
645
|
+
if im_writhe_parameter:
|
|
646
|
+
if num_gens < 4:
|
|
647
|
+
raise ValueError('im_writhe_parameter only possible for Markov-trace extension')
|
|
648
|
+
im_gens = im_cubic_equation_roots + [im_writhe_parameter]
|
|
649
|
+
a, b, c, s = im_gens
|
|
650
|
+
else:
|
|
651
|
+
if num_gens == 4:
|
|
652
|
+
raise ValueError('im_writhe_parameter must be given for Markov-trace extension')
|
|
653
|
+
im_gens = im_cubic_equation_roots
|
|
654
|
+
a, b, c = im_gens
|
|
655
|
+
|
|
656
|
+
image_ring = get_coercion_model().common_parent(*(im_gens))
|
|
657
|
+
|
|
658
|
+
# ----------------------------------------------------------------------
|
|
659
|
+
# make sure that all given cubic equation roots and their inverses
|
|
660
|
+
# belong to image_ring
|
|
661
|
+
# ----------------------------------------------------------------------
|
|
662
|
+
try:
|
|
663
|
+
image_ring = image_ring.localization(tuple(im_gens))
|
|
664
|
+
except ValueError:
|
|
665
|
+
pass
|
|
666
|
+
|
|
667
|
+
im_gens = [image_ring(root) for root in im_gens]
|
|
668
|
+
verbose('common parent of roots and inverses: %s' % (image_ring), level=2)
|
|
669
|
+
|
|
670
|
+
image_ring_base = image_ring.base_ring()
|
|
671
|
+
image_ring_map = None
|
|
672
|
+
|
|
673
|
+
verbose('first choice: image_ring %s, image_ring_base %s' % (image_ring, image_ring_base), level=2)
|
|
674
|
+
|
|
675
|
+
# ----------------------------------------------------------------------
|
|
676
|
+
# make sure that a third root of unity belongs to image_ring
|
|
677
|
+
# ----------------------------------------------------------------------
|
|
678
|
+
|
|
679
|
+
E3 = None
|
|
680
|
+
cp3 = cyclotomic_polynomial(3, var=var).change_ring(image_ring)
|
|
681
|
+
cyclotomic_roots = solve_with_extension(cp3, [third_unity_root_name], var=var, flatten=True, warning=False)
|
|
682
|
+
|
|
683
|
+
if len(cyclotomic_roots) > 0:
|
|
684
|
+
E3 = cyclotomic_roots[0]
|
|
685
|
+
verbose('third root of unity %s found in %s' % (E3, E3.parent()), level=2)
|
|
686
|
+
|
|
687
|
+
if E3 is None:
|
|
688
|
+
raise RuntimeError('cannot find a ring containing a third root of unity for the this choice of cubic roots!')
|
|
689
|
+
|
|
690
|
+
hom_gens = [E3] + im_gens
|
|
691
|
+
verbose('hom_gens %s' % hom_gens, level=2)
|
|
692
|
+
|
|
693
|
+
image_ring = get_coercion_model().common_parent(*(hom_gens))
|
|
694
|
+
verbose('common parent of roots and third root: %s' % image_ring, level=2)
|
|
695
|
+
|
|
696
|
+
hom_gens = [image_ring(gen) for gen in hom_gens]
|
|
697
|
+
|
|
698
|
+
image_ring_base = image_ring.base_ring()
|
|
699
|
+
|
|
700
|
+
verbose('second choice: image_ring %s, image_ring_base %s' % (image_ring, image_ring_base), level=2)
|
|
701
|
+
|
|
702
|
+
try:
|
|
703
|
+
image_ring_map = self.hom(hom_gens, codomain=image_ring)
|
|
704
|
+
except (ValueError, NotImplementedError):
|
|
705
|
+
image_ring_map = self.hom(hom_gens, codomain=image_ring, check=False)
|
|
706
|
+
verbose('check failed for embedding as ring morphism')
|
|
707
|
+
|
|
708
|
+
verbose('specializing map defined %s' % image_ring_map, level=2)
|
|
709
|
+
|
|
710
|
+
register_ring_hom(image_ring_map)
|
|
711
|
+
return image_ring
|
|
712
|
+
|
|
713
|
+
def as_splitting_algebra(self):
|
|
714
|
+
r"""
|
|
715
|
+
Return ``self`` as a :class:`SplittingAlgebra`; that is as an
|
|
716
|
+
extension ring of the corresponding cubic Hecke algebra base ring
|
|
717
|
+
(``self._ring_of_definition``, as a :class:`CubicHeckeRingOfDefinition`)
|
|
718
|
+
splitting its cubic equation into linear factors, such that the roots
|
|
719
|
+
are images of the generators of ``self``.
|
|
720
|
+
|
|
721
|
+
EXAMPLES::
|
|
722
|
+
|
|
723
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
724
|
+
sage: GBR = chbr.CubicHeckeRingOfDefinition()
|
|
725
|
+
sage: GER = GBR.extension_ring()
|
|
726
|
+
sage: ER = GER.as_splitting_algebra(); ER
|
|
727
|
+
Splitting Algebra of T^2 + T + 1 with roots [E3, -E3 - 1]
|
|
728
|
+
over Splitting Algebra of h^3 - u*h^2 + v*h - w
|
|
729
|
+
with roots [a, b, -b - a + u]
|
|
730
|
+
over Multivariate Polynomial Ring in u, v, w
|
|
731
|
+
over Integer Ring localized at (w,)
|
|
732
|
+
sage: ER(GER.an_element())
|
|
733
|
+
a*E3 + ((u/(-w))*a^2 + ((u^2 - v)/w)*a)*b + a - u
|
|
734
|
+
sage: ER(GBR.an_element())
|
|
735
|
+
(u^2 + v*w)/w
|
|
736
|
+
|
|
737
|
+
sage: MBR = chbr.CubicHeckeRingOfDefinition(markov_trace_version=True)
|
|
738
|
+
sage: MER = MBR.extension_ring()
|
|
739
|
+
sage: ES = MER.as_splitting_algebra(); ES
|
|
740
|
+
Splitting Algebra of T^2 + T + 1 with roots [E3, -E3 - 1]
|
|
741
|
+
over Splitting Algebra of h^3 - u*h^2 + v*h - w
|
|
742
|
+
with roots [a, b, -b - a + u]
|
|
743
|
+
over Multivariate Polynomial Ring in u, v, w, s
|
|
744
|
+
over Integer Ring localized at (s, w, v, u)
|
|
745
|
+
sage: ES(MER.an_element())
|
|
746
|
+
(((-1)/(-s))*a)*E3 + ((u/(-w))*a^2 + ((u^2 - v)/w)*a)*b + a - u
|
|
747
|
+
sage: ES(MBR.an_element())
|
|
748
|
+
(u^2*s + v*w)/(w*s)
|
|
749
|
+
"""
|
|
750
|
+
if self._splitting_algebra is not None:
|
|
751
|
+
verbose("End (short)", level=2)
|
|
752
|
+
return self._splitting_algebra
|
|
753
|
+
|
|
754
|
+
if self._ring_of_definition is None:
|
|
755
|
+
verbose("constructing generic base ring", level=2)
|
|
756
|
+
self._ring_of_definition = CubicHeckeRingOfDefinition()
|
|
757
|
+
|
|
758
|
+
markov = self._is_markov_trace_version()
|
|
759
|
+
|
|
760
|
+
BR = self._ring_of_definition
|
|
761
|
+
root_names = list(self._names)
|
|
762
|
+
var_s = None
|
|
763
|
+
if markov:
|
|
764
|
+
var_s = root_names.pop() # s not needed as root
|
|
765
|
+
a, b, c, s = self.gens()
|
|
766
|
+
else:
|
|
767
|
+
a, b, c = self.gens()
|
|
768
|
+
|
|
769
|
+
root_names.pop() # c not needed as root
|
|
770
|
+
|
|
771
|
+
FSR = SplittingAlgebra(BR.cubic_equation(), root_names, warning=False)
|
|
772
|
+
splitting_roots = FSR.splitting_roots()
|
|
773
|
+
verbose('splitting roots %s' % splitting_roots, level=2)
|
|
774
|
+
|
|
775
|
+
A, B, C = splitting_roots
|
|
776
|
+
e3 = self.cyclotomic_generator()
|
|
777
|
+
if var_s:
|
|
778
|
+
fsr_s = FSR.scalar_base_ring().gens_dict()[var_s]
|
|
779
|
+
S = self.create_specialization([A, B, C], im_writhe_parameter=fsr_s)
|
|
780
|
+
# check of embedding fails in this case as long as the images of
|
|
781
|
+
# ``iu`` and ``iv`` need to be invertible (see comment in
|
|
782
|
+
# :meth:`__init__` of :class:`CubicHeckeRingOfDefinition`).
|
|
783
|
+
map_back = S.hom([e3, b, a, a + b + c, a*b+a*c+b*c, a*b*c, s], check=False)
|
|
784
|
+
else:
|
|
785
|
+
S = self.create_specialization([A, B, C])
|
|
786
|
+
map_back = S.hom([e3, b, a, a + b + c, a*b+a*c+b*c, a*b*c])
|
|
787
|
+
self.register_coercion(map_back)
|
|
788
|
+
self._splitting_algebra = S
|
|
789
|
+
return self._splitting_algebra
|
|
790
|
+
|
|
791
|
+
def field_embedding(self, characteristic=0):
|
|
792
|
+
r"""
|
|
793
|
+
Return a field embedding of ``self``.
|
|
794
|
+
|
|
795
|
+
INPUT:
|
|
796
|
+
|
|
797
|
+
- ``characteristic`` -- integer (default: `0`); the characteristic
|
|
798
|
+
of the field
|
|
799
|
+
|
|
800
|
+
EXAMPLES::
|
|
801
|
+
|
|
802
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
803
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
804
|
+
sage: ER = BR.extension_ring()
|
|
805
|
+
sage: ER.field_embedding()
|
|
806
|
+
Ring morphism:
|
|
807
|
+
From: Multivariate Laurent Polynomial Ring in a, b, c
|
|
808
|
+
over Splitting Algebra of x^2 + x + 1
|
|
809
|
+
with roots [e3, -e3 - 1]
|
|
810
|
+
over Integer Ring
|
|
811
|
+
To: Fraction Field of Multivariate Polynomial Ring in a, b, c
|
|
812
|
+
over Cyclotomic Field of order 3 and degree 2
|
|
813
|
+
Defn: a |--> a
|
|
814
|
+
b |--> b
|
|
815
|
+
c |--> c
|
|
816
|
+
with map of base ring
|
|
817
|
+
|
|
818
|
+
sage: ER.field_embedding(characteristic=5)
|
|
819
|
+
Ring morphism:
|
|
820
|
+
From: Multivariate Laurent Polynomial Ring in a, b, c
|
|
821
|
+
over Splitting Algebra of x^2 + x + 1
|
|
822
|
+
with roots [e3, -e3 - 1]
|
|
823
|
+
over Integer Ring
|
|
824
|
+
To: Fraction Field of Multivariate Polynomial Ring in a, b, c
|
|
825
|
+
over Finite Field in a of size 5^2
|
|
826
|
+
Defn: a |--> a
|
|
827
|
+
b |--> b
|
|
828
|
+
c |--> c
|
|
829
|
+
with map of base ring
|
|
830
|
+
|
|
831
|
+
sage: MER = ER.markov_trace_version()
|
|
832
|
+
sage: MER.field_embedding()
|
|
833
|
+
Ring morphism:
|
|
834
|
+
From: Multivariate Laurent Polynomial Ring in a, b, c, s
|
|
835
|
+
over Splitting Algebra of x^2 + x + 1
|
|
836
|
+
with roots [e3, -e3 - 1]
|
|
837
|
+
over Integer Ring
|
|
838
|
+
To: Fraction Field of Multivariate Polynomial Ring in a, b, c, s
|
|
839
|
+
over Cyclotomic Field of order 3 and degree 2
|
|
840
|
+
Defn: a |--> a
|
|
841
|
+
b |--> b
|
|
842
|
+
c |--> c
|
|
843
|
+
s |--> s
|
|
844
|
+
with map of base ring
|
|
845
|
+
"""
|
|
846
|
+
if characteristic == 0:
|
|
847
|
+
from sage.rings.number_field.number_field import CyclotomicField
|
|
848
|
+
C3 = CyclotomicField(3)
|
|
849
|
+
E3 = C3.gen()
|
|
850
|
+
else:
|
|
851
|
+
if not ZZ(characteristic).is_prime():
|
|
852
|
+
raise ValueError('characteristic must be a prime integer')
|
|
853
|
+
from sage.rings.finite_rings.finite_field_constructor import GF
|
|
854
|
+
from sage.misc.functional import cyclotomic_polynomial
|
|
855
|
+
G = GF(characteristic)
|
|
856
|
+
c3 = cyclotomic_polynomial(3).change_ring(G)
|
|
857
|
+
C3 = c3.splitting_field('a')
|
|
858
|
+
E3 = c3.change_ring(C3).roots()[0][0]
|
|
859
|
+
|
|
860
|
+
B = self.base_ring()
|
|
861
|
+
embBase = B.hom((E3,))
|
|
862
|
+
if not C3.has_coerce_map_from(B):
|
|
863
|
+
C3._unset_coercions_used()
|
|
864
|
+
C3.register_coercion(embBase)
|
|
865
|
+
P = C3[self.variable_names()]
|
|
866
|
+
F = P.fraction_field()
|
|
867
|
+
emb = self.hom((F(E3),) + F.gens())
|
|
868
|
+
F = emb.codomain()
|
|
869
|
+
if not F.has_coerce_map_from(self):
|
|
870
|
+
F._unset_coercions_used()
|
|
871
|
+
F.register_coercion(emb)
|
|
872
|
+
return emb
|
|
873
|
+
|
|
874
|
+
def markov_trace_version(self):
|
|
875
|
+
r"""
|
|
876
|
+
Return the Markov trace version of ``self``.
|
|
877
|
+
|
|
878
|
+
EXAMPLES::
|
|
879
|
+
|
|
880
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
881
|
+
sage: ER = chbr.CubicHeckeExtensionRing('a, b, c')
|
|
882
|
+
sage: ER.markov_trace_version()
|
|
883
|
+
Multivariate Laurent Polynomial Ring in a, b, c, s
|
|
884
|
+
over Splitting Algebra of x^2 + x + 1
|
|
885
|
+
with roots [e3, -e3 - 1] over Integer Ring
|
|
886
|
+
"""
|
|
887
|
+
if self._is_markov_trace_version():
|
|
888
|
+
return self
|
|
889
|
+
names = self.variable_names() + ('s',)
|
|
890
|
+
return self.__class__(names=names, order=self._order, markov_trace_version=True)
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
################################################################################
|
|
894
|
+
# Ring of Definition
|
|
895
|
+
# ------------------------------------------------------------------------------
|
|
896
|
+
# Definition of the ring of definition for the cubic Hecke algebra as polynomial
|
|
897
|
+
# ring in 2 indeterminates over univariate Laurent polynomial ring over the
|
|
898
|
+
# integers. This is the most general ring over which the cubic Hecke algebra may
|
|
899
|
+
# be defined.
|
|
900
|
+
# ------------------------------------------------------------------------------
|
|
901
|
+
class CubicHeckeRingOfDefinition(Localization):
|
|
902
|
+
r"""
|
|
903
|
+
The *ring of definition* of the cubic Hecke algebra.
|
|
904
|
+
|
|
905
|
+
It contains one invertible indeterminate (representing the product of the
|
|
906
|
+
roots of the cubic equation) and two non invertible indeterminates.
|
|
907
|
+
|
|
908
|
+
.. NOTE::
|
|
909
|
+
|
|
910
|
+
We follow a suggestion by Ivan Marin in the name *ring of definition*.
|
|
911
|
+
We avoid alternative names like *generic* or *universal* base ring
|
|
912
|
+
as these have some issues. The first option could be misleading
|
|
913
|
+
in view of the term *generic point* used in algebraic geometry, which
|
|
914
|
+
would mean the function field in ``u, v, w``, here.
|
|
915
|
+
|
|
916
|
+
The second option is problematic since the base ring itself is not a
|
|
917
|
+
universal object. Rather, the universal object is the cubic Hecke algebra
|
|
918
|
+
considered as a `\ZZ`-algebra including ``u, v, w`` as pairwise commuting
|
|
919
|
+
indeterminates. From this point of view the base ring appears to be a
|
|
920
|
+
subalgebra of this universal object generated by ``u, v, w``.
|
|
921
|
+
|
|
922
|
+
INPUT:
|
|
923
|
+
|
|
924
|
+
- ``names`` -- (default: ``'u,v,w'``) string containing the names of the
|
|
925
|
+
indeterminates separated by ``,`` or a triple of strings each of which
|
|
926
|
+
are the names of one of the three indeterminates
|
|
927
|
+
- ``order`` -- string (default: ``'degrevlex'``); the term order; see also
|
|
928
|
+
:class:`~sage.rings.polynomial.laurent_polynomial_ring.LaurentPolynomialRing_mpair`
|
|
929
|
+
- ``ring_of_definition`` -- (optional) a :class:`CubicHeckeRingOfDefinition`
|
|
930
|
+
to specify the generic cubic Hecke base ring over which ``self`` may be
|
|
931
|
+
realized as splitting ring via the ``as_splitting_algebra`` method
|
|
932
|
+
- ``markov_trace_version`` -- boolean (default: ``False``); if this is
|
|
933
|
+
set to ``True`` then ``self`` contains one invertible indeterminate in
|
|
934
|
+
addition which is meant to represent the writhe factor of a Markov trace
|
|
935
|
+
on the cubic Hecke algebra and which default name is ``s``
|
|
936
|
+
|
|
937
|
+
EXAMPLES::
|
|
938
|
+
|
|
939
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
940
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
941
|
+
sage: u, v, w = BR.gens()
|
|
942
|
+
sage: ele = 3*u*v-5*w**(-2)
|
|
943
|
+
sage: ER = BR.extension_ring()
|
|
944
|
+
sage: ER(ele)
|
|
945
|
+
3*a^2*b + 3*a*b^2 + 3*a^2*c + 9*a*b*c + 3*b^2*c
|
|
946
|
+
+ 3*a*c^2 + 3*b*c^2 + (-5)*a^-2*b^-2*c^-2
|
|
947
|
+
sage: phi1 = BR.hom( [4,3,1/1] )
|
|
948
|
+
sage: phi1(ele)
|
|
949
|
+
31
|
|
950
|
+
|
|
951
|
+
sage: LL.<t> = LaurentPolynomialRing(ZZ)
|
|
952
|
+
sage: phi2=BR.hom( [LL(4),LL(3),t] )
|
|
953
|
+
sage: phi2(ele)
|
|
954
|
+
-5*t^-2 + 36
|
|
955
|
+
|
|
956
|
+
sage: BR.create_specialization( [E(5), E(7), E(3)] )
|
|
957
|
+
Universal Cyclotomic Field
|
|
958
|
+
sage: _(ele)
|
|
959
|
+
-3*E(105) - 5*E(105)^2 - 5*E(105)^8 - 5*E(105)^11 - 5*E(105)^17
|
|
960
|
+
- 5*E(105)^23 - 5*E(105)^26 - 5*E(105)^29 - 5*E(105)^32 - 5*E(105)^38
|
|
961
|
+
- 5*E(105)^41 - 5*E(105)^44 - 5*E(105)^47 - 5*E(105)^53 - 5*E(105)^59
|
|
962
|
+
- 5*E(105)^62 - 5*E(105)^68 - 8*E(105)^71 - 5*E(105)^74 - 5*E(105)^83
|
|
963
|
+
- 5*E(105)^86 - 5*E(105)^89 - 5*E(105)^92 - 5*E(105)^101 - 5*E(105)^104
|
|
964
|
+
"""
|
|
965
|
+
def __init__(self, names=('u', 'v', 'w', 's'), order='degrevlex', markov_trace_version=False):
|
|
966
|
+
r"""
|
|
967
|
+
Initialize ``self``.
|
|
968
|
+
|
|
969
|
+
TESTS::
|
|
970
|
+
|
|
971
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
972
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
973
|
+
sage: TestSuite(BR).run()
|
|
974
|
+
"""
|
|
975
|
+
# ----------------------------------------------------------------------
|
|
976
|
+
# ----------------------------------------------------------------------
|
|
977
|
+
# Saving class-globals
|
|
978
|
+
# ----------------------------------------------------------------------
|
|
979
|
+
# ----------------------------------------------------------------------
|
|
980
|
+
names = normalize_names_markov(names, markov_trace_version)
|
|
981
|
+
if len(names) == 4:
|
|
982
|
+
# invertible_names = names[2:4] # s must be invertible, too
|
|
983
|
+
#
|
|
984
|
+
# because the formal Markov trace of the both basis elements
|
|
985
|
+
# ``self.get_order()[568]`` (``KnotInfo.L8a7_1``) and
|
|
986
|
+
# ``self.get_order()[596]`` (mirror image of ``KnotInfo.K9_46``)
|
|
987
|
+
# have the indeterminate ``v`` in their denominator we need to have
|
|
988
|
+
# all indeterminates invertible (``u`` as well for the mirror images)
|
|
989
|
+
invertible_names = names
|
|
990
|
+
else:
|
|
991
|
+
invertible_names = names[2]
|
|
992
|
+
|
|
993
|
+
self._order = order
|
|
994
|
+
|
|
995
|
+
# ----------------------------------------------------------------------
|
|
996
|
+
# ---------------------------------------------------------------------
|
|
997
|
+
# Init of self
|
|
998
|
+
# ----------------------------------------------------------------------
|
|
999
|
+
# ----------------------------------------------------------------------
|
|
1000
|
+
base_ring = PolynomialRing(ZZ, names, order=order)
|
|
1001
|
+
Localization.__init__(self, base_ring, invertible_names)
|
|
1002
|
+
|
|
1003
|
+
# ----------------------------------------------------------------------
|
|
1004
|
+
# Init of data used on demand
|
|
1005
|
+
# ----------------------------------------------------------------------
|
|
1006
|
+
self._mirror = None
|
|
1007
|
+
|
|
1008
|
+
# ########################################################################
|
|
1009
|
+
# overloaded inherited methods
|
|
1010
|
+
# ########################################################################
|
|
1011
|
+
def _defining_names(self):
|
|
1012
|
+
r"""
|
|
1013
|
+
Return the generators of ``self`` as the defining names.
|
|
1014
|
+
|
|
1015
|
+
This method is cached in the parent class.
|
|
1016
|
+
This causes trouble if a second instance of ``self`` is used for another
|
|
1017
|
+
cubic Hecke algebra in the same session. To avoid this it is overloaded
|
|
1018
|
+
without ``cached_method`` decorator.
|
|
1019
|
+
|
|
1020
|
+
EXAMPLES::
|
|
1021
|
+
|
|
1022
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1023
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
1024
|
+
sage: BR._defining_names()
|
|
1025
|
+
(u, v, w)
|
|
1026
|
+
"""
|
|
1027
|
+
return self.gens()
|
|
1028
|
+
|
|
1029
|
+
def _an_element_(self):
|
|
1030
|
+
r"""
|
|
1031
|
+
Return an element of ``self``.
|
|
1032
|
+
|
|
1033
|
+
EXAMPLES::
|
|
1034
|
+
|
|
1035
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1036
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
1037
|
+
sage: BR.an_element() # indirect doctest
|
|
1038
|
+
(u^2 + v*w)/w
|
|
1039
|
+
sage: MBR = chbr.CubicHeckeRingOfDefinition(markov_trace_version=True)
|
|
1040
|
+
sage: MBR.an_element() # indirect doctest
|
|
1041
|
+
(u^2*s + v*w)/(w*s)
|
|
1042
|
+
"""
|
|
1043
|
+
u, v, w, *rem = self.gens()
|
|
1044
|
+
s = self.one()
|
|
1045
|
+
if rem:
|
|
1046
|
+
s = rem[0]
|
|
1047
|
+
return u**2/w+v/s
|
|
1048
|
+
|
|
1049
|
+
############################################################################
|
|
1050
|
+
# Local Methods
|
|
1051
|
+
############################################################################
|
|
1052
|
+
def _is_markov_trace_version(self) -> bool:
|
|
1053
|
+
r"""
|
|
1054
|
+
Return whether ``self`` is the version containing the writhe parameter
|
|
1055
|
+
``s`` for the Markov trace.
|
|
1056
|
+
|
|
1057
|
+
EXAMPLES::
|
|
1058
|
+
|
|
1059
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1060
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
1061
|
+
sage: BR._is_markov_trace_version()
|
|
1062
|
+
False
|
|
1063
|
+
sage: MBR = chbr.CubicHeckeRingOfDefinition(markov_trace_version=True)
|
|
1064
|
+
sage: MBR._is_markov_trace_version()
|
|
1065
|
+
True
|
|
1066
|
+
"""
|
|
1067
|
+
return len(self.gens()) == 4
|
|
1068
|
+
|
|
1069
|
+
############################################################################
|
|
1070
|
+
# Global Methods
|
|
1071
|
+
############################################################################
|
|
1072
|
+
def cubic_equation(self, var='h', as_coefficients=False):
|
|
1073
|
+
r"""
|
|
1074
|
+
Return the cubic equation over which the cubic Hecke algebra is defined.
|
|
1075
|
+
|
|
1076
|
+
EXAMPLES::
|
|
1077
|
+
|
|
1078
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1079
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
1080
|
+
sage: BR.cubic_equation()
|
|
1081
|
+
h^3 - u*h^2 + v*h - w
|
|
1082
|
+
sage: BR.cubic_equation(var='t')
|
|
1083
|
+
t^3 - u*t^2 + v*t - w
|
|
1084
|
+
sage: BR.cubic_equation(as_coefficients=True)
|
|
1085
|
+
[-w, v, -u, 1]
|
|
1086
|
+
"""
|
|
1087
|
+
u, v, w, *rem = self.gens()
|
|
1088
|
+
cf = [-w, v, -u, 1]
|
|
1089
|
+
if as_coefficients:
|
|
1090
|
+
return cf
|
|
1091
|
+
P = PolynomialRing(self, var)
|
|
1092
|
+
|
|
1093
|
+
return P(cf)
|
|
1094
|
+
|
|
1095
|
+
def mirror_involution(self):
|
|
1096
|
+
r"""
|
|
1097
|
+
Return the involution of ``self`` corresponding to the involution of the
|
|
1098
|
+
cubic Hecke algebra (with the same name).
|
|
1099
|
+
|
|
1100
|
+
This means that it maps the last generator of ``self`` to its inverse
|
|
1101
|
+
and both others to their product with the image of the former.
|
|
1102
|
+
|
|
1103
|
+
From the cubic equation for a braid generator `\beta_i`:
|
|
1104
|
+
|
|
1105
|
+
.. MATH::
|
|
1106
|
+
|
|
1107
|
+
\beta_i^3 - u \beta_i^2 + v\beta_i -w = 0.
|
|
1108
|
+
|
|
1109
|
+
One deduces the following cubic equation for `\beta_i^{-1}`:
|
|
1110
|
+
|
|
1111
|
+
.. MATH::
|
|
1112
|
+
|
|
1113
|
+
\beta_i^{-3} -\frac{v}{w} \beta_i^{-2} + \frac{u}{w}\beta_i^{-1}
|
|
1114
|
+
- \frac{1}{w} = 0.
|
|
1115
|
+
|
|
1116
|
+
.. NOTE::
|
|
1117
|
+
|
|
1118
|
+
The mirror involution of the braid group does not factor through
|
|
1119
|
+
the cubic Hecke algebra over its base ring, but it does if it is
|
|
1120
|
+
considered as `\ZZ`-algebra. The base ring elements are transformed
|
|
1121
|
+
by this automorphism.
|
|
1122
|
+
|
|
1123
|
+
OUTPUT: the involution as automorphism of ``self``
|
|
1124
|
+
|
|
1125
|
+
EXAMPLES::
|
|
1126
|
+
|
|
1127
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1128
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
1129
|
+
sage: BR.mirror_involution()
|
|
1130
|
+
Ring endomorphism of Multivariate Polynomial Ring in u, v, w
|
|
1131
|
+
over Integer Ring localized at (w,)
|
|
1132
|
+
Defn: u |--> v/w
|
|
1133
|
+
v |--> u/w
|
|
1134
|
+
w |--> 1/w
|
|
1135
|
+
sage: _(BR.an_element())
|
|
1136
|
+
(v^2 + u)/w
|
|
1137
|
+
|
|
1138
|
+
sage: MBR = chbr.CubicHeckeRingOfDefinition(markov_trace_version=True)
|
|
1139
|
+
sage: MBR.mirror_involution()
|
|
1140
|
+
Ring endomorphism of Multivariate Polynomial Ring in u, v, w, s
|
|
1141
|
+
over Integer Ring localized at (s, w, v, u)
|
|
1142
|
+
Defn: u |--> v/w
|
|
1143
|
+
v |--> u/w
|
|
1144
|
+
w |--> 1/w
|
|
1145
|
+
s |--> 1/s
|
|
1146
|
+
sage: _(MBR.an_element())
|
|
1147
|
+
(v^2 + u*s)/w
|
|
1148
|
+
"""
|
|
1149
|
+
if self._mirror is None:
|
|
1150
|
+
if self._is_markov_trace_version():
|
|
1151
|
+
u, v, w, s = self.gens()
|
|
1152
|
+
self._mirror = self.hom([v / w, u / w, ~w, ~s])
|
|
1153
|
+
else:
|
|
1154
|
+
u, v, w = self.gens()
|
|
1155
|
+
self._mirror = self.hom([v / w, u / w, ~w])
|
|
1156
|
+
return self._mirror
|
|
1157
|
+
|
|
1158
|
+
def create_specialization(self, im_cubic_equation_parameters, im_writhe_parameter=None):
|
|
1159
|
+
r"""
|
|
1160
|
+
Return an appropriate Ring containing the elements from the list
|
|
1161
|
+
``im_cubic_equation_parameters`` having a conversion map from ``self``
|
|
1162
|
+
mapping the cubic equation parameters of ``self`` to
|
|
1163
|
+
``im_cubic_equation_parameters``.
|
|
1164
|
+
|
|
1165
|
+
INPUT:
|
|
1166
|
+
|
|
1167
|
+
- ``im_cubic_equation_parameters`` -- list or tuple of three ring
|
|
1168
|
+
elements such that there exists a ring homomorphism from the
|
|
1169
|
+
corresponding elements of ``self`` to them
|
|
1170
|
+
|
|
1171
|
+
OUTPUT:
|
|
1172
|
+
|
|
1173
|
+
A common parent containing the elements of ``im_cubic_equation_parameters``
|
|
1174
|
+
together with an inverse of the third element.
|
|
1175
|
+
|
|
1176
|
+
EXAMPLES::
|
|
1177
|
+
|
|
1178
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1179
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
1180
|
+
sage: t = BR.an_element(); t
|
|
1181
|
+
(u^2 + v*w)/w
|
|
1182
|
+
sage: Sp1 = BR.create_specialization([E(5), E(7), E(3)]); Sp1
|
|
1183
|
+
Universal Cyclotomic Field
|
|
1184
|
+
sage: Sp1(t)
|
|
1185
|
+
E(105) + E(105)^8 + E(105)^29 - E(105)^37 + E(105)^43 - E(105)^52
|
|
1186
|
+
+ E(105)^64 - E(105)^67 + E(105)^71 - E(105)^82 + E(105)^92
|
|
1187
|
+
- E(105)^97
|
|
1188
|
+
|
|
1189
|
+
sage: MBR = chbr.CubicHeckeRingOfDefinition(markov_trace_version=True)
|
|
1190
|
+
sage: MBR.create_specialization([E(5), E(7), E(3)], im_writhe_parameter=E(4))
|
|
1191
|
+
Universal Cyclotomic Field
|
|
1192
|
+
sage: u, v, w, s = MBR.gens()
|
|
1193
|
+
sage: Sp1(MBR(t)/s)
|
|
1194
|
+
E(420)^13 - E(420)^53 + E(420)^73 - E(420)^109 - E(420)^137
|
|
1195
|
+
- E(420)^221 + E(420)^253 - E(420)^277 + E(420)^313 - E(420)^361
|
|
1196
|
+
+ E(420)^373 - E(420)^389
|
|
1197
|
+
|
|
1198
|
+
sage: Z3 = CyclotomicField(3); E3=Z3.gen()
|
|
1199
|
+
sage: Sp2 = BR.create_specialization([E3, E3**2, 1]); Sp2
|
|
1200
|
+
Cyclotomic Field of order 3 and degree 2
|
|
1201
|
+
sage: Sp2(t)
|
|
1202
|
+
-2*zeta3 - 2
|
|
1203
|
+
sage: MBR.create_specialization([E3, E3**2, 1], im_writhe_parameter=2)
|
|
1204
|
+
Cyclotomic Field of order 3 and degree 2
|
|
1205
|
+
sage: Sp2(MBR(t)/s)
|
|
1206
|
+
-zeta3 - 1
|
|
1207
|
+
|
|
1208
|
+
sage: Sp3 = BR.create_specialization([5, 7, 11]); Sp3
|
|
1209
|
+
Integer Ring localized at (11,)
|
|
1210
|
+
sage: Sp3(t)
|
|
1211
|
+
102/11
|
|
1212
|
+
"""
|
|
1213
|
+
# ----------------------------------------------------------------------
|
|
1214
|
+
# setting the base_ring according to the cubic_equation_parameters
|
|
1215
|
+
# ----------------------------------------------------------------------
|
|
1216
|
+
if isinstance(im_cubic_equation_parameters, tuple):
|
|
1217
|
+
im_cubic_equation_parameters = list(im_cubic_equation_parameters)
|
|
1218
|
+
|
|
1219
|
+
if not isinstance(im_cubic_equation_parameters, list):
|
|
1220
|
+
raise TypeError('cubic_equation_parameters must be a list of three elements')
|
|
1221
|
+
|
|
1222
|
+
if len(im_cubic_equation_parameters) != 3:
|
|
1223
|
+
raise ValueError('there must be exactly three cubic_equation_parameters')
|
|
1224
|
+
|
|
1225
|
+
gens = self.gens()
|
|
1226
|
+
num_gens = len(gens)
|
|
1227
|
+
if im_writhe_parameter:
|
|
1228
|
+
if num_gens < 4:
|
|
1229
|
+
raise ValueError('im_writhe_parameter only possible for Markov-trace extension')
|
|
1230
|
+
im_gens = im_cubic_equation_parameters + [im_writhe_parameter]
|
|
1231
|
+
u, v, w, s = im_gens
|
|
1232
|
+
else:
|
|
1233
|
+
if num_gens == 4:
|
|
1234
|
+
raise ValueError('im_writhe_parameter must be given for Markov-trace extension')
|
|
1235
|
+
im_gens = im_cubic_equation_parameters
|
|
1236
|
+
u, v, w = im_gens
|
|
1237
|
+
|
|
1238
|
+
image_ring = None
|
|
1239
|
+
image_ring_map = None
|
|
1240
|
+
image_ring_base = w.parent()
|
|
1241
|
+
|
|
1242
|
+
# ----------------------------------------------------------------------
|
|
1243
|
+
# short exit on trivial invocation
|
|
1244
|
+
# ----------------------------------------------------------------------
|
|
1245
|
+
if image_ring_base is self and im_gens == gens:
|
|
1246
|
+
return self
|
|
1247
|
+
|
|
1248
|
+
image_ring = get_coercion_model().common_parent(*(im_gens))
|
|
1249
|
+
|
|
1250
|
+
# ----------------------------------------------------------------------
|
|
1251
|
+
# make sure that the inverse of w belongs to image_ring
|
|
1252
|
+
# ----------------------------------------------------------------------
|
|
1253
|
+
try:
|
|
1254
|
+
image_ring = image_ring.localization(w)
|
|
1255
|
+
except ValueError:
|
|
1256
|
+
pass
|
|
1257
|
+
|
|
1258
|
+
im_gens = [image_ring(para) for para in im_gens]
|
|
1259
|
+
|
|
1260
|
+
verbose('common parent of parameters and inverses: %s' % image_ring, level=2)
|
|
1261
|
+
|
|
1262
|
+
try:
|
|
1263
|
+
image_ring_map = self.hom(im_gens, codomain=image_ring)
|
|
1264
|
+
except ValueError:
|
|
1265
|
+
image_ring_map = self.hom(im_gens, codomain=image_ring, check=False)
|
|
1266
|
+
verbose('Warning: check failed for embedding as ring morphism')
|
|
1267
|
+
|
|
1268
|
+
register_ring_hom(image_ring_map)
|
|
1269
|
+
return image_ring
|
|
1270
|
+
|
|
1271
|
+
# --------------------------------------------------------------------------
|
|
1272
|
+
# Definition of the generic extension ring for the cubic hecke algebra as
|
|
1273
|
+
# Laurent polynomial ring in 3 indeterminates over cyclotomic field of order
|
|
1274
|
+
# 3. The generic extension ring guarantees semisimplicity of the cubic Hecke
|
|
1275
|
+
# algebra.
|
|
1276
|
+
# --------------------------------------------------------------------------
|
|
1277
|
+
@cached_method
|
|
1278
|
+
def extension_ring(self, names=('a', 'b', 'c', 's')):
|
|
1279
|
+
r"""
|
|
1280
|
+
Return the generic extension ring attached to ``self``.
|
|
1281
|
+
|
|
1282
|
+
EXAMPLES::
|
|
1283
|
+
|
|
1284
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1285
|
+
sage: BR = chbr.CubicHeckeRingOfDefinition()
|
|
1286
|
+
sage: BR.extension_ring()
|
|
1287
|
+
Multivariate Laurent Polynomial Ring in a, b, c
|
|
1288
|
+
over Splitting Algebra of x^2 + x + 1
|
|
1289
|
+
with roots [e3, -e3 - 1]
|
|
1290
|
+
over Integer Ring
|
|
1291
|
+
"""
|
|
1292
|
+
markov = self._is_markov_trace_version()
|
|
1293
|
+
return CubicHeckeExtensionRing(names, ring_of_definition=self, markov_trace_version=markov)
|
|
1294
|
+
|
|
1295
|
+
def markov_trace_version(self):
|
|
1296
|
+
r"""
|
|
1297
|
+
Return the extension of the ring of definition needed to treat the
|
|
1298
|
+
formal Markov traces.
|
|
1299
|
+
|
|
1300
|
+
This appends an additional variable ``s`` to measure the writhe
|
|
1301
|
+
of knots and makes ``u`` and ``v`` invertible.
|
|
1302
|
+
|
|
1303
|
+
EXAMPLES::
|
|
1304
|
+
|
|
1305
|
+
sage: from sage.algebras.hecke_algebras import cubic_hecke_base_ring as chbr
|
|
1306
|
+
sage: GBR = chbr.CubicHeckeRingOfDefinition()
|
|
1307
|
+
sage: GBR.markov_trace_version()
|
|
1308
|
+
Multivariate Polynomial Ring in u, v, w, s
|
|
1309
|
+
over Integer Ring localized at (s, w, v, u)
|
|
1310
|
+
"""
|
|
1311
|
+
if self._is_markov_trace_version():
|
|
1312
|
+
return self
|
|
1313
|
+
names = self.base_ring().variable_names() + ('s',)
|
|
1314
|
+
return self.__class__(names=names, order=self._order, markov_trace_version=True)
|
|
1315
|
+
|
|
1316
|
+
def specialize_homfly(self):
|
|
1317
|
+
r"""
|
|
1318
|
+
Return a map to the two variable Laurent polynomial ring that is
|
|
1319
|
+
the parent of the HOMFLY-PT polynomial.
|
|
1320
|
+
|
|
1321
|
+
EXAMPLES::
|
|
1322
|
+
|
|
1323
|
+
sage: from sage.knots.knotinfo import KnotInfo
|
|
1324
|
+
sage: CHA2 = algebras.CubicHecke(2)
|
|
1325
|
+
sage: K5_1 = KnotInfo.K5_1.link()
|
|
1326
|
+
sage: br = CHA2(K5_1.braid())
|
|
1327
|
+
sage: mt = br.formal_markov_trace()
|
|
1328
|
+
sage: MT = mt.base_ring()
|
|
1329
|
+
sage: f = MT.specialize_homfly(); f
|
|
1330
|
+
Composite map:
|
|
1331
|
+
From: Multivariate Polynomial Ring in u, v, w, s over Integer Ring
|
|
1332
|
+
localized at (s, w, v, u)
|
|
1333
|
+
To: Multivariate Laurent Polynomial Ring in L, M over Integer Ring
|
|
1334
|
+
Defn: Ring morphism:
|
|
1335
|
+
From: Multivariate Polynomial Ring in u, v, w, s
|
|
1336
|
+
over Integer Ring localized at (s, w, v, u)
|
|
1337
|
+
To: Multivariate Polynomial Ring in L, M
|
|
1338
|
+
over Integer Ring localized at (M - 1, M, L)
|
|
1339
|
+
Defn: u |--> -M + 1
|
|
1340
|
+
v |--> -M + 1
|
|
1341
|
+
w |--> 1
|
|
1342
|
+
s |--> L
|
|
1343
|
+
then
|
|
1344
|
+
Conversion map:
|
|
1345
|
+
From: Multivariate Polynomial Ring in L, M
|
|
1346
|
+
over Integer Ring localized at (M - 1, M, L)
|
|
1347
|
+
To: Multivariate Laurent Polynomial Ring in L, M
|
|
1348
|
+
over Integer Ring
|
|
1349
|
+
sage: sup = mt.support()
|
|
1350
|
+
sage: h1 = sum(f(mt.coefficient(b)) * b.regular_homfly_polynomial() for b in sup)
|
|
1351
|
+
sage: L, M = f.codomain().gens()
|
|
1352
|
+
sage: h2 = K5_1.homfly_polynomial()
|
|
1353
|
+
sage: h1*L**(-5) == h2 # since the writhe of K5_1 is 5
|
|
1354
|
+
True
|
|
1355
|
+
"""
|
|
1356
|
+
if not self._is_markov_trace_version():
|
|
1357
|
+
raise ValueError('functionality only available for Markov trace version')
|
|
1358
|
+
from sage.knots.link import Link
|
|
1359
|
+
H = Link([]).homfly_polynomial().parent()
|
|
1360
|
+
L, M = H.gens()
|
|
1361
|
+
HL = H.localization(1 - M)
|
|
1362
|
+
u = HL(1 - M)
|
|
1363
|
+
phi = self.hom((u, u, HL.one(), HL(L)))
|
|
1364
|
+
inc = H.convert_map_from(HL)
|
|
1365
|
+
return inc * phi
|
|
1366
|
+
|
|
1367
|
+
def specialize_kauffman(self):
|
|
1368
|
+
r"""
|
|
1369
|
+
Return a map to the two variable Laurent polynomial ring that is
|
|
1370
|
+
the parent of the Kauffman polynomial.
|
|
1371
|
+
|
|
1372
|
+
EXAMPLES::
|
|
1373
|
+
|
|
1374
|
+
sage: from sage.knots.knotinfo import KnotInfo
|
|
1375
|
+
sage: CHA2 = algebras.CubicHecke(2)
|
|
1376
|
+
sage: K5_1 = KnotInfo.K5_1.link()
|
|
1377
|
+
sage: br = CHA2(K5_1.braid())
|
|
1378
|
+
sage: mt = br.formal_markov_trace()
|
|
1379
|
+
sage: MT = mt.base_ring()
|
|
1380
|
+
sage: f = MT.specialize_kauffman(); f
|
|
1381
|
+
Composite map:
|
|
1382
|
+
From: Multivariate Polynomial Ring in u, v, w, s over Integer Ring
|
|
1383
|
+
localized at (s, w, v, u)
|
|
1384
|
+
To: Multivariate Laurent Polynomial Ring in a, z over Integer Ring
|
|
1385
|
+
Defn: Ring morphism:
|
|
1386
|
+
From: Multivariate Polynomial Ring in u, v, w, s
|
|
1387
|
+
over Integer Ring localized at (s, w, v, u)
|
|
1388
|
+
To: Multivariate Polynomial Ring in a, z
|
|
1389
|
+
over Integer Ring localized at (z, a, a + z, a*z + 1)
|
|
1390
|
+
Defn: u |--> (a*z + 1)/a
|
|
1391
|
+
v |--> (a + z)/a
|
|
1392
|
+
w |--> 1/a
|
|
1393
|
+
s |--> a
|
|
1394
|
+
then
|
|
1395
|
+
Conversion map:
|
|
1396
|
+
From: Multivariate Polynomial Ring in a, z over Integer Ring
|
|
1397
|
+
localized at (z, a, a + z, a*z + 1)
|
|
1398
|
+
To: Multivariate Laurent Polynomial Ring in a, z
|
|
1399
|
+
over Integer Ring
|
|
1400
|
+
sage: sup = mt.support()
|
|
1401
|
+
sage: k1 = sum(f(mt.coefficient(b)) * b.regular_kauffman_polynomial() for b in sup)
|
|
1402
|
+
sage: a, z = f.codomain().gens()
|
|
1403
|
+
sage: k2 = KnotInfo.K5_1.kauffman_polynomial()
|
|
1404
|
+
sage: k1*a**(-5) == k2 # since the writhe of K5_1 is 5
|
|
1405
|
+
True
|
|
1406
|
+
"""
|
|
1407
|
+
if not self._is_markov_trace_version():
|
|
1408
|
+
raise ValueError('functionality only available for Markov trace version')
|
|
1409
|
+
from sage.knots.knotinfo import KnotInfo
|
|
1410
|
+
K = KnotInfo.L2a1_1.kauffman_polynomial().parent()
|
|
1411
|
+
a, z = K.gens()
|
|
1412
|
+
ku = z * a + 1
|
|
1413
|
+
kv = z + a
|
|
1414
|
+
KL = K.localization((ku, kv))
|
|
1415
|
+
u = KL(ku / a)
|
|
1416
|
+
v = KL(kv / a)
|
|
1417
|
+
phi = self.hom((u, v, KL(~a), KL(a)))
|
|
1418
|
+
inc = K.convert_map_from(KL)
|
|
1419
|
+
return inc * phi
|
|
1420
|
+
|
|
1421
|
+
def specialize_links_gould(self):
|
|
1422
|
+
r"""
|
|
1423
|
+
Return a map to the two variable Laurent polynomial ring that is
|
|
1424
|
+
the parent of the Links-Gould polynomial.
|
|
1425
|
+
|
|
1426
|
+
EXAMPLES::
|
|
1427
|
+
|
|
1428
|
+
sage: from sage.knots.knotinfo import KnotInfo
|
|
1429
|
+
sage: CHA2 = algebras.CubicHecke(2)
|
|
1430
|
+
sage: K5_1 = KnotInfo.K5_1.link()
|
|
1431
|
+
sage: br = CHA2(K5_1.braid())
|
|
1432
|
+
sage: mt = br.formal_markov_trace()
|
|
1433
|
+
sage: MT = mt.base_ring()
|
|
1434
|
+
sage: f = MT.specialize_links_gould(); f
|
|
1435
|
+
Composite map:
|
|
1436
|
+
From: Multivariate Polynomial Ring in u, v, w, s over Integer Ring
|
|
1437
|
+
localized at (s, w, v, u)
|
|
1438
|
+
To: Multivariate Laurent Polynomial Ring in t0, t1 over Integer Ring
|
|
1439
|
+
Defn: Ring morphism:
|
|
1440
|
+
From: Multivariate Polynomial Ring in u, v, w, s
|
|
1441
|
+
over Integer Ring localized at (s, w, v, u)
|
|
1442
|
+
To: Multivariate Polynomial Ring in t0, t1 over Integer Ring
|
|
1443
|
+
localized at (t1, t0, t0 + t1 - 1, t0*t1 - t0 - t1)
|
|
1444
|
+
Defn: u |--> t0 + t1 - 1
|
|
1445
|
+
v |--> t0*t1 - t0 - t1
|
|
1446
|
+
w |--> -t0*t1
|
|
1447
|
+
s |--> 1
|
|
1448
|
+
then
|
|
1449
|
+
Conversion map:
|
|
1450
|
+
From: Multivariate Polynomial Ring in t0, t1 over Integer Ring
|
|
1451
|
+
localized at (t1, t0, t0 + t1 - 1, t0*t1 - t0 - t1)
|
|
1452
|
+
To: Multivariate Laurent Polynomial Ring in t0, t1 over Integer Ring
|
|
1453
|
+
sage: sup = mt.support()
|
|
1454
|
+
sage: sum(f(mt.coefficient(b)) * b.links_gould_polynomial() for b in sup)
|
|
1455
|
+
-t0^4*t1 - t0^3*t1^2 - t0^2*t1^3 - t0*t1^4 + t0^4 + 2*t0^3*t1 + 2*t0^2*t1^2
|
|
1456
|
+
+ 2*t0*t1^3 + t1^4 - t0^3 - 2*t0^2*t1 - 2*t0*t1^2 - t1^3 + t0^2 + 2*t0*t1
|
|
1457
|
+
+ t1^2 - t0 - t1 + 1
|
|
1458
|
+
"""
|
|
1459
|
+
if not self._is_markov_trace_version():
|
|
1460
|
+
raise ValueError('functionality only available for Markov trace version')
|
|
1461
|
+
from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing
|
|
1462
|
+
L = LaurentPolynomialRing(ZZ, 't0, t1')
|
|
1463
|
+
t0, t1 = L.gens()
|
|
1464
|
+
lu = t0 + t1 - 1
|
|
1465
|
+
lv = t0 * t1 - t0 - t1
|
|
1466
|
+
lw = -t0 * t1
|
|
1467
|
+
LL = L.localization((lu, lv))
|
|
1468
|
+
u = LL(lu)
|
|
1469
|
+
v = LL(lv)
|
|
1470
|
+
w = LL(lw)
|
|
1471
|
+
phi = self.hom((u, v, w, LL.one()))
|
|
1472
|
+
inc = L.convert_map_from(LL)
|
|
1473
|
+
return inc * phi
|