@@ -4656,7 +4656,7 @@ def derivative_with_respect_to_p1(self, n=1):
4656
4656
return P .element_class (P , coeff_stream )
4657
4657
4658
4658
def functorial_composition (self , * args ):
4659
- r"""Returns the functorial composition of ``self`` and ``g``.
4659
+ r"""Return the functorial composition of ``self`` and ``g``.
4660
4660
4661
4661
If `F` and `G` are species, their functorial composition is the species
4662
4662
`F \Box G` obtained by setting `(F \Box G) [A] = F[ G[A] ]`.
@@ -4704,6 +4704,32 @@ def functorial_composition(self, *args):
4704
4704
8
4705
4705
4706
4706
labellings of their vertices with two 1's and two 2's.
4707
+
4708
+
4709
+ The derivative of the symmetric function `\sum_n h_n`, times
4710
+ `p_1` is the neutral element with respect to functorial
4711
+ composition::
4712
+
4713
+ sage: p = SymmetricFunctions(QQ).p()
4714
+ sage: h = SymmetricFunctions(QQ).h()
4715
+ sage: L = LazySymmetricFunctions(h)
4716
+ sage: E = L(lambda n: h[n])
4717
+ sage: Ep = p[1]*E.derivative_with_respect_to_p1(); Ep
4718
+ h[1] + (h[1,1]) + (h[2,1]) + (h[3,1]) + (h[4,1]) + (h[5,1]) + O^7
4719
+ sage: f = L(lambda n: randint(3, 6)*h[n])
4720
+ sage: f - Ep.functorial_composition(f)
4721
+ O^7
4722
+
4723
+ TESTS:
4724
+
4725
+ Check a corner case::
4726
+
4727
+ sage: L = LazySymmetricFunctions(h)
4728
+ sage: Ep = L(lambda n: h[n-1]*h[1], valuation=1); Ep
4729
+ h[1] + (h[1,1]) + (h[2,1]) + (h[3,1]) + (h[4,1]) + (h[5,1]) + (h[6,1]) + O^8
4730
+ sage: Ep.functorial_composition(L([3*h[0]]))
4731
+ 3*h[]
4732
+
4707
4733
"""
4708
4734
if len (args ) != self .parent ()._arity :
4709
4735
raise ValueError ("arity must be equal to the number of arguments provided" )
0 commit comments