This file is indexed.

/usr/share/axiom-20170501/src/algebra/DEGRED.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
)abbrev package DEGRED DegreeReductionPackage
++ Description:
++ This package has no description

DegreeReductionPackage(R1, R2) : SIG == CODE where
  R1 : Ring
  R2 : Join(IntegralDomain,OrderedSet)
 
  I    ==> Integer
  PI   ==> PositiveInteger
  UP   ==> SparseUnivariatePolynomial
  RE   ==> Expression R2
 
  SIG ==> with

    reduce : UP R1 -> Record(pol: UP R1, deg: PI)
      ++ reduce(p) \undocumented{}

    expand : (RE, PI) -> List RE
      ++ expand(f,n) \undocumented{}
 
  CODE ==> add
 
        degrees(u: UP R1): List Integer ==
            l: List Integer := []
            while u ^= 0 repeat
              l := concat(degree u,l)
              u := reductum u
            l
        reduce(u: UP R1) ==
            g := "gcd"/[d for d in degrees u]
            u := divideExponents(u, g:PI)::(UP R1)
            [u, g:PI]
 
        import Fraction Integer
 
        rootOfUnity(j:I,n:I):RE ==
            j = 0 => 1
            arg:RE := 2*j*pi()/(n::RE)
            cos arg + (-1)**(1/2) * sin arg
 
        expand(s, g) ==
            g = 1 => [s]
            [rootOfUnity(i,g)*s**(1/g) for i in 0..g-1]