This file is indexed.

/usr/share/axiom-20170501/src/algebra/FFSLPE.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
)abbrev package FFSLPE FiniteFieldSolveLinearPolynomialEquation
++ Author: Davenport
++ Date Created: 1991
++ Description:
++ This package solves linear diophantine equations for Bivariate polynomials
++ over finite fields

FiniteFieldSolveLinearPolynomialEquation(F,FP,FPP) : SIG == CODE where
  F : FiniteFieldCategory
  FP : UnivariatePolynomialCategory F
  FPP : UnivariatePolynomialCategory FP

  SIG ==> with

    solveLinearPolynomialEquation : (List FPP, FPP) -> Union(List FPP,"failed")
      ++ solveLinearPolynomialEquation([f1, ..., fn], g)
      ++ (where the fi are relatively prime to each other)
      ++ returns a list of ai such that
      ++ \spad{g/prod fi = sum ai/fi}
      ++ or returns "failed" if no such list of ai's exists.

  CODE ==> add

     oldlp:List FPP := []
     slpePrime: FP := monomial(1,1)
     oldtable:Vector List FPP := []
     lp: List FPP
     p: FPP
     import DistinctDegreeFactorize(F,FP)

     solveLinearPolynomialEquation(lp,p) ==
       if (oldlp ^= lp) then
          -- we have to generate a new table
          deg:= +/[degree u for u in lp]
          ans:Union(Vector List FPP,"failed"):="failed"
          slpePrime:=monomial(1,1)+monomial(1,0)   -- x+1: our starting guess
          while (ans case "failed") repeat
            ans:=tablePow(deg,slpePrime,lp)$GenExEuclid(FP,FPP)
            if (ans case "failed") then
               slpePrime:= nextItem(slpePrime)::FP
               while (degree slpePrime > 1) and
                     not irreducible? slpePrime repeat
                 slpePrime := nextItem(slpePrime)::FP
          oldtable:=(ans:: Vector List FPP)
       answer:=solveid(p,slpePrime,oldtable)
       answer