This file is indexed.

/usr/share/axiom-20170501/src/algebra/NREP.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
)abbrev package NREP NumericRealEigenPackage
++ Author:P. Gianni
++ Date Created:Summer 1990
++ Date Last Updated:Spring 1991
++ Description:
++ This package computes explicitly eigenvalues and eigenvectors of
++ matrices with entries over the Rational Numbers.
++ The results are expressed as floating numbers or as rational numbers
++ depending on the type of the parameter Par.

NumericRealEigenPackage(Par) : SIG == CODE where
  Par : Join(Field,OrderedRing) -- Float or RationalNumber

  SE    ==> Symbol()
  RN    ==> Fraction Integer
  I     ==> Integer
  NF    ==> Float
  CF    ==> Complex Float
  GRN   ==> Complex RN
  GI    ==> Complex Integer
  PI    ==> PositiveInteger
  NNI   ==> NonNegativeInteger
  MRN   ==> Matrix RN

  MPar        ==> Matrix Par
  outForm     ==> Record(outval:Par,outmult:Integer,outvect:List MPar)

  SIG ==> with

    characteristicPolynomial : MRN -> Polynomial RN
      ++ characteristicPolynomial(m) returns the characteristic polynomial
      ++ of the matrix m expressed as polynomial
      ++ over RN with a new symbol as variable.
      -- while the function in EigenPackage returns Fraction P RN.

    characteristicPolynomial : (MRN,SE) -> Polynomial RN
      ++ characteristicPolynomial(m,x) returns the characteristic polynomial
      ++ of the matrix m expressed as polynomial
      ++ over RN with variable x.
      -- while the function in EigenPackage returns
      ++ Fraction P RN.

    realEigenvalues : (MRN,Par) -> List Par
      ++ realEigenvalues(m,eps) computes the eigenvalues of the matrix
      ++ m to precision eps. The eigenvalues are expressed as floats or
      ++ rational numbers depending on the type of eps (float or rational).

    realEigenvectors : (MRN,Par) -> List(outForm)
      ++ realEigenvectors(m,eps)  returns a list of
      ++ records each one containing
      ++ a real eigenvalue, its algebraic multiplicity, and a list of
      ++ associated eigenvectors. All these results
      ++ are computed to precision eps as floats or rational
      ++ numbers depending on the type of eps .

  CODE ==> add

     import InnerNumericEigenPackage(RN, Par, Par)

     characteristicPolynomial(m:MRN) : Polynomial RN ==
       x:SE:=new()$SE
       multivariate(charpol(m),x)

            ----  characteristic polynomial of a matrix A ----
     characteristicPolynomial(A:MRN,x:SE):Polynomial RN ==
       multivariate(charpol(A),x)

     realEigenvalues(m:MRN,eps:Par) : List Par  ==
       solve1(charpol m, eps)

     realEigenvectors(m:MRN,eps:Par) :List outForm ==
       innerEigenvectors(m,eps,factor$GenUFactorize(RN))