This file is indexed.

/usr/share/axiom-20170501/src/algebra/RRCC.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
)abbrev category RRCC RealRootCharacterizationCategory
++ Author: Renaud Rioboo
++ Date Created: summer 1992
++ Date Last Updated: January 2004
++ Description:
++ \axiomType{RealRootCharacterizationCategory} provides common access
++ functions for all real roots of polynomials

RealRootCharacterizationCategory(TheField,ThePols) : Category == SIG where
  TheField : Join(OrderedRing, Field)
  ThePols : UnivariatePolynomialCategory(TheField)

  Z ==> Integer
  N ==> PositiveInteger

  SIG ==> SetCategory with

    sign : ( ThePols, $ ) -> Z
      ++ \axiom{sign(pol,aRoot)} gives the sign of \axiom{pol}
      ++ interpreted as \axiom{aRoot}

    zero? : ( ThePols, $ ) -> Boolean
      ++ \axiom{zero?(pol,aRoot)} answers if \axiom{pol}
      ++ interpreted as \axiom{aRoot} is \axiom{0}

    negative? : ( ThePols, $ ) -> Boolean
      ++ \axiom{negative?(pol,aRoot)} answers if \axiom{pol}
      ++ interpreted as \axiom{aRoot} is negative

    positive? : ( ThePols, $ ) -> Boolean
      ++ \axiom{positive?(pol,aRoot)} answers if \axiom{pol}
      ++ interpreted as \axiom{aRoot} is positive

    recip : ( ThePols, $ ) -> Union(ThePols,"failed") 
      ++ \axiom{recip(pol,aRoot)} tries to inverse \axiom{pol}
      ++ interpreted as \axiom{aRoot}

    definingPolynomial : $ -> ThePols
      ++ \axiom{definingPolynomial(aRoot)} gives a polynomial
      ++ such that \axiom{definingPolynomial(aRoot).aRoot = 0} 

    allRootsOf : ThePols -> List $
      ++ \axiom{allRootsOf(pol)} creates all the roots of \axiom{pol} 
      ++ in the Real Closure, assumed in order.

    rootOf : ( ThePols, N ) -> Union($,"failed")
      ++ \axiom{rootOf(pol,n)} gives the nth root for the order of the
      ++ Real Closure

    approximate : (ThePols,$,TheField) -> TheField
      ++ \axiom{approximate(term,root,prec)} gives an approximation 
      ++ of \axiom{term} over \axiom{root} with precision \axiom{prec}

    relativeApprox : (ThePols,$,TheField) -> TheField
      ++ \axiom{approximate(term,root,prec)} gives an approximation 
      ++ of \axiom{term} over \axiom{root} with precision \axiom{prec}

   add

     zero?(toTest, rootChar) == 
       sign(toTest, rootChar) = 0
                
     negative?(toTest, rootChar) == 
       sign(toTest, rootChar) < 0              
        
     positive?(toTest, rootChar) == 
       sign(toTest, rootChar) > 0

     rootOf(pol,n) ==
       liste:List($):= allRootsOf(pol)
       # liste > n => "failed"
       liste.n

     recip(toInv,rootChar) ==
       degree(toInv) = 0 => 
         res := recip(leadingCoefficient(toInv))
         if (res case "failed") then "failed" else (res::TheField::ThePols)
       defPol := definingPolynomial(rootChar)
       d := principalIdeal([defPol,toInv])
       zero?(d.generator,rootChar) => "failed"
       if (degree(d.generator) ^= 0 )
       then
         defPol := (defPol exquo (d.generator))::ThePols
         d := principalIdeal([defPol,toInv])
       d.coef.2