This file is indexed.

/usr/share/axiom-20170501/src/algebra/UTSCAT.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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
)abbrev category UTSCAT UnivariateTaylorSeriesCategory
++ Author: Clifton J. Williamson
++ Date Created: 21 December 1989
++ Date Last Updated: 26 May 1994
++ Description:
++ \spadtype{UnivariateTaylorSeriesCategory} is the category of Taylor
++ series in one variable.

UnivariateTaylorSeriesCategory(Coef) : Category == SIG where
  Coef  : Ring

  I    ==> Integer
  L    ==> List
  NNI  ==> NonNegativeInteger
  OUT  ==> OutputForm
  RN   ==> Fraction Integer
  STTA ==> StreamTaylorSeriesOperations Coef
  STTF ==> StreamTranscendentalFunctions Coef
  STNC ==> StreamTranscendentalFunctionsNonCommutative Coef
  Term ==> Record(k:NNI,c:Coef)

  SIG ==> UnivariatePowerSeriesCategory(Coef,NNI) with

    series : Stream Term -> %
      ++ \spad{series(st)} creates a series from a stream of non-zero terms,
      ++ where a term is an exponent-coefficient pair.  The terms in the
      ++ stream should be ordered by increasing order of exponents.

    coefficients : % -> Stream Coef
      ++ \spad{coefficients(a0 + a1 x + a2 x**2 + ...)} returns a stream
      ++ of coefficients: \spad{[a0,a1,a2,...]}. The entries of the stream
      ++ may be zero.

    series : Stream Coef -> %
      ++ \spad{series([a0,a1,a2,...])} is the Taylor series
      ++ \spad{a0 + a1 x + a2 x**2 + ...}.

    quoByVar : % -> %
      ++ \spad{quoByVar(a0 + a1 x + a2 x**2 + ...)}
      ++ returns \spad{a1 + a2 x + a3 x**2 + ...}
      ++ Thus, this function substracts the constant term and divides by
      ++ the series variable.  This function is used when Laurent series
      ++ are represented by a Taylor series and an order.

    multiplyCoefficients : (I -> Coef,%) -> %
      ++ \spad{multiplyCoefficients(f,sum(n = 0..infinity,a[n] * x**n))}
      ++ returns \spad{sum(n = 0..infinity,f(n) * a[n] * x**n)}.
      ++ This function is used when Laurent series are represented by
      ++ a Taylor series and an order.

    polynomial : (%,NNI) -> Polynomial Coef
      ++ \spad{polynomial(f,k)} returns a polynomial consisting of the sum
      ++ of all terms of f of degree \spad{<= k}.

    polynomial : (%,NNI,NNI) -> Polynomial Coef
      ++ \spad{polynomial(f,k1,k2)} returns a polynomial consisting of the
      ++ sum of all terms of f of degree d with \spad{k1 <= d <= k2}.

    if Coef has Field then

      "**" : (%,Coef) -> %
        ++ \spad{f(x) ** a} computes a power of a power series.
        ++ When the coefficient ring is a field, we may raise a series
        ++ to an exponent from the coefficient ring provided that the
        ++ constant coefficient of the series is 1.

    if Coef has Algebra Fraction Integer then

      integrate : % -> %
        ++ \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.

      if Coef has integrate: (Coef,Symbol) -> Coef and _
         Coef has variables: Coef -> List Symbol then

        integrate : (%,Symbol) -> %
          ++ \spad{integrate(f(x),y)} returns an anti-derivative of the
          ++ power series \spad{f(x)} with respect to the variable \spad{y}.

      if Coef has TranscendentalFunctionCategory and _
         Coef has PrimitiveFunctionCategory and _
         Coef has AlgebraicallyClosedFunctionSpace Integer then

        integrate : (%,Symbol) -> %
          ++ \spad{integrate(f(x),y)} returns an anti-derivative of
          ++ the power series \spad{f(x)} with respect to the variable
          ++ \spad{y}.

      RadicalCategory
        --++ We provide rational powers when we can divide coefficients
        --++ by integers.

      TranscendentalFunctionCategory
        --++ We provide transcendental functions when we can divide
        --++ coefficients by integers.

   add

     zero? x ==
       empty? (coefs := coefficients x) => true
       (zero? frst coefs) and (empty? rst coefs) => true
       false
 
 --% OutputForms
 
 --  We provide defaulr output functions on UTSCAT using the functions
 --  'coefficients', 'center', and 'variable'.
 
     factorials?: () -> Boolean
     -- check a global Lisp variable
     factorials?() == false
 
     termOutput: (I,Coef,OUT) -> OUT
     termOutput(k,c,vv) ==
     -- creates a term c * vv ** k
       k = 0 => c :: OUT
       mon := (k = 1 => vv; vv ** (k :: OUT))
       c = 1 => mon
       c = -1 => -mon
       (c :: OUT) * mon
 
     showAll?: () -> Boolean
     -- check a global Lisp variable
     showAll?() == true
 
     coerce(p:%):OUT ==
       empty? (uu := coefficients p) => (0$Coef) :: OUT
       var := variable p; cen := center p
       vv :=
         zero? cen => var :: OUT
         paren(var :: OUT - cen :: OUT)
       n : NNI ; count : NNI := _$streamCount$Lisp
       l : L OUT := empty()
       for n in 0..count while not empty? uu repeat
         if frst(uu) ^= 0 then
           l := concat(termOutput(n :: I,frst uu,vv),l)
         uu := rst uu
       if showAll?() then
         for n in (count + 1).. while explicitEntries? uu and _
                not eq?(uu,rst uu) repeat
           if frst(uu) ^= 0 then
             l := concat(termOutput(n :: I,frst uu,vv),l)
           uu := rst uu
       l :=
         explicitlyEmpty? uu => l
         eq?(uu,rst uu) and frst uu = 0 => l
         concat(prefix("O" :: OUT,[vv ** (n :: OUT)]),l)
       empty? l => (0$Coef) :: OUT
       reduce("+",reverse_! l)
 
     if Coef has Field then

       (x:%) ** (r:Coef) == series power(r,coefficients x)$STTA
 
     if Coef has Algebra Fraction Integer then

       if Coef has CommutativeRing then

         (x:%) ** (y:%)    == series(coefficients x **$STTF coefficients y)
 
         (x:%) ** (r:RN)   == series powern(r,coefficients x)$STTA
 
         exp x == series exp(coefficients x)$STTF
 
         log x == series log(coefficients x)$STTF
 
         sin x == series sin(coefficients x)$STTF
 
         cos x == series cos(coefficients x)$STTF
 
         tan x == series tan(coefficients x)$STTF
 
         cot x == series cot(coefficients x)$STTF
 
         sec x == series sec(coefficients x)$STTF
 
         csc x == series csc(coefficients x)$STTF
 
         asin x == series asin(coefficients x)$STTF
 
         acos x == series acos(coefficients x)$STTF
 
         atan x == series atan(coefficients x)$STTF
 
         acot x == series acot(coefficients x)$STTF
 
         asec x == series asec(coefficients x)$STTF
 
         acsc x == series acsc(coefficients x)$STTF
 
         sinh x == series sinh(coefficients x)$STTF
 
         cosh x == series cosh(coefficients x)$STTF
 
         tanh x == series tanh(coefficients x)$STTF
 
         coth x == series coth(coefficients x)$STTF
 
         sech x == series sech(coefficients x)$STTF
 
         csch x == series csch(coefficients x)$STTF
 
         asinh x == series asinh(coefficients x)$STTF
 
         acosh x == series acosh(coefficients x)$STTF
 
         atanh x == series atanh(coefficients x)$STTF
 
         acoth x == series acoth(coefficients x)$STTF
 
         asech x == series asech(coefficients x)$STTF
 
         acsch x == series acsch(coefficients x)$STTF
 
       else

         (x:%) ** (y:%) == series(coefficients x **$STNC coefficients y)
 
         (x:%) ** (r:RN) ==
           coefs := coefficients x
           empty? coefs =>
             positive? r => 0
             zero? r => error "0**0 undefined"
             error "0 raised to a negative power"
           not (frst coefs = 1) =>
             error "**: constant coefficient should be 1"
           coefs := concat(0,rst coefs)
           onePlusX := monom(1,0)$STTA + $STTA monom(1,1)$STTA
           ratPow := powern(r,onePlusX)$STTA
           series compose(ratPow,coefs)$STTA
 
         exp x == series exp(coefficients x)$STNC
 
         log x == series log(coefficients x)$STNC
 
         sin x == series sin(coefficients x)$STNC
 
         cos x == series cos(coefficients x)$STNC
 
         tan x == series tan(coefficients x)$STNC
 
         cot x == series cot(coefficients x)$STNC
 
         sec x == series sec(coefficients x)$STNC
 
         csc x == series csc(coefficients x)$STNC
 
         asin x == series asin(coefficients x)$STNC
 
         acos x == series acos(coefficients x)$STNC
 
         atan x == series atan(coefficients x)$STNC
 
         acot x == series acot(coefficients x)$STNC
 
         asec x == series asec(coefficients x)$STNC
 
         acsc x == series acsc(coefficients x)$STNC
 
         sinh x == series sinh(coefficients x)$STNC
 
         cosh x == series cosh(coefficients x)$STNC
 
         tanh x == series tanh(coefficients x)$STNC
 
         coth x == series coth(coefficients x)$STNC
 
         sech x == series sech(coefficients x)$STNC
 
         csch x == series csch(coefficients x)$STNC
 
         asinh x == series asinh(coefficients x)$STNC
 
         acosh x == series acosh(coefficients x)$STNC
 
         atanh x == series atanh(coefficients x)$STNC
 
         acoth x == series acoth(coefficients x)$STNC
 
         asech x == series asech(coefficients x)$STNC
 
         acsch x == series acsch(coefficients x)$STNC