This file is indexed.

/usr/share/axiom-20170501/src/algebra/FRAMALG.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
)abbrev category FRAMALG FramedAlgebra
++ Author: Barry Trager
++ Description:
++ A \spadtype{FramedAlgebra} is a \spadtype{FiniteRankAlgebra} together
++ with a fixed R-module basis.

FramedAlgebra(R,UP) : Category == SIG where
  R : CommutativeRing
  UP : UnivariatePolynomialCategory(R)

  SIG ==> FiniteRankAlgebra(R, UP) with

    basis : () -> Vector %
      ++ basis() returns the fixed R-module basis.

    coordinates : % -> Vector R
      ++ coordinates(a) returns the coordinates of \spad{a} with 
      ++ respect to the fixed R-module basis.

    coordinates : Vector % -> Matrix R
      ++ coordinates([v1,...,vm]) returns the coordinates of the
      ++ vi's with to the fixed basis.  The coordinates of vi are
      ++ contained in the ith row of the matrix returned by this
      ++ function.

    represents : Vector R -> %
      ++ represents([a1,..,an]) returns \spad{a1*v1 + ... + an*vn}, where
      ++ v1, ..., vn are the elements of the fixed basis.

    convert : % -> Vector R
      ++ convert(a) returns the coordinates of \spad{a} with respect to the
      ++ fixed R-module basis.

    convert : Vector R -> %
      ++ convert([a1,..,an]) returns \spad{a1*v1 + ... + an*vn}, where
      ++ v1, ..., vn are the elements of the fixed basis.

    traceMatrix : () -> Matrix R
      ++ traceMatrix() is the n-by-n matrix \spad{(Tr(vi * vj))}, where
      ++ v1, ..., vn are the elements of the fixed basis.

    discriminant : () -> R
      ++ discriminant() = determinant(traceMatrix()).

    regularRepresentation : % -> Matrix R
      ++ regularRepresentation(a) returns the matrix of the linear
      ++ map defined by left multiplication by \spad{a} with respect
      ++ to the fixed basis.

    --attributes
    --separable <=> discriminant() ^= 0

   add

     convert(x:%):Vector(R) == coordinates(x)

     convert(v:Vector R):% == represents(v)

     traceMatrix() == traceMatrix basis()

     discriminant() == discriminant basis()

     regularRepresentation x == regularRepresentation(x, basis())

     coordinates x == coordinates(x, basis())

     represents x == represents(x, basis())
  
     coordinates(v:Vector %) ==
       m := new(#v, rank(), 0)$Matrix(R)
       for i in minIndex v .. maxIndex v for j in minRowIndex m .. repeat
         setRow_!(m, j, coordinates qelt(v, i))
       m
  
     regularRepresentation x ==
       m := new(n := rank(), n, 0)$Matrix(R)
       b := basis()
       for i in minIndex b .. maxIndex b for j in minRowIndex m .. repeat
         setRow_!(m, j, coordinates(x * qelt(b, i)))
       m
  
     characteristicPolynomial x ==
        mat00 := (regularRepresentation x)
        mat0 := map(y+->y::UP,mat00)$MatrixCategoryFunctions2(R, Vector R,
                    Vector R, Matrix R, UP, Vector UP,Vector UP, Matrix UP)
        mat1 : Matrix UP := scalarMatrix(rank(),monomial(1,1)$UP)
        determinant(mat1 - mat0)
  
     if R has Field then
      -- depends on the ordering of results from nullSpace, also see FFP

        minimalPolynomial(x:%):UP ==
          y:%:=1
          n:=rank()
          m:Matrix R:=zero(n,n+1)
          for i in 1..n+1 repeat
            setColumn_!(m,i,coordinates(y))
            y:=y*x
          v:=first nullSpace(m)
          +/[monomial(v.(i+1),i) for i in 0..#v-1]