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/sf/powersum.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Power sum symmetric functions
|
|
5
5
|
"""
|
|
6
|
-
|
|
6
|
+
# ***************************************************************************
|
|
7
7
|
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>
|
|
8
8
|
# 2012 Mike Zabrocki <mike.zabrocki@gmail.com>
|
|
9
9
|
# 2012 Anne Schilling <anne at math.ucdavis.edu>
|
|
@@ -17,12 +17,11 @@ Power sum symmetric functions
|
|
|
17
17
|
#
|
|
18
18
|
# The full text of the GPL is available at:
|
|
19
19
|
#
|
|
20
|
-
#
|
|
21
|
-
|
|
20
|
+
# https://www.gnu.org/licenses/
|
|
21
|
+
# ***************************************************************************
|
|
22
22
|
from sage.arith.misc import divisors
|
|
23
23
|
from sage.combinat.partition import Partition
|
|
24
24
|
from sage.misc.misc_c import prod
|
|
25
|
-
from sage.misc.superseded import deprecated_function_alias
|
|
26
25
|
from sage.rings.infinity import infinity
|
|
27
26
|
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
28
27
|
|
|
@@ -497,10 +496,6 @@ class SymmetricFunctionAlgebra_power(multiplicative.SymmetricFunctionAlgebra_mul
|
|
|
497
496
|
for lam, coeff in self.monomial_coefficients().items()}
|
|
498
497
|
return self.parent()._from_dict(dct)
|
|
499
498
|
|
|
500
|
-
frobenius = deprecated_function_alias(36396, adams_operator)
|
|
501
|
-
|
|
502
|
-
adams_operation = deprecated_function_alias(36396, adams_operator)
|
|
503
|
-
|
|
504
499
|
def verschiebung(self, n):
|
|
505
500
|
r"""
|
|
506
501
|
Return the image of the symmetric function ``self`` under the
|
|
@@ -798,6 +793,9 @@ class SymmetricFunctionAlgebra_power(multiplicative.SymmetricFunctionAlgebra_mul
|
|
|
798
793
|
sage: p.zero().principal_specialization(3)
|
|
799
794
|
0
|
|
800
795
|
"""
|
|
796
|
+
if n == 1:
|
|
797
|
+
return self.base_ring().sum(self.coefficients(sort=False))
|
|
798
|
+
|
|
801
799
|
def get_variable(ring, name):
|
|
802
800
|
try:
|
|
803
801
|
ring(name)
|
|
@@ -927,12 +925,9 @@ class SymmetricFunctionAlgebra_power(multiplicative.SymmetricFunctionAlgebra_mul
|
|
|
927
925
|
t = get_variable(self.base_ring(), 't')
|
|
928
926
|
|
|
929
927
|
def f(partition):
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
return 0
|
|
934
|
-
n += 1
|
|
935
|
-
return t**n
|
|
928
|
+
if partition and partition[0] != 1:
|
|
929
|
+
return 0
|
|
930
|
+
return t**len(partition)
|
|
936
931
|
|
|
937
932
|
return self.parent()._apply_module_morphism(self, f, t.parent())
|
|
938
933
|
|
sage/combinat/sf/schur.py
CHANGED
|
@@ -693,6 +693,12 @@ class SymmetricFunctionAlgebra_schur(classical.SymmetricFunctionAlgebra_classica
|
|
|
693
693
|
sage: s.zero().principal_specialization(3)
|
|
694
694
|
0
|
|
695
695
|
"""
|
|
696
|
+
if n == 1:
|
|
697
|
+
R = self.base_ring()
|
|
698
|
+
mc = self.monomial_coefficients(copy=False).items()
|
|
699
|
+
return R.sum(c for partition, c in mc
|
|
700
|
+
if len(partition) <= 1)
|
|
701
|
+
|
|
696
702
|
def get_variable(ring, name):
|
|
697
703
|
try:
|
|
698
704
|
ring(name)
|
sage/combinat/sf/sf.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"""
|
|
4
4
|
Symmetric functions, with their multiple realizations
|
|
5
5
|
"""
|
|
6
|
-
#
|
|
6
|
+
# ***************************************************************************
|
|
7
7
|
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>
|
|
8
8
|
# 2009-2012 Jason Bandlow <jbandlow@gmail.com>
|
|
9
9
|
# 2012 Anne Schilling <anne at math.ucdavis.edu>
|
|
@@ -19,8 +19,8 @@ Symmetric functions, with their multiple realizations
|
|
|
19
19
|
#
|
|
20
20
|
# The full text of the GPL is available at:
|
|
21
21
|
#
|
|
22
|
-
#
|
|
23
|
-
|
|
22
|
+
# https://www.gnu.org/licenses/
|
|
23
|
+
# ***************************************************************************
|
|
24
24
|
from sage.categories.fields import Fields
|
|
25
25
|
from sage.categories.graded_hopf_algebras import GradedHopfAlgebras
|
|
26
26
|
from sage.categories.principal_ideal_domains import PrincipalIdealDomains
|
|
@@ -786,7 +786,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
786
786
|
|
|
787
787
|
sage: # needs lrcalc_python
|
|
788
788
|
sage: QQqt = QQ['q','t'].fraction_field()
|
|
789
|
-
sage:
|
|
789
|
+
sage: q, t = QQqt.gens()
|
|
790
790
|
sage: st = SFA_st(SymmetricFunctions(QQqt),t)
|
|
791
791
|
sage: st
|
|
792
792
|
Symmetric Functions over Fraction Field of Multivariate Polynomial
|
|
@@ -895,7 +895,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
895
895
|
"""
|
|
896
896
|
return self.schur()
|
|
897
897
|
|
|
898
|
-
def _repr_(self):
|
|
898
|
+
def _repr_(self): # could be taken care of by the category
|
|
899
899
|
r"""
|
|
900
900
|
Representation of ``self``
|
|
901
901
|
|
|
@@ -917,7 +917,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
917
917
|
"""
|
|
918
918
|
return schur.SymmetricFunctionAlgebra_schur(self)
|
|
919
919
|
s = schur
|
|
920
|
-
Schur = schur
|
|
920
|
+
Schur = schur # Currently needed by SymmetricFunctions.__init_extra__
|
|
921
921
|
|
|
922
922
|
def powersum(self):
|
|
923
923
|
r"""
|
|
@@ -930,7 +930,8 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
930
930
|
"""
|
|
931
931
|
return powersum.SymmetricFunctionAlgebra_power(self)
|
|
932
932
|
p = powersum
|
|
933
|
-
power = powersum
|
|
933
|
+
power = powersum
|
|
934
|
+
# Todo: get rid of the line above when it won't be needed anymore
|
|
934
935
|
|
|
935
936
|
def complete(self):
|
|
936
937
|
r"""
|
|
@@ -1262,7 +1263,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
1262
1263
|
q^2*s[1, 1, 1, 1] + (q^2*t+q*t+q)*s[2, 1, 1] + (q^2*t^2+1)*s[2, 2] + (q*t^2+q*t+t)*s[3, 1] + t^2*s[4]
|
|
1263
1264
|
|
|
1264
1265
|
sage: Sym = SymmetricFunctions(QQ['z','q'].fraction_field())
|
|
1265
|
-
sage:
|
|
1266
|
+
sage: z, q = Sym.base_ring().gens()
|
|
1266
1267
|
sage: Hzq = Sym.macdonald(q=z,t=q).H()
|
|
1267
1268
|
sage: H1z = Sym.macdonald(q=1,t=z).H()
|
|
1268
1269
|
sage: s = Sym.schur()
|
|
@@ -1331,7 +1332,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
1331
1332
|
sage: JQp = Sym.jack().Qp(); JQp
|
|
1332
1333
|
Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the Jack Qp basis
|
|
1333
1334
|
"""
|
|
1334
|
-
return jack.Jack(
|
|
1335
|
+
return jack.Jack(self, t=t)
|
|
1335
1336
|
|
|
1336
1337
|
def abreu_nigro(self, q='q'):
|
|
1337
1338
|
"""
|
|
@@ -1355,7 +1356,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
1355
1356
|
sage: SymmetricFunctions(QQ).zonal()
|
|
1356
1357
|
Symmetric Functions over Rational Field in the zonal basis
|
|
1357
1358
|
"""
|
|
1358
|
-
return jack.SymmetricFunctionAlgebra_zonal(
|
|
1359
|
+
return jack.SymmetricFunctionAlgebra_zonal(self)
|
|
1359
1360
|
|
|
1360
1361
|
def llt(self, k, t='t'):
|
|
1361
1362
|
"""
|
|
@@ -1379,7 +1380,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
1379
1380
|
sage: llt3.hcospin()
|
|
1380
1381
|
Symmetric Functions over Fraction Field of Univariate Polynomial Ring in t over Rational Field in the level 3 LLT cospin basis
|
|
1381
1382
|
"""
|
|
1382
|
-
return llt.LLT_class(
|
|
1383
|
+
return llt.LLT_class(self, k, t=t)
|
|
1383
1384
|
|
|
1384
1385
|
def from_polynomial(self, f):
|
|
1385
1386
|
"""
|
|
@@ -1440,8 +1441,9 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
1440
1441
|
else:
|
|
1441
1442
|
morphism.codomain().register_coercion(morphism)
|
|
1442
1443
|
|
|
1443
|
-
|
|
1444
|
-
|
|
1444
|
+
# keep them sorted in alphabetic order
|
|
1445
|
+
_shorthands = ('e', 'f', 'h', 'm', 'p', 's')
|
|
1446
|
+
_shorthands_all = ('e', 'f', 'h', 'ht', 'm', 'o', 'p', 's', 'sp', 'st', 'w')
|
|
1445
1447
|
|
|
1446
1448
|
def __init_extra__(self):
|
|
1447
1449
|
"""
|
|
@@ -1462,11 +1464,11 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
1462
1464
|
sage: f(p.an_element()) == p.an_element()
|
|
1463
1465
|
True
|
|
1464
1466
|
"""
|
|
1465
|
-
#powersum = self.powersum ()
|
|
1466
|
-
#complete = self.complete ()
|
|
1467
|
-
#elementary = self.elementary()
|
|
1468
|
-
#schur = self.schur ()
|
|
1469
|
-
#monomial = self.monomial ()
|
|
1467
|
+
# powersum = self.powersum ()
|
|
1468
|
+
# complete = self.complete ()
|
|
1469
|
+
# elementary = self.elementary()
|
|
1470
|
+
# schur = self.schur ()
|
|
1471
|
+
# monomial = self.monomial ()
|
|
1470
1472
|
|
|
1471
1473
|
iso = self.register_isomorphism
|
|
1472
1474
|
|
|
@@ -1475,7 +1477,7 @@ class SymmetricFunctions(UniqueRepresentation, Parent):
|
|
|
1475
1477
|
for (basis1_name, basis2_name) in conversion_functions:
|
|
1476
1478
|
basis1 = getattr(self, basis1_name)()
|
|
1477
1479
|
basis2 = getattr(self, basis2_name)()
|
|
1478
|
-
on_basis = SymmetricaConversionOnBasis(t=conversion_functions[basis1_name,basis2_name], domain=basis1, codomain=basis2)
|
|
1480
|
+
on_basis = SymmetricaConversionOnBasis(t=conversion_functions[basis1_name, basis2_name], domain=basis1, codomain=basis2)
|
|
1479
1481
|
from sage.rings.rational_field import RationalField
|
|
1480
1482
|
if basis2_name != "powersum" or self._base.has_coerce_map_from(RationalField()):
|
|
1481
1483
|
iso(basis1._module_morphism(on_basis, codomain=basis2))
|
sage/combinat/sf/sfa.py
CHANGED
|
@@ -228,7 +228,6 @@ from sage.data_structures.blas_dict import convert_remove_zeroes, linear_combina
|
|
|
228
228
|
from sage.matrix.constructor import matrix
|
|
229
229
|
from sage.misc.cachefunc import cached_method
|
|
230
230
|
from sage.misc.misc_c import prod
|
|
231
|
-
from sage.misc.superseded import deprecated_function_alias
|
|
232
231
|
from sage.rings.infinity import infinity
|
|
233
232
|
from sage.rings.integer import Integer
|
|
234
233
|
from sage.rings.integer_ring import ZZ
|
|
@@ -240,35 +239,6 @@ from sage.structure.element import coerce_binop
|
|
|
240
239
|
from sage.structure.factorization import Factorization
|
|
241
240
|
|
|
242
241
|
|
|
243
|
-
def is_SymmetricFunctionAlgebra(x):
|
|
244
|
-
"""
|
|
245
|
-
Check whether ``x`` is a symmetric function algebra.
|
|
246
|
-
|
|
247
|
-
EXAMPLES::
|
|
248
|
-
|
|
249
|
-
sage: from sage.combinat.sf.sfa import is_SymmetricFunctionAlgebra
|
|
250
|
-
sage: is_SymmetricFunctionAlgebra(5)
|
|
251
|
-
doctest:warning...
|
|
252
|
-
DeprecationWarning: the function is_SymmetricFunctionAlgebra is deprecated;
|
|
253
|
-
use 'isinstance(..., SymmetricFunctionAlgebra_generic)' instead
|
|
254
|
-
See https://github.com/sagemath/sage/issues/37896 for details.
|
|
255
|
-
False
|
|
256
|
-
sage: is_SymmetricFunctionAlgebra(ZZ)
|
|
257
|
-
False
|
|
258
|
-
sage: is_SymmetricFunctionAlgebra(SymmetricFunctions(ZZ).schur())
|
|
259
|
-
True
|
|
260
|
-
sage: is_SymmetricFunctionAlgebra(SymmetricFunctions(QQ).e())
|
|
261
|
-
True
|
|
262
|
-
sage: is_SymmetricFunctionAlgebra(SymmetricFunctions(QQ).macdonald(q=1,t=1).P())
|
|
263
|
-
True
|
|
264
|
-
sage: is_SymmetricFunctionAlgebra(SymmetricFunctions(FractionField(QQ['q','t'])).macdonald().P())
|
|
265
|
-
True
|
|
266
|
-
"""
|
|
267
|
-
from sage.misc.superseded import deprecation
|
|
268
|
-
deprecation(37896, "the function is_SymmetricFunctionAlgebra is deprecated; use 'isinstance(..., SymmetricFunctionAlgebra_generic)' instead")
|
|
269
|
-
return isinstance(x, SymmetricFunctionAlgebra_generic)
|
|
270
|
-
|
|
271
|
-
|
|
272
242
|
def zee(part) -> Integer:
|
|
273
243
|
r"""
|
|
274
244
|
Return the size of the centralizer of any permutation of cycle type
|
|
@@ -298,32 +268,6 @@ def zee(part) -> Integer:
|
|
|
298
268
|
return part.centralizer_size()
|
|
299
269
|
|
|
300
270
|
|
|
301
|
-
def is_SymmetricFunction(x):
|
|
302
|
-
r"""
|
|
303
|
-
Check whether ``x`` is a symmetric function.
|
|
304
|
-
|
|
305
|
-
EXAMPLES::
|
|
306
|
-
|
|
307
|
-
sage: from sage.combinat.sf.sfa import is_SymmetricFunction
|
|
308
|
-
sage: s = SymmetricFunctions(QQ).s()
|
|
309
|
-
sage: is_SymmetricFunction(2)
|
|
310
|
-
doctest:warning...
|
|
311
|
-
DeprecationWarning: The function is_SymmetricFunction is deprecated;
|
|
312
|
-
use 'isinstance(..., SymmetricFunctionAlgebra_generic.Element)' instead.
|
|
313
|
-
See https://github.com/sagemath/sage/issues/38279 for details.
|
|
314
|
-
False
|
|
315
|
-
sage: is_SymmetricFunction(s(2))
|
|
316
|
-
True
|
|
317
|
-
sage: is_SymmetricFunction(s([2,1]))
|
|
318
|
-
True
|
|
319
|
-
"""
|
|
320
|
-
from sage.misc.superseded import deprecation
|
|
321
|
-
deprecation(38279,
|
|
322
|
-
"The function is_SymmetricFunction is deprecated; "
|
|
323
|
-
"use 'isinstance(..., SymmetricFunctionAlgebra_generic.Element)' instead.")
|
|
324
|
-
return isinstance(x, SymmetricFunctionAlgebra_generic.Element)
|
|
325
|
-
|
|
326
|
-
|
|
327
271
|
#####################################################################
|
|
328
272
|
# Bases categories
|
|
329
273
|
|
|
@@ -1479,9 +1423,7 @@ class SymmetricFunctionsBases(Category_realization_of_parent):
|
|
|
1479
1423
|
def check_word(w):
|
|
1480
1424
|
if sum(1 for i in range(n-1) if w[i] > w[i+1]) != d:
|
|
1481
1425
|
return False
|
|
1482
|
-
|
|
1483
|
-
return False
|
|
1484
|
-
return True
|
|
1426
|
+
return sum(1 for i in range(n - 1) if w[i] == w[i + 1]) == s
|
|
1485
1427
|
elif comparison == -1:
|
|
1486
1428
|
def check_word(w):
|
|
1487
1429
|
if sum(1 for i in range(n-1) if w[i] > w[i+1]) != d:
|
|
@@ -1673,10 +1615,14 @@ class SymmetricFunctionsBases(Category_realization_of_parent):
|
|
|
1673
1615
|
|
|
1674
1616
|
sage: type(L)
|
|
1675
1617
|
<class 'sage.rings.lazy_series_ring.LazySymmetricFunctions_with_category'>
|
|
1618
|
+
sage: s.completion() is s.formal_series_ring()
|
|
1619
|
+
True
|
|
1676
1620
|
"""
|
|
1677
1621
|
from sage.rings.lazy_series_ring import LazySymmetricFunctions
|
|
1678
1622
|
return LazySymmetricFunctions(self)
|
|
1679
1623
|
|
|
1624
|
+
completion = formal_series_ring
|
|
1625
|
+
|
|
1680
1626
|
|
|
1681
1627
|
class FilteredSymmetricFunctionsBases(Category_realization_of_parent):
|
|
1682
1628
|
r"""
|
|
@@ -3568,6 +3514,11 @@ class SymmetricFunctionAlgebra_generic_Element(CombinatorialFreeModule.Element):
|
|
|
3568
3514
|
sage: (1+p[2]).plethysm(p[2])
|
|
3569
3515
|
p[] + p[4]
|
|
3570
3516
|
|
|
3517
|
+
Fixed :issue:`41257`::
|
|
3518
|
+
|
|
3519
|
+
sage: s[[]](tensor([p[1], s[1]]))
|
|
3520
|
+
p[] # s[]
|
|
3521
|
+
|
|
3571
3522
|
Check that degree one elements are treated in the correct way::
|
|
3572
3523
|
|
|
3573
3524
|
sage: R.<a1,a2,a11,b1,b21,b111> = QQ[]
|
|
@@ -3645,11 +3596,11 @@ class SymmetricFunctionAlgebra_generic_Element(CombinatorialFreeModule.Element):
|
|
|
3645
3596
|
if tensorflag:
|
|
3646
3597
|
tparents = Px._sets
|
|
3647
3598
|
lincomb = Px.linear_combination
|
|
3648
|
-
elt = lincomb((prod(lincomb((tensor([p[r].plethysm(base(la))
|
|
3599
|
+
elt = lincomb((prod((lincomb((tensor([p[r].plethysm(base(la))
|
|
3649
3600
|
for base, la in zip(tparents, trm)]),
|
|
3650
3601
|
_raise_variables(c, r, degree_one))
|
|
3651
3602
|
for trm, c in x)
|
|
3652
|
-
for r in mu),
|
|
3603
|
+
for r in mu), tensor([base.one() for base in tparents])),
|
|
3653
3604
|
d)
|
|
3654
3605
|
for mu, d in p(self))
|
|
3655
3606
|
return Px(elt)
|
|
@@ -5157,7 +5108,7 @@ class SymmetricFunctionAlgebra_generic_Element(CombinatorialFreeModule.Element):
|
|
|
5157
5108
|
-q^3 + 2*q^2 - 2*q + 1
|
|
5158
5109
|
sage: a.scalar_qt(a,5,7) # q=5 and t=7
|
|
5159
5110
|
490/1539
|
|
5160
|
-
sage:
|
|
5111
|
+
sage: x, y = var('x,y') # needs sage.symbolic
|
|
5161
5112
|
sage: a.scalar_qt(a, q=x, t=y) # needs sage.symbolic
|
|
5162
5113
|
1/3*(x^3 - 1)/(y^3 - 1) + 2/3*(x - 1)^3/(y - 1)^3
|
|
5163
5114
|
sage: Rn = QQ['q','t','y','z'].fraction_field()
|
|
@@ -5451,8 +5402,6 @@ class SymmetricFunctionAlgebra_generic_Element(CombinatorialFreeModule.Element):
|
|
|
5451
5402
|
result_in_m_basis = m._from_dict(dct)
|
|
5452
5403
|
return parent(result_in_m_basis)
|
|
5453
5404
|
|
|
5454
|
-
frobenius = deprecated_function_alias(36396, adams_operator)
|
|
5455
|
-
|
|
5456
5405
|
def verschiebung(self, n):
|
|
5457
5406
|
r"""
|
|
5458
5407
|
Return the image of the symmetric function ``self`` under the
|
|
@@ -1090,7 +1090,7 @@ class CrystalElementShiftedPrimedTableau(ShiftedPrimedTableau):
|
|
|
1090
1090
|
h, l = len(T), len(T[0])
|
|
1091
1091
|
|
|
1092
1092
|
if (c+1 == l or T[r][c+1] is None or T[r][c+1] >= ind_plus_one):
|
|
1093
|
-
|
|
1093
|
+
tp_r, tp_c = (r, c)
|
|
1094
1094
|
while True:
|
|
1095
1095
|
if tp_r+1 == h or T[tp_r+1][tp_c] is None or T[tp_r+1][tp_c] > ind_plus_one:
|
|
1096
1096
|
break
|
|
@@ -1264,7 +1264,7 @@ class CrystalElementShiftedPrimedTableau(ShiftedPrimedTableau):
|
|
|
1264
1264
|
r, c = c, r
|
|
1265
1265
|
|
|
1266
1266
|
if (c == 0 or T[r][c-1] is None or T[r][c-1] <= ind_e):
|
|
1267
|
-
|
|
1267
|
+
tp_r, tp_c = (r, c)
|
|
1268
1268
|
while True:
|
|
1269
1269
|
if tp_r == 0 or T[tp_r-1][tp_c] is None or T[tp_r-1][tp_c] < ind_e:
|
|
1270
1270
|
break
|
|
@@ -1984,11 +1984,9 @@ class ShiftedPrimedTableaux(UniqueRepresentation, Parent):
|
|
|
1984
1984
|
for j in range(skew[i], len(row)-1)
|
|
1985
1985
|
if row[j].is_primed()):
|
|
1986
1986
|
return False
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
return False
|
|
1991
|
-
return True
|
|
1987
|
+
return self._primed_diagonal or all(row[0].is_unprimed()
|
|
1988
|
+
for i, row in enumerate(T)
|
|
1989
|
+
if skew[i] == 0)
|
|
1992
1990
|
|
|
1993
1991
|
|
|
1994
1992
|
class ShiftedPrimedTableaux_all(ShiftedPrimedTableaux):
|
sage/combinat/shuffle.py
CHANGED
|
@@ -310,7 +310,7 @@ class SetShuffleProduct(ShuffleProduct_abstract):
|
|
|
310
310
|
return (ll1 + ll2).binomial(ll2)
|
|
311
311
|
|
|
312
312
|
return sum(comp_binom(el1, el2)
|
|
313
|
-
for
|
|
313
|
+
for el1, el2 in itertools.product(self._l1, self._l2))
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
class ShuffleProduct(ShuffleProduct_abstract):
|
sage/combinat/sine_gordon.py
CHANGED
|
@@ -320,7 +320,7 @@ class SineGordonYsystem(SageObject):
|
|
|
320
320
|
triangulation = []
|
|
321
321
|
intervals = self.intervals()
|
|
322
322
|
for a in range(self.F()):
|
|
323
|
-
for
|
|
323
|
+
for first, last, typ in intervals[a]:
|
|
324
324
|
if first - last in [vert(1), vert(-1)]:
|
|
325
325
|
continue
|
|
326
326
|
if typ == "L":
|
|
@@ -396,7 +396,7 @@ class SineGordonYsystem(SageObject):
|
|
|
396
396
|
for a in range(self.F()):
|
|
397
397
|
new_intervals = []
|
|
398
398
|
if na[a] % 2 == 0:
|
|
399
|
-
for
|
|
399
|
+
for first, last, typ in intervals[a]:
|
|
400
400
|
if typ == "NR":
|
|
401
401
|
new_intervals.append((first, last, "R"))
|
|
402
402
|
elif typ == "NL":
|
|
@@ -417,7 +417,7 @@ class SineGordonYsystem(SageObject):
|
|
|
417
417
|
new_intervals.append((vert(x), vert(x + rk[a + 1]), "R"))
|
|
418
418
|
x = vert(x + rk[a + 1])
|
|
419
419
|
else:
|
|
420
|
-
for
|
|
420
|
+
for first, last, typ in intervals[a]:
|
|
421
421
|
if typ == "NR":
|
|
422
422
|
new_intervals.append((first, last, "R"))
|
|
423
423
|
elif typ == "NL":
|
|
@@ -474,41 +474,21 @@ class SineGordonYsystem(SageObject):
|
|
|
474
474
|
else:
|
|
475
475
|
radius = ceil(self.r() / (2 * pi))
|
|
476
476
|
points_opts = {}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
else:
|
|
480
|
-
points_opts['color'] = 'black'
|
|
481
|
-
if 'points_size' in kwds:
|
|
482
|
-
points_opts['size'] = kwds['points_size']
|
|
483
|
-
else:
|
|
484
|
-
points_opts['size'] = 7
|
|
477
|
+
points_opts['color'] = kwds.get('points_color', 'black')
|
|
478
|
+
points_opts['size'] = kwds.get('points_size', 7)
|
|
485
479
|
triangulation_opts = {}
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
triangulation_opts['color'] = 'black'
|
|
490
|
-
if 'triangulation_thickness' in kwds:
|
|
491
|
-
triangulation_opts['thickness'] = kwds['triangulation_thickness']
|
|
492
|
-
else:
|
|
493
|
-
triangulation_opts['thickness'] = 0.5
|
|
480
|
+
triangulation_opts['color'] = kwds.get('triangulation_color', 'black')
|
|
481
|
+
triangulation_opts['thickness'] = kwds.get('triangulation_thickness',
|
|
482
|
+
0.5)
|
|
494
483
|
shading_opts = {}
|
|
495
|
-
|
|
496
|
-
shading_opts['color'] = kwds['shading_color']
|
|
497
|
-
else:
|
|
498
|
-
shading_opts['color'] = 'lightgray'
|
|
484
|
+
shading_opts['color'] = kwds.get('shading_color', 'lightgray')
|
|
499
485
|
reflections_opts = {}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
else:
|
|
503
|
-
reflections_opts['color'] = 'blue'
|
|
504
|
-
if 'reflections_thickness' in kwds:
|
|
505
|
-
reflections_opts['thickness'] = kwds['reflections_thickness']
|
|
506
|
-
else:
|
|
507
|
-
reflections_opts['thickness'] = 1
|
|
486
|
+
reflections_opts['color'] = kwds.get('reflections_color', 'blue')
|
|
487
|
+
reflections_opts['thickness'] = kwds.get('reflections_thickness', 1)
|
|
508
488
|
# Helper functions
|
|
509
489
|
|
|
510
490
|
def triangle(x):
|
|
511
|
-
|
|
491
|
+
a, b = sorted(x[:2])
|
|
512
492
|
for p in self.vertices():
|
|
513
493
|
if (p, a) in self.triangulation() or (a, p) in self.triangulation():
|
|
514
494
|
if (p, b) in self.triangulation() or (b, p) in self.triangulation():
|
|
@@ -524,7 +504,7 @@ class SineGordonYsystem(SageObject):
|
|
|
524
504
|
if p - q in [1, -1]:
|
|
525
505
|
def f(t):
|
|
526
506
|
return (radius * cos(t), radius * sin(t))
|
|
527
|
-
|
|
507
|
+
p, q = sorted([p, q])
|
|
528
508
|
angle_p = vertex_to_angle(p)
|
|
529
509
|
angle_q = vertex_to_angle(q)
|
|
530
510
|
return parametric_plot(f(t), (t, angle_q, angle_p), **opts)
|
|
@@ -535,7 +515,7 @@ class SineGordonYsystem(SageObject):
|
|
|
535
515
|
angle_p += 2 * pi
|
|
536
516
|
internal_angle = angle_p - angle_q
|
|
537
517
|
if internal_angle > pi:
|
|
538
|
-
|
|
518
|
+
angle_p, angle_q = (angle_q + 2 * pi, angle_p)
|
|
539
519
|
internal_angle = angle_p - angle_q
|
|
540
520
|
angle_center = (angle_p + angle_q) / 2
|
|
541
521
|
hypotenuse = radius / cos(internal_angle / 2)
|
|
@@ -575,7 +555,7 @@ class SineGordonYsystem(SageObject):
|
|
|
575
555
|
max_level=1)
|
|
576
556
|
if x[2] in ["NR", "NL"]]
|
|
577
557
|
shaded_triangles = map(triangle, neuter_intervals)
|
|
578
|
-
for
|
|
558
|
+
for p, q, r in shaded_triangles:
|
|
579
559
|
points = list(plot_arc(radius, p, q)[0])
|
|
580
560
|
points += list(plot_arc(radius, q, r)[0])
|
|
581
561
|
points += list(reversed(plot_arc(radius, p, r)[0]))
|
|
@@ -583,7 +563,7 @@ class SineGordonYsystem(SageObject):
|
|
|
583
563
|
# Disk boundary
|
|
584
564
|
P += circle((0, 0), radius, **triangulation_opts)
|
|
585
565
|
# Triangulation
|
|
586
|
-
for
|
|
566
|
+
for p, q in self.triangulation():
|
|
587
567
|
P += plot_arc(radius, p, q, **triangulation_opts)
|
|
588
568
|
if self.type() == 'D':
|
|
589
569
|
s = radius / 50.0
|
|
@@ -609,8 +589,8 @@ class SineGordonYsystem(SageObject):
|
|
|
609
589
|
P += line([(0, 1.1 * radius), (0, -1.1 * radius)],
|
|
610
590
|
zorder=len(P), **reflections_opts)
|
|
611
591
|
axis_angle = vertex_to_angle(-0.5 * (self.rk() + (1, 1))[1])
|
|
612
|
-
|
|
613
|
-
|
|
592
|
+
a, b = (1.1 * radius * cos(axis_angle),
|
|
593
|
+
1.1 * radius * sin(axis_angle))
|
|
614
594
|
P += line([(a, b), (-a, -b)], zorder=len(P), **reflections_opts)
|
|
615
595
|
# Wrap up
|
|
616
596
|
P.set_aspect_ratio(1)
|
sage/combinat/skew_partition.py
CHANGED
|
@@ -128,7 +128,7 @@ AUTHORS:
|
|
|
128
128
|
- Travis Scrimshaw (2013-02-11): Factored out ``CombinatorialClass``
|
|
129
129
|
- Trevor K. Karn (2022-08-03): Add ``outside_corners``
|
|
130
130
|
"""
|
|
131
|
-
|
|
131
|
+
# ***************************************************************************
|
|
132
132
|
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>,
|
|
133
133
|
#
|
|
134
134
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
@@ -140,8 +140,8 @@ AUTHORS:
|
|
|
140
140
|
#
|
|
141
141
|
# The full text of the GPL is available at:
|
|
142
142
|
#
|
|
143
|
-
#
|
|
144
|
-
|
|
143
|
+
# https://www.gnu.org/licenses/
|
|
144
|
+
# ***************************************************************************
|
|
145
145
|
|
|
146
146
|
from sage.structure.global_options import GlobalOptions
|
|
147
147
|
from sage.structure.parent import Parent
|
|
@@ -590,7 +590,7 @@ class SkewPartition(CombinatorialElement):
|
|
|
590
590
|
"""
|
|
591
591
|
return sum(self.row_lengths())
|
|
592
592
|
|
|
593
|
-
def is_connected(self):
|
|
593
|
+
def is_connected(self) -> bool:
|
|
594
594
|
"""
|
|
595
595
|
Return ``True`` if ``self`` is a connected skew partition.
|
|
596
596
|
|
|
@@ -635,16 +635,16 @@ class SkewPartition(CombinatorialElement):
|
|
|
635
635
|
sage: SkewPartition([[10,10],[1]]).overlap()
|
|
636
636
|
9
|
|
637
637
|
"""
|
|
638
|
-
p,q = self
|
|
638
|
+
p, q = self
|
|
639
639
|
if len(p) <= 1:
|
|
640
640
|
from sage.rings.infinity import PlusInfinity
|
|
641
641
|
return PlusInfinity()
|
|
642
642
|
if len(q) == 0:
|
|
643
643
|
return min(p)
|
|
644
644
|
q = [q[0]] + list(q)
|
|
645
|
-
return min(row_lengths_aux([p,q]))
|
|
645
|
+
return min(row_lengths_aux([p, q]))
|
|
646
646
|
|
|
647
|
-
def is_overlap(self, n):
|
|
647
|
+
def is_overlap(self, n) -> bool:
|
|
648
648
|
r"""
|
|
649
649
|
Return ``True`` if the overlap of ``self`` is at most ``n``.
|
|
650
650
|
|
|
@@ -659,7 +659,7 @@ class SkewPartition(CombinatorialElement):
|
|
|
659
659
|
"""
|
|
660
660
|
return n <= self.overlap()
|
|
661
661
|
|
|
662
|
-
def is_ribbon(self):
|
|
662
|
+
def is_ribbon(self) -> bool:
|
|
663
663
|
r"""
|
|
664
664
|
Return ``True`` if and only if ``self`` is a ribbon.
|
|
665
665
|
|
|
@@ -1552,10 +1552,7 @@ class SkewPartitions(UniqueRepresentation, Parent):
|
|
|
1552
1552
|
if x[1] not in p:
|
|
1553
1553
|
return False
|
|
1554
1554
|
|
|
1555
|
-
|
|
1556
|
-
return False
|
|
1557
|
-
|
|
1558
|
-
return True
|
|
1555
|
+
return p(x[0]).contains(p(x[1]))
|
|
1559
1556
|
|
|
1560
1557
|
def from_row_and_column_length(self, rowL, colL):
|
|
1561
1558
|
"""
|
sage/combinat/skew_tableau.py
CHANGED
|
@@ -176,8 +176,7 @@ class SkewTableau(ClonableList,
|
|
|
176
176
|
"""
|
|
177
177
|
if isinstance(other, (Tableau, SkewTableau)):
|
|
178
178
|
return list(self) == list(other)
|
|
179
|
-
|
|
180
|
-
return list(self) == other or list(list(row) for row in self) == other
|
|
179
|
+
return list(self) == other or [list(row) for row in self] == other
|
|
181
180
|
|
|
182
181
|
def __ne__(self, other):
|
|
183
182
|
r"""
|
|
@@ -1812,11 +1811,7 @@ class SkewTableau(ClonableList,
|
|
|
1812
1811
|
v += 1
|
|
1813
1812
|
|
|
1814
1813
|
# Check if lam[i]==mu[i] for all i >= v
|
|
1815
|
-
for i in range(v, l_out)
|
|
1816
|
-
if lam[i] != mu[i]:
|
|
1817
|
-
return False
|
|
1818
|
-
|
|
1819
|
-
return True
|
|
1814
|
+
return all(lam[i] == mu[i] for i in range(v, l_out))
|
|
1820
1815
|
|
|
1821
1816
|
def to_ribbon(self, check_input=True):
|
|
1822
1817
|
"""
|
|
@@ -317,7 +317,7 @@ class SloaneSequence(SageObject):
|
|
|
317
317
|
return self(n)
|
|
318
318
|
|
|
319
319
|
LENGTH = 100000
|
|
320
|
-
|
|
320
|
+
start, stop, step = n.indices(2 * LENGTH)
|
|
321
321
|
if abs(stop - start) > LENGTH:
|
|
322
322
|
raise IndexError("slice (=%s) too long" % n)
|
|
323
323
|
return [self(i) for i in range(start, stop, step) if i >= self.offset]
|