StreamTaylorSeriesOperationsCategory(R, M)

sttaylor.spad line 1 [edit on github]

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 * a returns the power series scalar multiplication of r by a: r * [a0, a1, ...] = [r * a0, r * a1, ...]

*: (Stream M, R) -> Stream M if M has RightModule R

a * r returns the power series scalar multiplication of a by r: [a0, a1, ...] * r = [a0 * r, a1 * r, ...]

*: (Stream R, Stream M) -> Stream M

a * b returns the power series (Cauchy) product of a and b: [a0, a1, ...] * [b0, b1, ...] = [c0, c1, ...] where ck = sum(i + j = k, ai * bk).

+: (Stream M, Stream M) -> Stream M

a + b returns the power series sum of a and b: [a0, a1, ..] + [b0, b1, ..] = [a0 + b0, a1 + b1, ..]

-: (Stream M, Stream M) -> Stream M

a - b returns the power series difference of a and b: [a0, a1, ..] - [b0, b1, ..] = [a0 - b0, a1 - b1, ..]

-: Stream M -> Stream M

- a returns the power series negative of a: - [a0, a1, ...] = [- a0, - a1, ...]

addiag: Stream Stream M -> Stream M

addiag(x) performs diagonal addition of a stream of streams. if x = [[a<0, 0>, a<0, 1>, ..], [a<1, 0>, a<1, 1>, ..], [a<2, 0>, a<2, 1>, ..], ..] and addiag(x) = [b<0, b<1>, ...], then b<k> = sum(i+j=k, a<i, j>).

coerce: M -> Stream M

coerce(r) converts a module element r to a stream with one element.

compose: (Stream M, Stream R) -> Stream M if M has RightModule R

compose(a, b) composes the power series a with the power series b.

deriv: Stream M -> Stream M

deriv(a) returns the derivative of the power series with respect to the power series variable. Thus deriv([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 series a evaluated at the power series variable equal to r.

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, …], where r is a ring element.

integers: Integer -> Stream Integer

integers(n) returns [n, n+1, n+2, ...].

integrate: (M, Stream M) -> Stream M if R has Algebra Fraction Integer

integrate(r, a) returns the integral of the power series a with respect to the power series variable where r denotes the constant of integration. Thus integrate(a, [a0, a1, a2, ...]) = [a, a0, a1/2, a2/3, ...].

invmultisect: (Integer, Integer, Stream M) -> Stream M

invmultisect(a, b, st) substitutes x^((a+b)*n) for x^n and multiplies by x^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, ..].

monom: (M, Integer) -> Stream M

monom(coef, deg) is a monomial of degree deg with coefficient coef.

multisect: (Integer, Integer, Stream M) -> Stream M

multisect(a, b, st) selects the coefficients of x^((a+b)*n+a), and changes them to x^n.

oddintegers: Integer -> Stream Integer

oddintegers(n) returns [n, n+2, n+4, ...].