/usr/share/axiom-20170501/src/algebra/UPSCAT.spad is in axiom-source 20170501-3.
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 | )abbrev category UPSCAT UnivariatePowerSeriesCategory
++ Author: Clifton J. Williamson
++ Date Created: 21 December 1989
++ Date Last Updated: 20 September 1993
++ Description:
++ \spadtype{UnivariatePowerSeriesCategory} is the most general
++ univariate power series category with exponents in an ordered
++ abelian monoid.
++ Note that this category exports a substitution function if it is
++ possible to multiply exponents.
++ Also note that this category exports a derivative operation if it is
++ possible to multiply coefficients by exponents.
UnivariatePowerSeriesCategory(Coef,Expon) : Category == SIG where
Coef : Ring
Expon : OrderedAbelianMonoid
Term ==> Record(k:Expon,c:Coef)
SIG ==> PowerSeriesCategory(Coef,Expon,SingletonAsOrderedSet) with
terms : % -> Stream Term
++ \spad{terms(f(x))} returns a stream of non-zero terms, where a
++ a term is an exponent-coefficient pair. The terms in the stream
++ are ordered by increasing order of exponents.
elt : (%,Expon) -> Coef
++ \spad{elt(f(x),r)} returns the coefficient of the term of degree r in
++ \spad{f(x)}. This is the same as the function \spadfun{coefficient}.
variable : % -> Symbol
++ \spad{variable(f)} returns the (unique) power series variable of
++ the power series f.
center : % -> Coef
++ \spad{center(f)} returns the point about which the series f is
++ expanded.
multiplyExponents : (%,PositiveInteger) -> %
++ \spad{multiplyExponents(f,n)} multiplies all exponents of the power
++ series f by the positive integer n.
order : % -> Expon
++ \spad{order(f)} is the degree of the lowest order non-zero term in f.
++ This will result in an infinite loop if f has no non-zero terms.
order : (%,Expon) -> Expon
++ \spad{order(f,n) = min(m,n)}, where m is the degree of the
++ lowest order non-zero term in f.
truncate : (%,Expon) -> %
++ \spad{truncate(f,k)} returns a (finite) power series consisting of
++ the sum of all terms of f of degree \spad{<= k}.
truncate : (%,Expon,Expon) -> %
++ \spad{truncate(f,k1,k2)} returns a (finite) power
++ series consisting of
++ the sum of all terms of f of degree d with \spad{k1 <= d <= k2}.
if Coef has coerce: Symbol -> Coef then
if Coef has "**":(Coef,Expon) -> Coef then
approximate : (%,Expon) -> Coef
++ \spad{approximate(f)} returns a truncated power series with the
++ series variable viewed as an element of the coefficient domain.
extend : (%,Expon) -> %
++ \spad{extend(f,n)} causes all terms of f of degree <= n
++ to be computed.
if Expon has SemiGroup then Eltable(%,%)
if Coef has "*": (Expon,Coef) -> Coef then
DifferentialRing
--!! DifferentialExtension Coef
if Coef has PartialDifferentialRing Symbol then
PartialDifferentialRing Symbol
if Coef has "**": (Coef,Expon) -> Coef then
eval : (%,Coef) -> Stream Coef
++ \spad{eval(f,a)} evaluates a power series at a value in the
++ ground ring by returning a stream of partial sums.
add
degree f == order f
leadingCoefficient f == coefficient(f,order f)
leadingMonomial f ==
ord := order f
monomial(coefficient(f,ord),ord)
monomial(f:%,listVar:List SingletonAsOrderedSet,listExpon:List Expon) ==
empty? listVar or not empty? rest listVar =>
error "monomial: variable list must have exactly one entry"
empty? listExpon or not empty? rest listExpon =>
error "monomial: exponent list must have exactly one entry"
f * monomial(1,first listExpon)
monomial(f:%,v:SingletonAsOrderedSet,n:Expon) ==
f * monomial(1,n)
reductum f == f - leadingMonomial f
variables f == list create()
|