passagemath-combinat 10.6.1__cp312-cp312-musllinux_1_2_aarch64.whl → 10.8.1a1__cp312-cp312-musllinux_1_2_aarch64.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.1.dist-info → passagemath_combinat-10.8.1a1.dist-info}/METADATA +17 -20
- {passagemath_combinat-10.6.1.dist-info → passagemath_combinat-10.8.1a1.dist-info}/RECORD +220 -218
- {passagemath_combinat-10.6.1.dist-info → passagemath_combinat-10.8.1a1.dist-info}/WHEEL +1 -1
- passagemath_combinat-10.8.1a1.dist-info/top_level.txt +3 -0
- sage/algebras/affine_nil_temperley_lieb.py +3 -3
- sage/algebras/all.py +0 -1
- sage/algebras/askey_wilson.py +1 -1
- sage/algebras/associated_graded.py +2 -2
- sage/algebras/cellular_basis.py +3 -6
- sage/algebras/cluster_algebra.py +2 -3
- sage/algebras/down_up_algebra.py +6 -6
- sage/algebras/free_algebra.py +3 -32
- sage/algebras/free_algebra_element.py +21 -25
- sage/algebras/free_algebra_quotient_element.py +9 -38
- sage/algebras/free_zinbiel_algebra.py +4 -3
- sage/algebras/hall_algebra.py +2 -2
- sage/algebras/hecke_algebras/ariki_koike_algebra.py +8 -8
- sage/algebras/hecke_algebras/ariki_koike_specht_modules.py +2 -2
- sage/algebras/hecke_algebras/cubic_hecke_algebra.py +11 -14
- sage/algebras/hecke_algebras/cubic_hecke_base_ring.py +1 -1
- sage/algebras/hecke_algebras/cubic_hecke_matrix_rep.py +5 -5
- sage/algebras/iwahori_hecke_algebra.py +59 -57
- sage/algebras/jordan_algebra.py +97 -89
- sage/algebras/lie_conformal_algebras/abelian_lie_conformal_algebra.py +6 -6
- sage/algebras/lie_conformal_algebras/affine_lie_conformal_algebra.py +14 -12
- sage/algebras/lie_conformal_algebras/bosonic_ghosts_lie_conformal_algebra.py +6 -6
- sage/algebras/lie_conformal_algebras/fermionic_ghosts_lie_conformal_algebra.py +4 -4
- sage/algebras/lie_conformal_algebras/finitely_freely_generated_lca.py +13 -13
- sage/algebras/lie_conformal_algebras/free_bosons_lie_conformal_algebra.py +8 -6
- sage/algebras/lie_conformal_algebras/free_fermions_lie_conformal_algebra.py +7 -5
- sage/algebras/lie_conformal_algebras/freely_generated_lie_conformal_algebra.py +7 -7
- sage/algebras/lie_conformal_algebras/graded_lie_conformal_algebra.py +6 -5
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra.py +12 -11
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py +3 -3
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_basis.py +3 -3
- sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +11 -11
- sage/algebras/lie_conformal_algebras/n2_lie_conformal_algebra.py +3 -3
- sage/algebras/lie_conformal_algebras/neveu_schwarz_lie_conformal_algebra.py +8 -7
- sage/algebras/lie_conformal_algebras/virasoro_lie_conformal_algebra.py +9 -8
- sage/algebras/lie_conformal_algebras/weyl_lie_conformal_algebra.py +6 -5
- sage/algebras/nil_coxeter_algebra.py +4 -4
- sage/algebras/q_commuting_polynomials.py +6 -6
- sage/algebras/q_system.py +3 -3
- sage/algebras/quantum_clifford.py +8 -8
- sage/algebras/quantum_groups/fock_space.py +48 -8
- sage/algebras/quantum_groups/quantum_group_gap.py +5 -7
- sage/algebras/quantum_matrix_coordinate_algebra.py +7 -7
- sage/algebras/quantum_oscillator.py +3 -3
- sage/algebras/quaternion_algebra_element.py +5 -3
- sage/algebras/schur_algebra.py +3 -3
- sage/algebras/shuffle_algebra.py +5 -8
- sage/algebras/splitting_algebra.py +129 -85
- sage/algebras/tensor_algebra.py +7 -7
- sage/algebras/yangian.py +16 -15
- sage/algebras/yokonuma_hecke_algebra.py +13 -11
- sage/combinat/all.py +9 -0
- sage/combinat/all__sagemath_combinat.py +1 -0
- sage/combinat/alternating_sign_matrix.py +36 -29
- sage/combinat/baxter_permutations.py +32 -12
- sage/combinat/bijectionist.py +13 -17
- sage/combinat/chas/fsym.py +6 -6
- sage/combinat/chas/wqsym.py +23 -29
- sage/combinat/colored_permutations.py +9 -11
- sage/combinat/colored_permutations_representations.py +13 -12
- sage/combinat/composition_tableau.py +2 -2
- sage/combinat/constellation.py +57 -30
- sage/combinat/crystals/affine_factorization.py +5 -4
- sage/combinat/crystals/alcove_path.py +2 -2
- sage/combinat/crystals/fully_commutative_stable_grothendieck.py +3 -2
- sage/combinat/crystals/infinity_crystals.py +18 -18
- sage/combinat/crystals/kac_modules.py +1 -1
- sage/combinat/crystals/kirillov_reshetikhin.py +2 -2
- sage/combinat/crystals/letters.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/crystals/littelmann_path.py +1 -1
- sage/combinat/crystals/pbw_datum.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/crystals/pbw_datum.pyx +3 -2
- sage/combinat/crystals/spins.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/crystals/tensor_product.py +7 -5
- sage/combinat/crystals/tensor_product_element.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/debruijn_sequence.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/debruijn_sequence.pyx +1 -2
- sage/combinat/degree_sequences.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/degree_sequences.pyx +241 -188
- sage/combinat/derangements.py +28 -22
- sage/combinat/diagram_algebras.py +12 -14
- sage/combinat/dyck_word.py +15 -14
- sage/combinat/e_one_star.py +1 -1
- sage/combinat/expnums.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/fast_vector_partitions.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/fqsym.py +13 -19
- sage/combinat/free_dendriform_algebra.py +2 -2
- sage/combinat/free_prelie_algebra.py +2 -2
- sage/combinat/fully_commutative_elements.py +8 -8
- sage/combinat/fully_packed_loop.py +9 -9
- sage/combinat/gelfand_tsetlin_patterns.py +4 -5
- sage/combinat/gray_codes.py +3 -4
- sage/combinat/grossman_larson_algebras.py +2 -2
- sage/combinat/growth.py +13 -13
- sage/combinat/hall_polynomial.py +1 -1
- sage/combinat/hillman_grassl.py +1 -1
- sage/combinat/integer_matrices.py +5 -7
- sage/combinat/k_tableau.py +8 -7
- sage/combinat/kazhdan_lusztig.py +3 -3
- sage/combinat/key_polynomial.py +845 -298
- sage/combinat/knutson_tao_puzzles.py +11 -13
- sage/combinat/matrices/hadamard_matrix.py +1 -1
- sage/combinat/matrices/latin.py +75 -92
- sage/combinat/misc.py +3 -3
- sage/combinat/multiset_partition_into_sets_ordered.py +27 -10
- sage/combinat/ncsf_qsym/generic_basis_code.py +5 -5
- sage/combinat/ncsf_qsym/ncsf.py +6 -5
- sage/combinat/ncsf_qsym/qsym.py +9 -17
- sage/combinat/ncsym/ncsym.py +8 -12
- sage/combinat/nu_dyck_word.py +1 -1
- sage/combinat/parallelogram_polyomino.py +3 -5
- sage/combinat/parking_functions.py +6 -5
- sage/combinat/partition_algebra.py +22 -57
- sage/combinat/partition_kleshchev.py +4 -4
- sage/combinat/partition_tuple.py +12 -10
- sage/combinat/plane_partition.py +10 -13
- sage/combinat/positive_integer_semigroup_test.py +17 -0
- sage/combinat/q_bernoulli.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/quickref.py +2 -2
- sage/combinat/recognizable_series.py +2 -2
- sage/combinat/regular_sequence.py +7 -7
- sage/combinat/regular_sequence_bounded.py +15 -21
- sage/combinat/restricted_growth.py +3 -3
- sage/combinat/ribbon.py +3 -3
- sage/combinat/rigged_configurations/bijection.py +3 -3
- sage/combinat/rigged_configurations/rigged_partition.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/rsk.py +2 -0
- sage/combinat/schubert_polynomial.py +11 -2
- sage/combinat/set_partition.py +3 -7
- sage/combinat/set_partition_iterator.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/set_partition_iterator.pyx +0 -1
- sage/combinat/set_partition_ordered.py +2 -2
- sage/combinat/sf/classical.py +1 -1
- sage/combinat/sf/dual.py +4 -8
- sage/combinat/sf/elementary.py +13 -7
- sage/combinat/sf/hall_littlewood.py +10 -8
- sage/combinat/sf/homogeneous.py +6 -3
- sage/combinat/sf/jack.py +11 -9
- sage/combinat/sf/llt.py +4 -5
- sage/combinat/sf/macdonald.py +10 -11
- sage/combinat/sf/monomial.py +6 -0
- sage/combinat/sf/ns_macdonald.py +92 -51
- sage/combinat/sf/powersum.py +9 -14
- sage/combinat/sf/schur.py +6 -0
- sage/combinat/sf/sf.py +21 -19
- sage/combinat/sf/sfa.py +13 -64
- sage/combinat/shifted_primed_tableau.py +5 -7
- sage/combinat/shuffle.py +1 -1
- sage/combinat/sine_gordon.py +18 -38
- sage/combinat/skew_partition.py +9 -12
- sage/combinat/skew_tableau.py +2 -7
- sage/combinat/sloane_functions.py +1 -1
- sage/combinat/species/all.py +67 -2
- sage/combinat/species/characteristic_species.py +3 -0
- sage/combinat/species/composition_species.py +3 -0
- sage/combinat/species/cycle_species.py +4 -0
- sage/combinat/species/empty_species.py +3 -0
- sage/combinat/species/functorial_composition_species.py +3 -0
- sage/combinat/species/generating_series.py +3 -0
- sage/combinat/species/library.py +3 -0
- sage/combinat/species/linear_order_species.py +3 -0
- sage/combinat/species/partition_species.py +3 -0
- sage/combinat/species/permutation_species.py +4 -0
- sage/combinat/species/product_species.py +3 -0
- sage/combinat/species/recursive_species.py +3 -0
- sage/combinat/species/set_species.py +3 -0
- sage/combinat/species/species.py +13 -7
- sage/combinat/species/structure.py +8 -9
- sage/combinat/species/subset_species.py +3 -0
- sage/combinat/species/sum_species.py +3 -0
- sage/combinat/subword.py +4 -1
- sage/combinat/subword_complex.py +7 -7
- sage/combinat/subword_complex_c.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/superpartition.py +1 -1
- sage/combinat/symmetric_group_algebra.py +9 -9
- sage/combinat/symmetric_group_representations.py +5 -5
- sage/combinat/t_sequences.py +4 -4
- sage/combinat/tableau.py +3 -4
- sage/combinat/tableau_tuple.py +2 -2
- sage/combinat/tiling.py +39 -42
- sage/combinat/triangles_FHM.py +38 -15
- sage/combinat/tutorial.py +2 -2
- sage/combinat/vector_partition.py +43 -31
- sage/combinat/words/abstract_word.py +4 -4
- sage/combinat/words/alphabet.py +12 -12
- sage/combinat/words/finite_word.py +25 -229
- sage/combinat/words/infinite_word.py +1 -1
- sage/combinat/words/morphic.py +13 -13
- sage/combinat/words/morphism.py +3 -12
- sage/combinat/words/paths.py +16 -17
- sage/combinat/words/word.py +60 -35
- sage/combinat/words/word_char.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/words/word_char.pyx +46 -7
- sage/combinat/words/word_datatypes.cpython-312-aarch64-linux-musl.so +0 -0
- sage/combinat/words/word_generators.py +39 -38
- sage/databases/findstat.py +72 -31
- sage/databases/oeis.py +125 -25
- sage/databases/sloane.py +14 -8
- sage/games/sudoku_backtrack.cpython-312-aarch64-linux-musl.so +0 -0
- sage/groups/indexed_free_group.py +3 -4
- sage/libs/symmetrica/symmetrica.cpython-312-aarch64-linux-musl.so +0 -0
- sage/libs/symmetrica/symmetrica.pxi +1 -0
- sage/monoids/automatic_semigroup.py +1 -3
- sage/monoids/free_abelian_monoid.py +7 -33
- sage/monoids/free_abelian_monoid_element.cpython-312-aarch64-linux-musl.so +0 -0
- sage/monoids/free_monoid.py +8 -40
- sage/monoids/free_monoid_element.py +1 -9
- sage/monoids/string_monoid.py +5 -2
- sage/monoids/string_monoid_element.py +12 -66
- sage/rings/all__sagemath_combinat.py +7 -0
- sage/sat/solvers/__init__.py +3 -4
- sage/sat/solvers/cryptominisat.py +2 -3
- sage/sat/solvers/picosat.py +2 -3
- sage/sat/solvers/sat_lp.py +2 -2
- sage/sat/solvers/satsolver.cpython-312-aarch64-linux-musl.so +0 -0
- passagemath_combinat-10.6.1.dist-info/top_level.txt +0 -2
sage/combinat/species/all.py
CHANGED
|
@@ -2,6 +2,67 @@
|
|
|
2
2
|
r"""
|
|
3
3
|
Combinatorial species
|
|
4
4
|
|
|
5
|
+
A combinatorial species, as introduced by Joyal, is a functor from
|
|
6
|
+
the category of finite sets with bijections to the category of finite
|
|
7
|
+
sets with bijections. Alternatively, we can regard a combinatorial
|
|
8
|
+
species as a formal sum of group actions of the symmetric groups
|
|
9
|
+
`\mathfrak S_n`, for `n\in\NN`. For example, the trivial action of
|
|
10
|
+
`\mathfrak S_n` corresponds to the species `\mathcal E_n` of sets of
|
|
11
|
+
cardinality `n`.
|
|
12
|
+
|
|
13
|
+
More generally, a weighted multisort species in `k` sorts is a
|
|
14
|
+
functor from the category of `k`-tuples of finite sets with
|
|
15
|
+
bijections to the category of weighted finite sets with
|
|
16
|
+
weight-preserving bijections. We may think of the sorts as
|
|
17
|
+
variables, traditionally denoted by `X, Y, Z`.
|
|
18
|
+
|
|
19
|
+
Such a species is equivalent to a formal sum of group actions of
|
|
20
|
+
groups `\mathfrak S_{n_1} \times \cdots \times \mathfrak S_{n_k}` with
|
|
21
|
+
`(n_1,\ldots,n_k)\in\NN^k`, together with a weight on the orbits of
|
|
22
|
+
each group action. Yet more generally, a virtual weighted multisort
|
|
23
|
+
species is a formal difference of weighted multisort species.
|
|
24
|
+
|
|
25
|
+
We regard a combinatorial species as a sequence of group actions of
|
|
26
|
+
the symmetric groups `\mathfrak S_n`, for `n\in\NN`.
|
|
27
|
+
|
|
28
|
+
Coefficients of lazy species are computed on demand. They have
|
|
29
|
+
infinite precision, although equality can only be decided in special
|
|
30
|
+
cases.
|
|
31
|
+
|
|
32
|
+
There are currently two implementations of combinatorial species, one
|
|
33
|
+
of which is deprecated and will be removed once all of the
|
|
34
|
+
functionality has been ported to the new framework.
|
|
35
|
+
|
|
36
|
+
The recommended implementation is :ref:`sage.rings.lazy_species` and
|
|
37
|
+
used as the following examples illustrate.
|
|
38
|
+
|
|
39
|
+
EXAMPLES:
|
|
40
|
+
|
|
41
|
+
We define rooted ordered trees with leaves having weight `q`::
|
|
42
|
+
|
|
43
|
+
sage: R.<q> = QQ[]
|
|
44
|
+
sage: L.<X> = LazyCombinatorialSpecies(R)
|
|
45
|
+
sage: leaf = X
|
|
46
|
+
sage: node = q * X
|
|
47
|
+
sage: linorder = X/(1 - X)
|
|
48
|
+
sage: T = L.undefined(valuation=1)
|
|
49
|
+
sage: T.define(leaf + node * linorder(T))
|
|
50
|
+
sage: T.isotype_generating_series()
|
|
51
|
+
X + q*X^2 + ((q^2+q)*X^3) + ((q^3+3*q^2+q)*X^4) + ((q^4+6*q^3+6*q^2+q)*X^5)
|
|
52
|
+
+ ((q^5+10*q^4+20*q^3+10*q^2+q)*X^6) + O(X^7)
|
|
53
|
+
|
|
54
|
+
We define rooted unordered trees with leaves of sort `Y`. The
|
|
55
|
+
standard representation of a species is its molecular decomposition::
|
|
56
|
+
|
|
57
|
+
sage: L = LazyCombinatorialSpecies(R, "X")
|
|
58
|
+
sage: E = L.Sets()
|
|
59
|
+
sage: Ep = E.restrict(1)
|
|
60
|
+
sage: M.<X, Y> = LazyCombinatorialSpecies(R)
|
|
61
|
+
sage: A = M.undefined(valuation=1)
|
|
62
|
+
sage: A.define(Y + X * Ep(A))
|
|
63
|
+
sage: A.truncate(5)
|
|
64
|
+
Y + X*Y + (X^2*Y+X*E_2(Y)) + (X^3*Y+X^2*E_2(Y)+X^2*Y^2+X*E_3(Y))
|
|
65
|
+
|
|
5
66
|
Introductory material
|
|
6
67
|
---------------------
|
|
7
68
|
|
|
@@ -36,13 +97,17 @@ Miscellaneous
|
|
|
36
97
|
|
|
37
98
|
- :ref:`sage.combinat.species.structure`
|
|
38
99
|
- :ref:`sage.combinat.species.misc`
|
|
100
|
+
|
|
39
101
|
"""
|
|
40
102
|
# install the docstring of this module to the containing package
|
|
41
103
|
from sage.misc.namespace_package import install_doc
|
|
42
104
|
install_doc(__package__, __doc__)
|
|
43
105
|
|
|
44
106
|
from sage.misc.lazy_import import lazy_import
|
|
45
|
-
lazy_import("sage.combinat.species.recursive_species", "CombinatorialSpecies"
|
|
46
|
-
|
|
107
|
+
lazy_import("sage.combinat.species.recursive_species", "CombinatorialSpecies",
|
|
108
|
+
deprecation=(38544, "combinat.species is superseded by LazyCombinatorialSpecies"))
|
|
109
|
+
|
|
110
|
+
lazy_import("sage.combinat.species", "library", as_='species',
|
|
111
|
+
deprecation=(38544, "combinat.species is superseded by LazyCombinatorialSpecies"))
|
|
47
112
|
del lazy_import
|
|
48
113
|
del install_doc
|
|
@@ -30,6 +30,9 @@ class CharacteristicSpeciesStructure(GenericSpeciesStructure):
|
|
|
30
30
|
EXAMPLES::
|
|
31
31
|
|
|
32
32
|
sage: F = species.CharacteristicSpecies(3)
|
|
33
|
+
doctest:warning...
|
|
34
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
35
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
33
36
|
sage: a = F.structures([1, 2, 3]).random_element(); a
|
|
34
37
|
{1, 2, 3}
|
|
35
38
|
sage: F = species.SingletonSpecies()
|
|
@@ -28,6 +28,9 @@ class CompositionSpeciesStructure(GenericSpeciesStructure):
|
|
|
28
28
|
TESTS::
|
|
29
29
|
|
|
30
30
|
sage: E = species.SetSpecies(); C = species.CycleSpecies()
|
|
31
|
+
doctest:warning...
|
|
32
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
33
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
31
34
|
sage: L = E(C)
|
|
32
35
|
sage: a = L.structures(['a','b','c']).random_element() # needs sage.libs.flint
|
|
33
36
|
sage: a == loads(dumps(a)) # needs sage.libs.flint
|
|
@@ -26,6 +26,10 @@ class CycleSpeciesStructure(GenericSpeciesStructure):
|
|
|
26
26
|
EXAMPLES::
|
|
27
27
|
|
|
28
28
|
sage: S = species.CycleSpecies()
|
|
29
|
+
doctest:warning...
|
|
30
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
31
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
32
|
+
|
|
29
33
|
sage: S.structures(["a","b","c"])[0]
|
|
30
34
|
('a', 'b', 'c')
|
|
31
35
|
"""
|
|
@@ -28,6 +28,9 @@ class EmptySpecies(GenericCombinatorialSpecies, UniqueRepresentation):
|
|
|
28
28
|
EXAMPLES::
|
|
29
29
|
|
|
30
30
|
sage: X = species.EmptySpecies(); X
|
|
31
|
+
doctest:warning...
|
|
32
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
33
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
31
34
|
Empty species
|
|
32
35
|
sage: X.structures([]).list()
|
|
33
36
|
[]
|
|
@@ -32,6 +32,9 @@ class FunctorialCompositionSpecies(GenericCombinatorialSpecies):
|
|
|
32
32
|
EXAMPLES::
|
|
33
33
|
|
|
34
34
|
sage: E = species.SetSpecies()
|
|
35
|
+
doctest:warning...
|
|
36
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
37
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
35
38
|
sage: E2 = species.SetSpecies(size=2)
|
|
36
39
|
sage: WP = species.SubsetSpecies()
|
|
37
40
|
sage: P2 = E2*E
|
|
@@ -217,6 +217,9 @@ class ExponentialGeneratingSeries(LazyPowerSeries):
|
|
|
217
217
|
EXAMPLES::
|
|
218
218
|
|
|
219
219
|
sage: G = species.SimpleGraphSpecies()
|
|
220
|
+
doctest:warning...
|
|
221
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
222
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
220
223
|
sage: g = G.generating_series()
|
|
221
224
|
sage: [g.coefficient(i) for i in range(10)]
|
|
222
225
|
[1, 1, 1, 4/3, 8/3, 128/15, 2048/45, 131072/315, 2097152/315, 536870912/2835]
|
sage/combinat/species/library.py
CHANGED
|
@@ -42,6 +42,9 @@ def SimpleGraphSpecies():
|
|
|
42
42
|
EXAMPLES::
|
|
43
43
|
|
|
44
44
|
sage: S = species.SimpleGraphSpecies()
|
|
45
|
+
doctest:warning...
|
|
46
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
47
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
45
48
|
sage: S.generating_series().counts(10)
|
|
46
49
|
[1, 1, 2, 8, 64, 1024, 32768, 2097152, 268435456, 68719476736]
|
|
47
50
|
sage: S.cycle_index_series()[:5] # needs sage.libs.pari sage.modules
|
|
@@ -28,6 +28,9 @@ class LinearOrderSpeciesStructure(GenericSpeciesStructure):
|
|
|
28
28
|
EXAMPLES::
|
|
29
29
|
|
|
30
30
|
sage: P = species.LinearOrderSpecies()
|
|
31
|
+
doctest:warning...
|
|
32
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
33
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
31
34
|
sage: s = P.structures(["a", "b", "c"]).random_element()
|
|
32
35
|
sage: s.canonical_label()
|
|
33
36
|
['a', 'b', 'c']
|
|
@@ -34,6 +34,9 @@ class PartitionSpeciesStructure(GenericSpeciesStructure):
|
|
|
34
34
|
|
|
35
35
|
sage: from sage.combinat.species.partition_species import PartitionSpeciesStructure
|
|
36
36
|
sage: P = species.PartitionSpecies()
|
|
37
|
+
doctest:warning...
|
|
38
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
39
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
37
40
|
sage: s = PartitionSpeciesStructure(P, ['a','b','c'], [[1,2],[3]]); s
|
|
38
41
|
{{'a', 'b'}, {'c'}}
|
|
39
42
|
sage: s == loads(dumps(s))
|
|
@@ -31,6 +31,10 @@ class PermutationSpeciesStructure(GenericSpeciesStructure):
|
|
|
31
31
|
EXAMPLES::
|
|
32
32
|
|
|
33
33
|
sage: P = species.PermutationSpecies()
|
|
34
|
+
doctest:warning...
|
|
35
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
36
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
37
|
+
|
|
34
38
|
sage: S = P.structures(["a", "b", "c"])
|
|
35
39
|
sage: [s.canonical_label() for s in S]
|
|
36
40
|
[['a', 'b', 'c'],
|
|
@@ -28,6 +28,9 @@ class ProductSpeciesStructure(GenericSpeciesStructure):
|
|
|
28
28
|
TESTS::
|
|
29
29
|
|
|
30
30
|
sage: S = species.SetSpecies()
|
|
31
|
+
doctest:warning...
|
|
32
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
33
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
31
34
|
sage: F = S * S
|
|
32
35
|
sage: a = F.structures(['a','b','c']).random_element()
|
|
33
36
|
sage: a == loads(dumps(a))
|
|
@@ -31,6 +31,9 @@ class CombinatorialSpecies(GenericCombinatorialSpecies):
|
|
|
31
31
|
EXAMPLES::
|
|
32
32
|
|
|
33
33
|
sage: F = CombinatorialSpecies()
|
|
34
|
+
doctest:warning...
|
|
35
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
36
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
34
37
|
sage: loads(dumps(F))
|
|
35
38
|
Combinatorial species
|
|
36
39
|
|
|
@@ -30,6 +30,9 @@ class SetSpeciesStructure(GenericSpeciesStructure):
|
|
|
30
30
|
EXAMPLES::
|
|
31
31
|
|
|
32
32
|
sage: S = species.SetSpecies()
|
|
33
|
+
doctest:warning...
|
|
34
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
35
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
33
36
|
sage: a = S.structures(["a","b","c"]).random_element(); a
|
|
34
37
|
{'a', 'b', 'c'}
|
|
35
38
|
"""
|
sage/combinat/species/species.py
CHANGED
|
@@ -21,6 +21,9 @@ leaves and of `q` to internal nodes::
|
|
|
21
21
|
|
|
22
22
|
sage: q = QQ['q'].gen()
|
|
23
23
|
sage: leaf = species.SingletonSpecies()
|
|
24
|
+
doctest:warning...
|
|
25
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
26
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
24
27
|
sage: internal_node = species.SingletonSpecies(weight=q)
|
|
25
28
|
sage: L = species.LinearOrderSpecies(min=1)
|
|
26
29
|
sage: T = species.CombinatorialSpecies(min=1)
|
|
@@ -140,6 +143,9 @@ class GenericCombinatorialSpecies(SageObject):
|
|
|
140
143
|
sage: X = species.SingletonSpecies()
|
|
141
144
|
sage: E = species.EmptySetSpecies()
|
|
142
145
|
sage: L = CombinatorialSpecies()
|
|
146
|
+
doctest:warning...
|
|
147
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
148
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
143
149
|
sage: L.define(E+X*L)
|
|
144
150
|
sage: K = CombinatorialSpecies()
|
|
145
151
|
sage: K.define(E+X*L)
|
|
@@ -177,7 +183,7 @@ class GenericCombinatorialSpecies(SageObject):
|
|
|
177
183
|
"""
|
|
178
184
|
return not (self == other)
|
|
179
185
|
|
|
180
|
-
def
|
|
186
|
+
def _getstate_(self):
|
|
181
187
|
r"""
|
|
182
188
|
This is used during the pickling process and returns a dictionary
|
|
183
189
|
of the data needed to create this object during the unpickling
|
|
@@ -189,7 +195,7 @@ class GenericCombinatorialSpecies(SageObject):
|
|
|
189
195
|
EXAMPLES::
|
|
190
196
|
|
|
191
197
|
sage: C = species.CharacteristicSpecies(5)
|
|
192
|
-
sage: args, kwds = C.
|
|
198
|
+
sage: args, kwds = C._getstate_()
|
|
193
199
|
sage: args
|
|
194
200
|
{0: 5}
|
|
195
201
|
sage: sorted(kwds.items())
|
|
@@ -201,10 +207,10 @@ class GenericCombinatorialSpecies(SageObject):
|
|
|
201
207
|
except AttributeError:
|
|
202
208
|
return ({}, kwds)
|
|
203
209
|
|
|
204
|
-
def
|
|
210
|
+
def _setstate_(self, state):
|
|
205
211
|
"""
|
|
206
212
|
This is used during unpickling to recreate this object from the
|
|
207
|
-
data provided by the ``
|
|
213
|
+
data provided by the ``_getstate_`` method.
|
|
208
214
|
|
|
209
215
|
TESTS::
|
|
210
216
|
|
|
@@ -212,7 +218,7 @@ class GenericCombinatorialSpecies(SageObject):
|
|
|
212
218
|
sage: C4 = species.CharacteristicSpecies(4)
|
|
213
219
|
sage: C2
|
|
214
220
|
Characteristic species of order 2
|
|
215
|
-
sage: C2.
|
|
221
|
+
sage: C2._setstate_(C4._getstate_()); C2
|
|
216
222
|
Characteristic species of order 4
|
|
217
223
|
"""
|
|
218
224
|
args_dict, kwds = state
|
|
@@ -230,7 +236,7 @@ class GenericCombinatorialSpecies(SageObject):
|
|
|
230
236
|
sage: C.weighted(t)
|
|
231
237
|
Cyclic permutation species with weight=t
|
|
232
238
|
"""
|
|
233
|
-
args_dict, kwds = self.
|
|
239
|
+
args_dict, kwds = self._getstate_()
|
|
234
240
|
kwds.update({'weight': weight})
|
|
235
241
|
return self.__class__(*[args_dict[i] for i in range(len(args_dict))], **kwds)
|
|
236
242
|
|
|
@@ -796,7 +802,7 @@ class GenericCombinatorialSpecies(SageObject):
|
|
|
796
802
|
Qz = QQ['z'].fraction_field()
|
|
797
803
|
|
|
798
804
|
# Generate the variable names and the corresponding polynomial rings
|
|
799
|
-
var_names = ["node%s" % i for i in range(d.
|
|
805
|
+
var_names = ["node%s" % i for i in range(d.n_vertices())]
|
|
800
806
|
R = Qz[", ".join(var_names)]
|
|
801
807
|
R_gens_dict = R.gens_dict()
|
|
802
808
|
|
|
@@ -14,6 +14,9 @@ BB = o + o\*BB + o\*|\*BB
|
|
|
14
14
|
Here we define this species using the default structures::
|
|
15
15
|
|
|
16
16
|
sage: ball = species.SingletonSpecies()
|
|
17
|
+
doctest:warning...
|
|
18
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
19
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
17
20
|
sage: bar = species.EmptySetSpecies()
|
|
18
21
|
sage: BB = CombinatorialSpecies()
|
|
19
22
|
sage: BB.define(ball + ball*BB + ball*bar*BB)
|
|
@@ -180,11 +183,10 @@ class GenericSpeciesStructure(CombinatorialObject):
|
|
|
180
183
|
[1, 2, 3]
|
|
181
184
|
"""
|
|
182
185
|
if isinstance(i, (int, Integer)):
|
|
183
|
-
return self._labels[i-1]
|
|
184
|
-
|
|
185
|
-
return i
|
|
186
|
+
return self._labels[i - 1]
|
|
187
|
+
return i
|
|
186
188
|
|
|
187
|
-
def is_isomorphic(self, x):
|
|
189
|
+
def is_isomorphic(self, x) -> bool:
|
|
188
190
|
"""
|
|
189
191
|
EXAMPLES::
|
|
190
192
|
|
|
@@ -201,11 +203,8 @@ class GenericSpeciesStructure(CombinatorialObject):
|
|
|
201
203
|
if self.parent() != x.parent():
|
|
202
204
|
return False
|
|
203
205
|
|
|
204
|
-
#We don't care about the labels for isomorphism testing
|
|
205
|
-
|
|
206
|
-
return True
|
|
207
|
-
else:
|
|
208
|
-
return False
|
|
206
|
+
# We don't care about the labels for isomorphism testing
|
|
207
|
+
return self.canonical_label()._list == x.canonical_label()._list
|
|
209
208
|
|
|
210
209
|
|
|
211
210
|
#For backward compatibility. This should be removed in the near
|
|
@@ -33,6 +33,9 @@ class SubsetSpeciesStructure(GenericSpeciesStructure):
|
|
|
33
33
|
|
|
34
34
|
sage: set_random_seed(0)
|
|
35
35
|
sage: S = species.SubsetSpecies()
|
|
36
|
+
doctest:warning...
|
|
37
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
38
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
36
39
|
sage: a = S.structures(["a","b","c"])[0]; a
|
|
37
40
|
{}
|
|
38
41
|
"""
|
|
@@ -33,6 +33,9 @@ class SumSpecies(GenericCombinatorialSpecies, UniqueRepresentation):
|
|
|
33
33
|
EXAMPLES::
|
|
34
34
|
|
|
35
35
|
sage: S = species.PermutationSpecies()
|
|
36
|
+
doctest:warning...
|
|
37
|
+
DeprecationWarning: combinat.species is superseded by LazyCombinatorialSpecies
|
|
38
|
+
See https://github.com/sagemath/sage/issues/38544 for details.
|
|
36
39
|
sage: A = S+S
|
|
37
40
|
sage: A.generating_series()[:5]
|
|
38
41
|
[2, 2, 2, 2, 2]
|
sage/combinat/subword.py
CHANGED
|
@@ -56,7 +56,6 @@ AUTHORS:
|
|
|
56
56
|
# https://www.gnu.org/licenses/
|
|
57
57
|
# ****************************************************************************
|
|
58
58
|
from __future__ import annotations
|
|
59
|
-
from collections.abc import Iterator
|
|
60
59
|
import itertools
|
|
61
60
|
|
|
62
61
|
from sage.structure.parent import Parent
|
|
@@ -66,6 +65,10 @@ from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
|
|
|
66
65
|
import sage.misc.prandom as prandom
|
|
67
66
|
from sage.rings.integer import Integer
|
|
68
67
|
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
|
|
68
|
+
from typing import TYPE_CHECKING
|
|
69
|
+
|
|
70
|
+
if TYPE_CHECKING:
|
|
71
|
+
from collections.abc import Iterator
|
|
69
72
|
|
|
70
73
|
|
|
71
74
|
def _stringification(data):
|
sage/combinat/subword_complex.py
CHANGED
|
@@ -350,7 +350,7 @@ class SubwordComplexFacet(Simplex, Element):
|
|
|
350
350
|
Phi = self.parent().group().roots()
|
|
351
351
|
return [Phi[i] for i in self._root_configuration_indices()]
|
|
352
352
|
|
|
353
|
-
def kappa_preimage(self):
|
|
353
|
+
def kappa_preimage(self) -> list:
|
|
354
354
|
r"""
|
|
355
355
|
Return the fiber of ``self`` under the `\kappa` map.
|
|
356
356
|
|
|
@@ -404,7 +404,7 @@ class SubwordComplexFacet(Simplex, Element):
|
|
|
404
404
|
if all(w.action_on_root_indices(i, side='left') < N
|
|
405
405
|
for i in root_conf)]
|
|
406
406
|
|
|
407
|
-
def is_vertex(self):
|
|
407
|
+
def is_vertex(self) -> bool:
|
|
408
408
|
r"""
|
|
409
409
|
Return ``True`` if ``self`` is a vertex of the brick polytope
|
|
410
410
|
of ``self.parent``.
|
|
@@ -1446,7 +1446,7 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
|
|
|
1446
1446
|
|
|
1447
1447
|
# topological properties
|
|
1448
1448
|
|
|
1449
|
-
def is_sphere(self):
|
|
1449
|
+
def is_sphere(self) -> bool:
|
|
1450
1450
|
r"""
|
|
1451
1451
|
Return ``True`` if the subword complex ``self`` is a sphere.
|
|
1452
1452
|
|
|
@@ -1473,7 +1473,7 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
|
|
|
1473
1473
|
w = W.demazure_product(self._Q)
|
|
1474
1474
|
return w == self._pi
|
|
1475
1475
|
|
|
1476
|
-
def is_ball(self):
|
|
1476
|
+
def is_ball(self) -> bool:
|
|
1477
1477
|
r"""
|
|
1478
1478
|
Return ``True`` if the subword complex ``self`` is a ball.
|
|
1479
1479
|
|
|
@@ -1500,7 +1500,7 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
|
|
|
1500
1500
|
"""
|
|
1501
1501
|
return not self.is_sphere()
|
|
1502
1502
|
|
|
1503
|
-
def is_pure(self):
|
|
1503
|
+
def is_pure(self) -> bool:
|
|
1504
1504
|
r"""
|
|
1505
1505
|
Return ``True`` since all subword complexes are pure.
|
|
1506
1506
|
|
|
@@ -1542,7 +1542,7 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
|
|
|
1542
1542
|
# root and weight
|
|
1543
1543
|
|
|
1544
1544
|
@cached_method
|
|
1545
|
-
def is_root_independent(self):
|
|
1545
|
+
def is_root_independent(self) -> bool:
|
|
1546
1546
|
r"""
|
|
1547
1547
|
Return ``True`` if ``self`` is root-independent.
|
|
1548
1548
|
|
|
@@ -1570,7 +1570,7 @@ class SubwordComplex(UniqueRepresentation, SimplicialComplex):
|
|
|
1570
1570
|
return M.rank() == max(M.ncols(), M.nrows())
|
|
1571
1571
|
|
|
1572
1572
|
@cached_method
|
|
1573
|
-
def is_double_root_free(self):
|
|
1573
|
+
def is_double_root_free(self) -> bool:
|
|
1574
1574
|
r"""
|
|
1575
1575
|
Return ``True`` if ``self`` is double-root-free.
|
|
1576
1576
|
|
|
Binary file
|
sage/combinat/superpartition.py
CHANGED
|
@@ -558,7 +558,7 @@ class SuperPartition(ClonableArray,
|
|
|
558
558
|
"""
|
|
559
559
|
sd = self.to_circled_diagram()
|
|
560
560
|
return SuperPartition.from_circled_diagram(sd[0].conjugate(),
|
|
561
|
-
[(j, i) for
|
|
561
|
+
[(j, i) for i, j in sd[1]])
|
|
562
562
|
|
|
563
563
|
def zee(self) -> Integer:
|
|
564
564
|
r"""
|
|
@@ -120,7 +120,7 @@ def SymmetricGroupAlgebra(R, W, category=None):
|
|
|
120
120
|
Weyl Group of type ['A', 3] (as a matrix group acting
|
|
121
121
|
on the ambient space)
|
|
122
122
|
sage: SGA.an_element()
|
|
123
|
-
s1*s2*s3 +
|
|
123
|
+
s1*s2*s3 + ... + 1
|
|
124
124
|
|
|
125
125
|
The preferred way to construct the symmetric group algebra is to
|
|
126
126
|
go through the usual ``algebra`` method::
|
|
@@ -1314,6 +1314,7 @@ class SymmetricGroupAlgebra_n(GroupAlgebra_class):
|
|
|
1314
1314
|
modules (which are the :meth:`Specht modules <specht_module>`
|
|
1315
1315
|
and also projective modules)::
|
|
1316
1316
|
|
|
1317
|
+
sage: # long time
|
|
1317
1318
|
sage: SGA = SymmetricGroupAlgebra(QQ, 5)
|
|
1318
1319
|
sage: for la in Partitions(SGA.n):
|
|
1319
1320
|
....: idem = SGA.ladder_idempotent(la)
|
|
@@ -2176,7 +2177,6 @@ class SymmetricGroupAlgebra_n(GroupAlgebra_class):
|
|
|
2176
2177
|
...
|
|
2177
2178
|
NotImplementedError: not implemented when p|n!; dimension of invariant forms may be greater than one
|
|
2178
2179
|
"""
|
|
2179
|
-
from sage.matrix.special import diagonal_matrix
|
|
2180
2180
|
F = self.base_ring()
|
|
2181
2181
|
G = self.group()
|
|
2182
2182
|
|
|
@@ -2209,9 +2209,9 @@ class SymmetricGroupAlgebra_n(GroupAlgebra_class):
|
|
|
2209
2209
|
return F.zero()
|
|
2210
2210
|
z = F.multiplicative_generator()
|
|
2211
2211
|
k = u.log(z)
|
|
2212
|
-
if k % (q+1) != 0:
|
|
2212
|
+
if k % (q + 1) != 0:
|
|
2213
2213
|
raise ValueError(f"unable to factor as {u} is not in base field GF({q})")
|
|
2214
|
-
return z ** ((k//(q+1)) % (q-1))
|
|
2214
|
+
return z ** ((k // (q + 1)) % (q - 1))
|
|
2215
2215
|
|
|
2216
2216
|
dft_matrix = self.dft()
|
|
2217
2217
|
n = dft_matrix.nrows()
|
|
@@ -2536,7 +2536,7 @@ class SymmetricGroupAlgebra_n(GroupAlgebra_class):
|
|
|
2536
2536
|
T = []
|
|
2537
2537
|
total = 1 # make it 1-based
|
|
2538
2538
|
for r in la:
|
|
2539
|
-
T.append(list(range(total, total+r)))
|
|
2539
|
+
T.append(list(range(total, total + r)))
|
|
2540
2540
|
total += r
|
|
2541
2541
|
T = Tableau(T)
|
|
2542
2542
|
G = self.group()
|
|
@@ -2634,7 +2634,7 @@ class SymmetricGroupAlgebra_n(GroupAlgebra_class):
|
|
|
2634
2634
|
self._cellular_KL = KazhdanLusztigPolynomial(self._KLG, q)
|
|
2635
2635
|
polyfunc = self._cellular_KL.P
|
|
2636
2636
|
else:
|
|
2637
|
-
self._cellular_KL = Coxeter3Group(['A', self.n+1])
|
|
2637
|
+
self._cellular_KL = Coxeter3Group(['A', self.n + 1])
|
|
2638
2638
|
self._KLG = self._cellular_KL
|
|
2639
2639
|
polyfunc = self._cellular_KL.kazhdan_lusztig_polynomial
|
|
2640
2640
|
|
|
@@ -3565,9 +3565,9 @@ class HeckeAlgebraSymmetricGroup_generic(CombinatorialFreeModule):
|
|
|
3565
3565
|
if x in Permutations():
|
|
3566
3566
|
if len(x) < self.n:
|
|
3567
3567
|
return self.monomial(self._indices(
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
if all(x[i] == i+1 for i in range(self.n, len(x))):
|
|
3568
|
+
list(x) + list(range(len(x) + 1, self.n + 1))
|
|
3569
|
+
))
|
|
3570
|
+
if all(x[i] == i + 1 for i in range(self.n, len(x))):
|
|
3571
3571
|
return self.monomial(self._indices(x[:self.n]))
|
|
3572
3572
|
|
|
3573
3573
|
return self._indices(x)
|
|
@@ -683,10 +683,10 @@ class YoungRepresentation_generic(SymmetricGroupRepresentation_generic_class):
|
|
|
683
683
|
digraph = copy(Y._digraph)
|
|
684
684
|
digraph.delete_edges((u, v) for (u, v, (j, beta)) in digraph.edges(sort=True)
|
|
685
685
|
if j != i)
|
|
686
|
-
M = matrix(self._ring, digraph.
|
|
686
|
+
M = matrix(self._ring, digraph.n_vertices())
|
|
687
687
|
for g in digraph.connected_components_subgraphs():
|
|
688
|
-
if g.
|
|
689
|
-
|
|
688
|
+
if g.n_vertices() == 1:
|
|
689
|
+
v, = g.vertices(sort=True)
|
|
690
690
|
w = self._word_dict[v]
|
|
691
691
|
trivial = None
|
|
692
692
|
for j, a in enumerate(w):
|
|
@@ -699,7 +699,7 @@ class YoungRepresentation_generic(SymmetricGroupRepresentation_generic_class):
|
|
|
699
699
|
j = index_lookup[v]
|
|
700
700
|
M[j, j] = 1 if trivial is True else -1
|
|
701
701
|
else:
|
|
702
|
-
|
|
702
|
+
(u, v, (j, beta)), = g.edges(sort=True)
|
|
703
703
|
iu = index_lookup[u]
|
|
704
704
|
iv = index_lookup[v]
|
|
705
705
|
M[iu, iu], M[iu, iv], M[iv, iu], M[iv, iv] = \
|
|
@@ -732,7 +732,7 @@ class YoungRepresentation_generic(SymmetricGroupRepresentation_generic_class):
|
|
|
732
732
|
[-1/2 3/2]
|
|
733
733
|
[ 1/2 1/2]
|
|
734
734
|
"""
|
|
735
|
-
m = self._yang_baxter_graph._digraph.
|
|
735
|
+
m = self._yang_baxter_graph._digraph.n_vertices()
|
|
736
736
|
M = matrix(self._ring, m, m, 1)
|
|
737
737
|
for i in Permutation(permutation).reduced_word():
|
|
738
738
|
M *= self.representation_matrix_for_simple_transposition(i)
|
sage/combinat/t_sequences.py
CHANGED
|
@@ -357,15 +357,15 @@ def T_sequences_construction_from_base_sequences(base_sequences, check=True):
|
|
|
357
357
|
|
|
358
358
|
A, B, C, D = base_sequences
|
|
359
359
|
n = len(C)
|
|
360
|
-
p = len(A)-n
|
|
360
|
+
p = len(A) - n
|
|
361
361
|
|
|
362
|
-
assert len(A) == len(B) == len(C)+p == len(D)+p
|
|
362
|
+
assert len(A) == len(B) == len(C) + p == len(D) + p
|
|
363
363
|
|
|
364
364
|
def seq_sum(seq1, seq2):
|
|
365
|
-
return [(a+b)//2 for
|
|
365
|
+
return [(a + b) // 2 for a, b in zip(seq1, seq2)]
|
|
366
366
|
|
|
367
367
|
def seq_subtract(seq1, seq2):
|
|
368
|
-
return [(a-b)//2 for
|
|
368
|
+
return [(a - b) // 2 for a, b in zip(seq1, seq2)]
|
|
369
369
|
|
|
370
370
|
def zero_seq(n):
|
|
371
371
|
return [0 for _ in range(n)]
|
sage/combinat/tableau.py
CHANGED
|
@@ -7041,6 +7041,8 @@ class SemistandardTableaux_shape_weight(SemistandardTableaux_shape):
|
|
|
7041
7041
|
"""
|
|
7042
7042
|
return symmetrica.kostka_tab(self.shape, self.weight)
|
|
7043
7043
|
|
|
7044
|
+
random_element = FiniteEnumeratedSets.ParentMethods._random_element_from_unrank
|
|
7045
|
+
|
|
7044
7046
|
|
|
7045
7047
|
class SemistandardTableaux_size_weight(SemistandardTableaux):
|
|
7046
7048
|
r"""
|
|
@@ -9345,10 +9347,7 @@ class IncreasingTableaux_shape_weight(IncreasingTableaux_shape):
|
|
|
9345
9347
|
for i in row:
|
|
9346
9348
|
content_list[i-1] = 1
|
|
9347
9349
|
|
|
9348
|
-
|
|
9349
|
-
return False
|
|
9350
|
-
|
|
9351
|
-
return True
|
|
9350
|
+
return tuple(content_list) == self.weight
|
|
9352
9351
|
|
|
9353
9352
|
def __iter__(self):
|
|
9354
9353
|
"""
|
sage/combinat/tableau_tuple.py
CHANGED
|
@@ -208,7 +208,7 @@ subsequent papers on the representation theory of these algebras.
|
|
|
208
208
|
# it under the terms of the GNU General Public License as published by
|
|
209
209
|
# the Free Software Foundation, either version 2 of the License, or
|
|
210
210
|
# (at your option) any later version.
|
|
211
|
-
#
|
|
211
|
+
# https://www.gnu.org/licenses/
|
|
212
212
|
# ****************************************************************************
|
|
213
213
|
|
|
214
214
|
from sage.arith.misc import factorial
|
|
@@ -5078,7 +5078,7 @@ class StandardTableaux_residue(StandardTableauTuples):
|
|
|
5078
5078
|
sage: T = StandardTableauTuple([[[6],[7]],[[1,2,3],[4,5]]]).residue_sequence(2,(0,0)).standard_tableaux()
|
|
5079
5079
|
sage: TestSuite(T).run()
|
|
5080
5080
|
"""
|
|
5081
|
-
super().__init__(
|
|
5081
|
+
super().__init__(category=FiniteEnumeratedSets())
|
|
5082
5082
|
self._level = residue.level()
|
|
5083
5083
|
self._multicharge = residue.multicharge()
|
|
5084
5084
|
self._quantum_characteristic = residue.quantum_characteristic()
|