This file is indexed.

/usr/share/axiom-20170501/src/algebra/GENUFACT.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
)abbrev package GENUFACT GenUFactorize
++ Description:
++ This package provides operations for the factorization 
++ of univariate polynomials with integer
++ coefficients. The factorization is done by "lifting" the
++ finite "berlekamp's" factorization

GenUFactorize(R) : SIG == CODE where
  R : EuclideanDomain

  PR  ==>  SparseUnivariatePolynomial R  -- with factor
            -- should be UnivariatePolynomialCategory
  NNI ==>  NonNegativeInteger
  SUP ==>  SparseUnivariatePolynomial
 
  SIG ==> with

     factor : PR  -> Factored PR
       ++ factor(p) returns the factorisation of p
 
  CODE ==> add

    -- Factorisation currently fails when algebraic extensions have multiple
    -- generators.
    factorWarning(f:OutputForm):Void ==
      import AnyFunctions1(String)
      import AnyFunctions1(OutputForm)
      outputList(["WARNING (genufact): No known algorithm to factor "::Any, _
              f::Any, _
              ", trying square-free."::Any])$OutputPackage
 
    factor(f:PR) : Factored PR ==
      R is Integer => (factor f)$GaloisGroupFactorizer(PR)
      R is Fraction Integer  =>
                                (factor f)$RationalFactorize(PR)
      R has FiniteFieldCategory =>
                                (factor f)$DistinctDegreeFactorize(R,PR)
      R is (Complex Integer) => (factor f)$ComplexFactorization(Integer,PR)
      R is (Complex Fraction Integer) =>
                           (factor f)$ComplexFactorization(Fraction Integer,PR)
      R is AlgebraicNumber =>   (factor f)$AlgFactor(PR)
   -- following is to handle SAE
      R has generator : () -> R =>
        var := symbol(convert(generator()::OutputForm)@InputForm)
        up:=UnivariatePolynomial(var,Fraction Integer)
        R has MonogenicAlgebra(Fraction Integer, up) =>
           factor(f)$SimpleAlgebraicExtensionAlgFactor(up, R, PR)
        upp:=UnivariatePolynomial(var,Fraction Polynomial Integer)
        R has MonogenicAlgebra(Fraction Polynomial Integer, upp) =>
           factor(f)$SAERationalFunctionAlgFactor(upp, R, PR)
        factorWarning(f::OutputForm)
        squareFree f            
      factorWarning(f::OutputForm)
      squareFree f