@@ -4767,7 +4767,7 @@ def functorial_composition(self, *args):
4767
4767
4768
4768
sage: h = SymmetricFunctions(QQ).h()
4769
4769
sage: L = LazySymmetricFunctions(h)
4770
- sage: L(h[2,1]).functorial_composition(L([ 3*h[0]]) )
4770
+ sage: L(h[2,1]).functorial_composition(3*h[0])
4771
4771
3*h[] + O^7
4772
4772
4773
4773
Check an instance of a non-group action::
@@ -4776,7 +4776,7 @@ def functorial_composition(self, *args):
4776
4776
sage: p = SymmetricFunctions(QQ).p()
4777
4777
sage: L = LazySymmetricFunctions(p)
4778
4778
sage: f = L(lambda n: s[n])
4779
- sage: g = L( 2*s[2, 1, 1] + s[2, 2] + 3*s[4])
4779
+ sage: g = 2*s[2, 1, 1] + s[2, 2] + 3*s[4]
4780
4780
sage: r = f.functorial_composition(g); r[4]
4781
4781
Traceback (most recent call last):
4782
4782
...
@@ -4793,7 +4793,14 @@ def functorial_composition(self, *args):
4793
4793
if len (args ) == 1 :
4794
4794
g = args [0 ]
4795
4795
P = g .parent ()
4796
- R = P ._laurent_poly_ring
4796
+ if isinstance (g , LazySymmetricFunction ):
4797
+ R = P ._laurent_poly_ring
4798
+ else :
4799
+ from sage .rings .lazy_series_ring import LazySymmetricFunctions
4800
+ R = g .parent ()
4801
+ P = LazySymmetricFunctions (R )
4802
+ g = P (g )
4803
+
4797
4804
p = R .realization_of ().p ()
4798
4805
# TODO: does the following introduce a memory leak?
4799
4806
g = Stream_map_coefficients (g ._coeff_stream , p )
0 commit comments