All the FormalSeries involved should have the same coefficient ring. The function substitutes the variables in s with the series in the BasicList l. Also note that this also works when s is a FormalGroupLaw which is a subclass of FormalSeries.
i1 : R=ZZ[x,y] o1 = R o1 : PolynomialRing |
i2 : s = series(x^2+x+y,2) 2 o2 = FormalSeries{x + x + y, 2} o2 : FormalSeries |
i3 : substitute(s,{s,s}) 2 2 o3 = FormalSeries{3x + 2x*y + y + 2x + 2y, 2} o3 : FormalSeries |