StreamTaylorSeriesOperationsCategory(R, M)¶
sttaylor.spad line 1 [edit on github]
R: Ring
M: LeftModule R
This is category specifying operations for Taylor series arithmetic, where a Taylor series is represented by a stream of its coefficients. Relevant operations satisfy usual axioms like Ring and LeftModule. This category was extracted and generalized from StreamTaylorSeriesOperations to factor out common interface.
*: (M, Stream R) -> Stream M if M has RightModule R
- *: (R, Stream M) -> Stream M
r * areturns the power series scalar multiplication ofrbya:r * [a0, a1, ...] = [r * a0, r * a1, ...]
- *: (Stream M, R) -> Stream M if M has RightModule R
a * rreturns the power series scalar multiplication ofabyr:[a0, a1, ...] * r = [a0 * r, a1 * r, ...]
- *: (Stream R, Stream M) -> Stream M
a * breturns the power series (Cauchy) product ofaandb:[a0, a1, ...] * [b0, b1, ...] = [c0, c1, ...]whereck = sum(i + j = k, ai * bk).
- +: (Stream M, Stream M) -> Stream M
a + breturns the power series sum ofaandb:[a0, a1, ..] + [b0, b1, ..] = [a0 + b0, a1 + b1, ..]
- -: (Stream M, Stream M) -> Stream M
a - breturns the power series difference ofaandb:[a0, a1, ..] - [b0, b1, ..] = [a0 - b0, a1 - b1, ..]
- -: Stream M -> Stream M
- areturns the power series negative ofa:- [a0, a1, ...] = [- a0, - a1, ...]
- addiag: Stream Stream M -> Stream M
addiag(x)performs diagonal addition of a stream of streams. ifx = [[a<0, 0>, a<0, 1>, ..], [a<1, 0>, a<1, 1>, ..], [a<2, 0>, a<2, 1>, ..], ..]andaddiag(x) = [b<0, b<1>, ...], thenb<k> = sum(i+j=k, a<i, j>).
- coerce: M -> Stream M
coerce(r)converts a module elementrto a stream with one element.
- compose: (Stream M, Stream R) -> Stream M if M has RightModule R
compose(a, b)composes the power seriesawith the power seriesb.
- deriv: Stream M -> Stream M
deriv(a)returns the derivative of the power series with respect to the power series variable. Thusderiv([a0, a1, a2, ...])returns[a1, 2 a2, 3 a3, ...].
- eval: (Stream M, R) -> Stream M if M has RightModule R
eval(a, r)returns a stream of partial sums of the power seriesaevaluated at the power series variable equal tor.
- gderiv: (Integer -> R, Stream M) -> Stream M
gderiv(f, [a0, a1, a2, ..])returns[f(0)*a0, f(1)*a1, f(2)*a2, ..].
- int: R -> Stream R
int(r)returns [r,r+1,r+2, …], whereris a ring element.
- integrate: (M, Stream M) -> Stream M if R has Algebra Fraction Integer
integrate(r, a)returns the integral of the power seriesawith respect to the power series variable whererdenotes the constant of integration. Thusintegrate(a, [a0, a1, a2, ...]) = [a, a0, a1/2, a2/3, ...].
- invmultisect: (Integer, Integer, Stream M) -> Stream M
invmultisect(a, b, st)substitutesx^((a+b)*n)forx^nand multiplies byx^b.
- lazyIntegrate: (M, () -> Stream M) -> Stream M if R has Algebra Fraction Integer
lazyIntegrate(r, f)is a version of integrate used for fixed point computations.
- mapmult: (Stream M, Stream R) -> Stream M if M has RightModule R
mapmult([a0, a1, ..], [b0, b1, ..])returns[a0*b0, a1*b1, ..].
- mapmult: (Stream R, Stream M) -> Stream M
mapmult([a0, a1, ..], [b0, b1, ..])returns[a0*b0, a1*b1, ..].