From 28d261c72d6347990c751e43e4fc5604716f301c Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 14 Feb 2010 09:23:15 +0000 Subject: * algebra/sttaylor.spad.pamphlet (revert$StreamTaylorSeriesOperations): Tidy. --- src/algebra/sttaylor.spad.pamphlet | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/algebra/sttaylor.spad.pamphlet') diff --git a/src/algebra/sttaylor.spad.pamphlet b/src/algebra/sttaylor.spad.pamphlet index ba55cf92..756129a8 100644 --- a/src/algebra/sttaylor.spad.pamphlet +++ b/src/algebra/sttaylor.spad.pamphlet @@ -111,7 +111,7 @@ StreamTaylorSeriesOperations(A): Exports == Implementation where ++ revert(a) computes the inverse of a power series \spad{a} ++ with respect to composition. ++ the series should have constant coefficient 0 and first - ++ order coefficient 1. + ++ order coefficient should be invertible. addiag : ST ST A -> ST A ++ addiag(x) performs diagonal addition of a stream of streams. if x = ++ \spad{[[a<0,0>,a<0,1>,..],[a<1,0>,a<1,1>,..],[a<2,0>,a<2,1>,..],..]} @@ -311,10 +311,11 @@ StreamTaylorSeriesOperations(A): Exports == Implementation where revert x == empty? x => error "revert should start 0,1,..." - zero? frst x => - empty? rst x => error "revert: should start 0,1,..." - one? frst rst x => lagrange(recip(rst x) :: (ST A)) - error "revert:should start 0,1,..." + zero? frst x and not empty? rst x => + case recip rst x is + y@ST(A) => lagrange y + otherwise => error "revert: should start 0,a,... with invertible a" + error "revert: argument is not reversible" --% lambert functions -- cgit v1.2.3