This file is indexed.

/usr/share/axiom-20170501/src/algebra/NTPOLFN.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
)abbrev package NTPOLFN NumberTheoreticPolynomialFunctions
++ Author: Stephen M. Watt
++ Date Created:  1990
++ Date Last Updated: June 25, 1991
++ Description:
++ This package provides polynomials as functions on a ring.

NumberTheoreticPolynomialFunctions(R) : SIG == CODE where
  R : CommutativeRing

  NNI ==> NonNegativeInteger
  RN  ==> Fraction Integer

  SIG ==> with

    cyclotomic : (NNI, R) -> R
      ++ cyclotomic(n,r) \undocumented

    if R has Algebra RN then

      bernoulliB : (NNI, R) -> R
        ++ bernoulliB(n,r) \undocumented

      eulerE : (NNI, R) -> R
        ++ eulerE(n,r) \undocumented

  CODE ==> add

        import PolynomialNumberTheoryFunctions()

        I   ==> Integer
        SUP ==> SparseUnivariatePolynomial

        -- This is the wrong way to evaluate the polynomial.
        cyclotomic(k, x) ==
            p: SUP(I) := cyclotomic(k)
            r: R      := 0
            while p ^= 0 repeat
                d := degree p
                c := leadingCoefficient p
                p := reductum p
                r := c*x**d + r
            r

        if R has Algebra RN then

            eulerE(k, x) ==
                p: SUP(RN) := euler(k)
                r: R       := 0
                while p ^= 0 repeat
                    d := degree p
                    c := leadingCoefficient p
                    p := reductum p
                    r := c*x**d + r
                r

            bernoulliB(k, x) ==
                p: SUP(RN) := bernoulli(k)
                r: R       := 0
                while p ^= 0 repeat
                    d := degree p
                    c := leadingCoefficient p
                    p := reductum p
                    r := c*x**d + r
                r