diff options
author | dos-reis <gdr@axiomatics.org> | 2009-10-27 08:19:58 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-10-27 08:19:58 +0000 |
commit | b8c7060a72642d8b42d063c6d1d99c1c237ed652 (patch) | |
tree | 6afaa4d2989edae63d8cad2543aadbda8f185ed2 /src/algebra/taylor.spad.pamphlet | |
parent | 280fb471191bf68be050a8e13a620262705b56d4 (diff) | |
download | open-axiom-b8c7060a72642d8b42d063c6d1d99c1c237ed652.tar.gz |
* algebra/taylor.spad.pamphlet (InnerTaylorSeries): Now satisfies
BiModule(Coef,Coef). Remove duplicate exports. Use rep and per
operators.
Diffstat (limited to 'src/algebra/taylor.spad.pamphlet')
-rw-r--r-- | src/algebra/taylor.spad.pamphlet | 60 |
1 files changed, 25 insertions, 35 deletions
diff --git a/src/algebra/taylor.spad.pamphlet b/src/algebra/taylor.spad.pamphlet index 48f29f56..3f4aa0ef 100644 --- a/src/algebra/taylor.spad.pamphlet +++ b/src/algebra/taylor.spad.pamphlet @@ -14,7 +14,7 @@ )abbrev domain ITAYLOR InnerTaylorSeries ++ Author: Clifton J. Williamson ++ Date Created: 21 December 1989 -++ Date Last Updated: 25 February 1989 +++ Date Last Updated: October 26, 2009 ++ Basic Operations: ++ Related Domains: UnivariateTaylorSeries(Coef,var,cen) ++ Also See: @@ -36,7 +36,7 @@ InnerTaylorSeries(Coef): Exports == Implementation where ST ==> Stream Coef STT ==> StreamTaylorSeriesOperations Coef - Exports ==> Ring with + Exports == Join(Ring, BiModule(Coef,Coef)) with coefficients: % -> Stream Coef ++\spad{coefficients(x)} returns a stream of ring elements. ++ When x is a univariate series, this is a stream of Taylor @@ -59,41 +59,29 @@ InnerTaylorSeries(Coef): Exports == Implementation where ++ i.e. the degree of the first non-zero term of the series. order: (%,NNI) -> NNI ++\spad{order(x,n)} returns the minimum of n and the order of x. - * : (Coef,%)->% - ++\spad{c*x} returns the product of c and the series x. - * : (%,Coef)->% - ++\spad{x*c} returns the product of c and the series x. * : (%,Integer)->% ++\spad{x*i} returns the product of integer i and the series x. if Coef has IntegralDomain then IntegralDomain --++ An IntegralDomain provides 'exquo' - Implementation ==> add - - Rep := Stream Coef + Implementation == add ---% declarations - x,y: % - ---% definitions + Rep == ST -- In what follows, we will be calling operations on Streams -- which are NOT defined in the package Stream. Thus, it is -- necessary to explicitly pass back and forth between Rep and %. - -- This will be done using the functions 'stream' and 'series'. - stream : % -> Stream Coef - stream x == x pretend Stream(Coef) - series st == st pretend % + series st == per st - 0 == coerce(0)$STT - 1 == coerce(1)$STT + 0 == per coerce(0)$STT + 1 == per coerce(1)$STT x = y == -- tests if two power series are equal -- difference must be a finite stream of zeroes of length <= n + 1, -- where n = $streamCount$Lisp - st : ST := stream(x - y) + st : ST := rep(x - y) n : I := _$streamCount$Lisp for i in 0..n repeat empty? st => return true @@ -101,26 +89,26 @@ InnerTaylorSeries(Coef): Exports == Implementation where st := rst st empty? st - coefficients x == stream x + coefficients x == rep x - x + y == stream(x) +$STT stream(y) - x - y == stream(x) -$STT stream(y) - (x:%) * (y:%) == stream(x) *$STT stream(y) - - x == -$STT (stream x) - (i:I) * (x:%) == (i::Coef) *$STT stream x - (x:%) * (i:I) == stream(x) *$STT (i::Coef) - (c:Coef) * (x:%) == c *$STT stream x - (x:%) * (c:Coef) == stream(x) *$STT c + x + y == per(rep x +$STT rep y) + x - y == per(rep x -$STT rep y) + (x:%) * (y:%) == per(rep x *$STT rep y) + - x == per(-$STT rep x) + (i:I) * (x:%) == per((i::Coef) *$STT rep x) + (x:%) * (i:I) == per(rep x *$STT (i::Coef)) + (c:Coef) * (x:%) == per(c *$STT rep x) + (x:%) * (c:Coef) == per(rep x *$STT c) recip x == - (rec := recip$STT stream x) case "failed" => "failed" - series(rec :: ST) + (rec := recip$STT rep x) case "failed" => "failed" + per(rec :: ST) if Coef has IntegralDomain then x exquo y == - (quot := stream(x) exquo$STT stream(y)) case "failed" => "failed" - series(quot :: ST) + (quot := rep x exquo$STT rep y) case "failed" => "failed" + per(quot :: ST) x:% ** n:NNI == n = 0 => 1 @@ -135,7 +123,7 @@ InnerTaylorSeries(Coef): Exports == Implementation where zero? frst st => iOrder(rst st,n + 1,n0) n - order(x,n) == iOrder(stream x,0,n) + order(x,n) == iOrder(rep x,0,n) iOrder2: (ST,NNI) -> NNI iOrder2(st,n) == @@ -143,7 +131,9 @@ InnerTaylorSeries(Coef): Exports == Implementation where zero? frst st => iOrder2(rst st,n + 1) n - order x == iOrder2(stream x,0) + order x == iOrder2(rep x,0) + + zero? x == empty? rep x @ \section{domain UTS UnivariateTaylorSeries} |