Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
allow SymmetricFunctions as arguments of functorial composition
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Sep 1, 2022
1 parent 8ca3624 commit b2ef1e4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/sage/rings/lazy_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -4767,7 +4767,7 @@ def functorial_composition(self, *args):
sage: h = SymmetricFunctions(QQ).h()
sage: L = LazySymmetricFunctions(h)
sage: L(h[2,1]).functorial_composition(L([3*h[0]]))
sage: L(h[2,1]).functorial_composition(3*h[0])
3*h[] + O^7
Check an instance of a non-group action::
Expand All @@ -4776,7 +4776,7 @@ def functorial_composition(self, *args):
sage: p = SymmetricFunctions(QQ).p()
sage: L = LazySymmetricFunctions(p)
sage: f = L(lambda n: s[n])
sage: g = L(2*s[2, 1, 1] + s[2, 2] + 3*s[4])
sage: g = 2*s[2, 1, 1] + s[2, 2] + 3*s[4]
sage: r = f.functorial_composition(g); r[4]
Traceback (most recent call last):
...
Expand All @@ -4793,7 +4793,14 @@ def functorial_composition(self, *args):
if len(args) == 1:
g = args[0]
P = g.parent()
R = P._laurent_poly_ring
if isinstance(g, LazySymmetricFunction):
R = P._laurent_poly_ring
else:
from sage.rings.lazy_series_ring import LazySymmetricFunctions
R = g.parent()
P = LazySymmetricFunctions(R)
g = P(g)

p = R.realization_of().p()
# TODO: does the following introduce a memory leak?
g = Stream_map_coefficients(g._coeff_stream, p)
Expand Down

0 comments on commit b2ef1e4

Please sign in to comment.