/usr/lib/open-axiom/src/algebra/gseries.spad is in open-axiom-source 1.4.1+svn~2626-2ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 | --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
--met:
--
-- - Redistributions of source code must retain the above copyright
-- notice, this list of conditions and the following disclaimer.
--
-- - Redistributions in binary form must reproduce the above copyright
-- notice, this list of conditions and the following disclaimer in
-- the documentation and/or other materials provided with the
-- distribution.
--
-- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
-- names of its contributors may be used to endorse or promote products
-- derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
)abbrev domain GSERIES GeneralUnivariatePowerSeries
++ Author: Clifton J. Williamson
++ Date Created: 22 September 1993
++ Date Last Updated: June 18, 2010
++ Basic Operations:
++ Related Domains:
++ Also See:
++ AMS Classifications:
++ Keywords: series, Puiseux
++ Examples:
++ References:
++ Description:
++ This is a category of univariate Puiseux series constructed
++ from univariate Laurent series. A Puiseux series is represented
++ by a pair \spad{[r,f(x)]}, where r is a positive rational number and
++ \spad{f(x)} is a Laurent series. This pair represents the Puiseux
++ series \spad{f(x\^r)}.
GeneralUnivariatePowerSeries(Coef,var,cen): Exports == Implementation where
Coef : Ring
var : Symbol
cen : Coef
I ==> Integer
UTS ==> UnivariateTaylorSeries
ULS ==> UnivariateLaurentSeries
UPXS ==> UnivariatePuiseuxSeries
EFULS ==> ElementaryFunctionsUnivariateLaurentSeries
EFUPXS ==> ElementaryFunctionsUnivariatePuiseuxSeries
FS2UPS ==> FunctionSpaceToUnivariatePowerSeries
Exports ==> Join(UnivariatePuiseuxSeriesCategory Coef,_
PartialDifferentialDomain(%,Variable var)) with
coerce: Variable(var) -> %
++ coerce(var) converts the series variable \spad{var} into a
++ Puiseux series.
coerce: UPXS(Coef,var,cen) -> %
++ coerce(f) converts a Puiseux series to a general power series.
if Coef has Algebra Fraction Integer then
integrate: (%,Variable(var)) -> %
++ \spad{integrate(f(x))} returns an anti-derivative of the power
++ series \spad{f(x)} with constant coefficient 0.
++ We may integrate a series when we can divide coefficients
++ by integers.
Implementation ==> UnivariatePuiseuxSeries(Coef,var,cen) add
coerce(upxs:UPXS(Coef,var,cen)) == upxs pretend %
puiseux: % -> UPXS(Coef,var,cen)
puiseux f == f pretend UPXS(Coef,var,cen)
if Coef has Algebra Fraction Integer then
differentiate f ==
str1 : String := "'differentiate' unavailable on this domain; "
str2 : String := "use 'approximate' first"
error concat(str1,str2)
differentiate(f:%,v:Variable(var)) == differentiate f
if Coef has PartialDifferentialRing(Symbol) then
differentiate(f:%,s:Symbol) ==
(s = variable(f)) =>
str1 : String := "'differentiate' unavailable on this domain; "
str2 : String := "use 'approximate' first"
error concat(str1,str2)
dcds := differentiate(center f,s)
deriv := differentiate(puiseux f) :: %
map(differentiate(#1,s),f) - dcds * deriv
integrate f ==
str1 : String := "'integrate' unavailable on this domain; "
str2 : String := "use 'approximate' first"
error concat(str1,str2)
integrate(f:%,v:Variable(var)) == integrate f
if Coef has integrate: (Coef,Symbol) -> Coef and _
Coef has variables: Coef -> List Symbol then
integrate(f:%,s:Symbol) ==
(s = variable(f)) =>
str1 : String := "'integrate' unavailable on this domain; "
str2 : String := "use 'approximate' first"
error concat(str1,str2)
not entry?(s,variables center f) => map(integrate(#1,s),f)
error "integrate: center is a function of variable of integration"
if Coef has TranscendentalFunctionCategory and _
Coef has PrimitiveFunctionCategory and _
Coef has AlgebraicallyClosedFunctionSpace Integer then
integrateWithOneAnswer: (Coef,Symbol) -> Coef
integrateWithOneAnswer(f,s) ==
res := integrate(f,s)$FunctionSpaceIntegration(Integer,Coef)
res case Coef => res :: Coef
first(res :: List Coef)
integrate(f:%,s:Symbol) ==
(s = variable(f)) =>
str1 : String := "'integrate' unavailable on this domain; "
str2 : String := "use 'approximate' first"
error concat(str1,str2)
not entry?(s,variables center f) =>
map(integrateWithOneAnswer(#1,s),f)
error "integrate: center is a function of variable of integration"
|