This file is indexed.

/usr/share/axiom-20170501/src/algebra/FSRED.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
)abbrev package FSRED FunctionSpaceReduce
++ Author: Manuel Bronstein
++ Date Created: 1988
++ Date Last Updated: 11 Jul 1990
++ Description:
++ Reduction from a function space to the rational numbers
++ This package provides function which replaces transcendental kernels
++ in a function space by random integers. The correspondence between
++ the kernels and the integers is fixed between calls to new().

FunctionSpaceReduce(R, F) : SIG == CODE where
  R : Join(OrderedSet, IntegralDomain, RetractableTo Integer)
  F : FunctionSpace R

  Z   ==> Integer
  Q   ==> Fraction Integer
  UP  ==> SparseUnivariatePolynomial Q
  K   ==> Kernel F
  ALGOP  ==> "%alg"

  SIG ==> with

    bringDown : F -> Q
      ++ bringDown(f) \undocumented

    bringDown : (F, K) -> UP
      ++ bringDown(f,k) \undocumented

    newReduc : () -> Void
      ++ newReduc() \undocumented

  CODE ==> add

    import SparseUnivariatePolynomialFunctions2(F, Q)
    import PolynomialCategoryQuotientFunctions(IndexedExponents K,
                         K, R, SparseMultivariatePolynomial(R, K), F)

    K2Z : K -> F

    redmap := table()$AssociationList(K, Z)

    newReduc() ==
      for k in keys redmap repeat remove_!(k, redmap)
      void

    bringDown(f, k) ==
      ff := univariate(f, k)
      (bc := extendedEuclidean(map(bringDown, denom ff),
                m := map(bringDown, minPoly k), 1)) case "failed" =>
                     error "denominator is 0"
      (map(bringDown, numer ff) * bc.coef1) rem m

    bringDown f ==
      retract(eval(f, lk := kernels f, [K2Z k for k in lk]))@Q

    K2Z k ==
      has?(operator k, ALGOP) => error "Cannot reduce constant field"
      (u := search(k, redmap)) case "failed" =>
                                      setelt(redmap, k, random()$Z)::F
      u::Z::F