Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/sage/combinat/sf/sfa.py
Original file line number Diff line number Diff line change
Expand Up @@ -3602,6 +3602,11 @@
sage: s[2](5)
15*B[] # B[]

Fixed :issue:`41257`::

sage: s[[]](tensor([p[1], s[1]]))

Check failure on line 3607 in src/sage/combinat/sf/sfa.py

View workflow job for this annotation

GitHub Actions / Conda (ubuntu, Python 3.13, all)

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "sage/misc/cachefunc.pyx", line 1990, in sage.misc.cachefunc.CachedMethodCaller.__call__ return cache[k] KeyError: (((Category of graded bases of Symmetric Functions over Multivariate Polynomial Ring in a1, a2, a11, b1, b21, b111 over Rational Field, Category of graded bases of Symmetric Functions over Shuffle Algebra on 2 generators ['a', 'b'] over Rational Field # Shuffle Algebra on 2 generators ['b', 'c'] over Rational Field),), ()) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/doctest/forker.py", line 734, in _run self.compile_and_execute(example, compiler, test.globs) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/doctest/forker.py", line 1158, in compile_and_execute exec(compiled, globs) ~~~~^^^^^^^^^^^^^^^^^ File "<doctest sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.plethysm[53]>", line 1, in <module> s[[]](tensor([p[Integer(1)], s[Integer(1)]])) ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/categories/modules_with_basis.py", line 2450, in tensor return tensor(parents)._tensor_of_elements(elements) # good name ? ~~~~~~^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/categories/modules_with_basis.py", line 989, in tensor cat = constructor.category_from_parents(parents) File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/categories/covariant_functorial_construction.py", line 151, in category_from_parents return self.category_from_categories(tuple({parent.category() for parent in parents})) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sage/misc/cachefunc.pyx", line 1995, in sage.misc.cachefunc.CachedMethodCaller.__call__ w = self._instance_call(*args, **kwds) File "sage/misc/cachefunc.pyx", line 1871, in sage.misc.cachefunc.CachedMethodCaller._instance_call return self.f(self._instance, *args, **kwds) File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/categories/covariant_functorial_construction.py", line 177, in category_from_categories return self.category_from_category(Category.meet(categories)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.13/site-packages/sage/categories/covariant_functorial_construction.py", line 196, in category_from_category return getattr(category, self._functor_category)() ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'JoinCategory_with_category' object has no attribute 'TensorProducts'

Check failure on line 3607 in src/sage/combinat/sf/sfa.py

View workflow job for this annotation

GitHub Actions / Conda (ubuntu, Python 3.12, new)

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "sage/misc/cachefunc.pyx", line 1990, in sage.misc.cachefunc.CachedMethodCaller.__call__ return cache[k] KeyError: (((Category of graded bases of Symmetric Functions over Shuffle Algebra on 2 generators ['a', 'b'] over Rational Field # Shuffle Algebra on 2 generators ['b', 'c'] over Rational Field, Category of graded bases of Symmetric Functions over Multivariate Polynomial Ring in a1, a2, a11, b1, b21, b111 over Rational Field),), ()) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/doctest/forker.py", line 734, in _run self.compile_and_execute(example, compiler, test.globs) File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/doctest/forker.py", line 1158, in compile_and_execute exec(compiled, globs) File "<doctest sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.plethysm[53]>", line 1, in <module> s[[]](tensor([p[Integer(1)], s[Integer(1)]])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/modules_with_basis.py", line 2450, in tensor return tensor(parents)._tensor_of_elements(elements) # good name ? ^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/modules_with_basis.py", line 989, in tensor cat = constructor.category_from_parents(parents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 151, in category_from_parents return self.category_from_categories(tuple({parent.category() for parent in parents})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sage/misc/cachefunc.pyx", line 1995, in sage.misc.cachefunc.CachedMethodCaller.__call__ w = self._instance_call(*args, **kwds) File "sage/misc/cachefunc.pyx", line 1871, in sage.misc.cachefunc.CachedMethodCaller._instance_call return self.f(self._instance, *args, **kwds) File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 177, in category_from_categories return self.category_from_category(Category.meet(categories)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 196, in category_from_category return getattr(category, self._functor_category)() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'JoinCategory_with_category' object has no attribute 'TensorProducts'

Check failure on line 3607 in src/sage/combinat/sf/sfa.py

View workflow job for this annotation

GitHub Actions / test-long (src/sage/[a-f]*)

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "sage/misc/cachefunc.pyx", line 1990, in sage.misc.cachefunc.CachedMethodCaller.__call__ KeyError: (((Category of graded bases of Symmetric Functions over Multivariate Polynomial Ring in a1, a2, a11, b1, b21, b111 over Rational Field, Category of graded bases of Symmetric Functions over Shuffle Algebra on 2 generators ['a', 'b'] over Rational Field # Shuffle Algebra on 2 generators ['b', 'c'] over Rational Field),), ()) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/sage/src/sage/doctest/forker.py", line 734, in _run self.compile_and_execute(example, compiler, test.globs) File "/sage/src/sage/doctest/forker.py", line 1158, in compile_and_execute exec(compiled, globs) File "<doctest sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.plethysm[53]>", line 1, in <module> s[[]](tensor([p[Integer(1)], s[Integer(1)]])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sage/src/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sage/src/sage/categories/modules_with_basis.py", line 2450, in tensor return tensor(parents)._tensor_of_elements(elements) # good name ? ^^^^^^^^^^^^^^^ File "/sage/src/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sage/src/sage/categories/modules_with_basis.py", line 989, in tensor cat = constructor.category_from_parents(parents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sage/src/sage/categories/covariant_functorial_construction.py", line 151, in category_from_parents return self.category_from_categories(tuple({parent.category() for parent in parents})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sage/misc/cachefunc.pyx", line 1995, in sage.misc.cachefunc.CachedMethodCaller.__call__ File "sage/misc/cachefunc.pyx", line 1871, in sage.misc.cachefunc.CachedMethodCaller._instance_call File "/sage/src/sage/categories/covariant_functorial_construction.py", line 177, in category_from_categories return self.category_from_category(Category.meet(categories)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/sage/src/sage/categories/covariant_functorial_construction.py", line 196, in category_from_category return getattr(category, self._functor_category)() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'JoinCategory_with_category' object has no attribute 'TensorProducts'

Check failure on line 3607 in src/sage/combinat/sf/sfa.py

View workflow job for this annotation

GitHub Actions / Conda (ubuntu, Python 3.12, all)

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "sage/misc/cachefunc.pyx", line 1990, in sage.misc.cachefunc.CachedMethodCaller.__call__ return cache[k] KeyError: (((Category of graded bases of Symmetric Functions over Shuffle Algebra on 2 generators ['a', 'b'] over Rational Field # Shuffle Algebra on 2 generators ['b', 'c'] over Rational Field, Category of graded bases of Symmetric Functions over Multivariate Polynomial Ring in a1, a2, a11, b1, b21, b111 over Rational Field),), ()) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/doctest/forker.py", line 734, in _run self.compile_and_execute(example, compiler, test.globs) File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/doctest/forker.py", line 1158, in compile_and_execute exec(compiled, globs) File "<doctest sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.plethysm[53]>", line 1, in <module> s[[]](tensor([p[Integer(1)], s[Integer(1)]])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/modules_with_basis.py", line 2450, in tensor return tensor(parents)._tensor_of_elements(elements) # good name ? ^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/modules_with_basis.py", line 989, in tensor cat = constructor.category_from_parents(parents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 151, in category_from_parents return self.category_from_categories(tuple({parent.category() for parent in parents})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sage/misc/cachefunc.pyx", line 1995, in sage.misc.cachefunc.CachedMethodCaller.__call__ w = self._instance_call(*args, **kwds) File "sage/misc/cachefunc.pyx", line 1871, in sage.misc.cachefunc.CachedMethodCaller._instance_call return self.f(self._instance, *args, **kwds) File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 177, in category_from_categories return self.category_from_category(Category.meet(categories)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/miniconda/envs/sage-dev/lib/python3.12/site-packages/sage/categories/covariant_functorial_construction.py", line 196, in category_from_category return getattr(category, self._functor_category)() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'JoinCategory_with_category' object has no attribute 'TensorProducts'

Check failure on line 3607 in src/sage/combinat/sf/sfa.py

View workflow job for this annotation

GitHub Actions / Conda (ubuntu, Python 3.12, all, editable)

Failed example:

Failed example:: Exception raised: Traceback (most recent call last): File "sage/misc/cachefunc.pyx", line 1990, in sage.misc.cachefunc.CachedMethodCaller.__call__ KeyError: (((Category of graded bases of Symmetric Functions over Shuffle Algebra on 2 generators ['a', 'b'] over Rational Field # Shuffle Algebra on 2 generators ['b', 'c'] over Rational Field, Category of graded bases of Symmetric Functions over Multivariate Polynomial Ring in a1, a2, a11, b1, b21, b111 over Rational Field),), ()) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/runner/work/sage/sage/src/sage/doctest/forker.py", line 734, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/runner/work/sage/sage/src/sage/doctest/forker.py", line 1158, in compile_and_execute exec(compiled, globs) File "<doctest sage.combinat.sf.sfa.SymmetricFunctionAlgebra_generic_Element.plethysm[53]>", line 1, in <module> s[[]](tensor([p[Integer(1)], s[Integer(1)]])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/sage/sage/src/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/sage/sage/src/sage/categories/modules_with_basis.py", line 2450, in tensor return tensor(parents)._tensor_of_elements(elements) # good name ? ^^^^^^^^^^^^^^^ File "/home/runner/work/sage/sage/src/sage/categories/covariant_functorial_construction.py", line 227, in __call__ return getattr(args[0], self._functor_name)(*args[1:], **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/sage/sage/src/sage/categories/modules_with_basis.py", line 989, in tensor cat = constructor.category_from_parents(parents) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/sage/sage/src/sage/categories/covariant_functorial_construction.py", line 151, in category_from_parents return self.category_from_categories(tuple({parent.category() for parent in parents})) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sage/misc/cachefunc.pyx", line 1995, in sage.misc.cachefunc.CachedMethodCaller.__call__ File "sage/misc/cachefunc.pyx", line 1871, in sage.misc.cachefunc.CachedMethodCaller._instance_call File "/home/runner/work/sage/sage/src/sage/categories/covariant_functorial_construction.py", line 177, in category_from_categories return self.category_from_category(Category.meet(categories)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/work/sage/sage/src/sage/categories/covariant_functorial_construction.py", line 196, in category_from_category return getattr(category, self._functor_category)() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'JoinCategory_with_category' object has no attribute 'TensorProducts'
p[] # s[]

.. TODO::

The implementation of plethysm in
Expand Down Expand Up @@ -3646,11 +3651,11 @@
if tensorflag:
tparents = Px._sets
lincomb = Px.linear_combination
elt = lincomb((prod(lincomb((tensor([p[r].plethysm(base(la))
elt = lincomb((prod((lincomb((tensor([p[r].plethysm(base(la))
for base, la in zip(tparents, trm)]),
_raise_variables(c, r, degree_one))
for trm, c in x)
for r in mu),
for r in mu),tensor([base.one() for base in tparents])),
d)
for mu, d in p(self))
return Px(elt)
Expand Down
Loading