This file is indexed.

/usr/share/axiom-20170501/src/algebra/FGLMICPK.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
)abbrev package FGLMICPK FGLMIfCanPackage
++ Author: Marc Moreno Maza
++ Date Created: 08/02/1999
++ Date Last Updated: 08/02/1999
++ Description: 
++ This is just an interface between several packages and domains.
++ The goal is to compute lexicographical Groebner bases 
++ of sets of polynomial with type \spadtype{Polynomial R}
++ by the FGLM algorithm if this is possible 
++ (if the input system generates a zero-dimensional ideal).

FGLMIfCanPackage(R,ls) : SIG == CODE where
  R : GcdDomain
  ls : List Symbol

  V ==> OrderedVariableList ls
  N ==> NonNegativeInteger
  Z ==> Integer
  B ==> Boolean
  Q1 ==> Polynomial R
  Q2 ==> HomogeneousDistributedMultivariatePolynomial(ls,R) 
  Q3 ==> DistributedMultivariatePolynomial(ls,R)
  E2 ==> HomogeneousDirectProduct(#ls,NonNegativeInteger)
  E3 ==>  DirectProduct(#ls,NonNegativeInteger)
  poltopol ==> PolToPol(ls, R)
  lingrobpack ==> LinGroebnerPackage(ls,R)
  groebnerpack2 ==> GroebnerPackage(R,E2,V,Q2)
  groebnerpack3 ==> GroebnerPackage(R,E3,V,Q3)

  SIG ==> with

    zeroDimensional? : List(Q1) -> B
      ++ \axiom{zeroDimensional?(lq1)} returns true iff
      ++ \axiom{lq1} generates a zero-dimensional ideal
      ++ w.r.t. the variables of \axiom{ls}.

    fglmIfCan : List(Q1) -> Union(List(Q1), "failed")
      ++ \axiom{fglmIfCan(lq1)} returns the lexicographical Groebner 
      ++ basis of \axiom{lq1} by using the FGLM strategy,
      ++ if \axiom{zeroDimensional?(lq1)} holds.

    groebner : List(Q1) -> List(Q1) 
      ++ \axiom{groebner(lq1)} returns the lexicographical Groebner 
      ++ basis of \axiom{lq1}. If \axiom{lq1} generates a zero-dimensional
      ++ ideal then the FGLM strategy is used, otherwise
      ++ the Sugar strategy is used.

  CODE ==> add

     zeroDim?(lq2: List Q2): Boolean ==
       lq2 := groebner(lq2)$groebnerpack2
       empty? lq2 => false
       #lq2 < #ls => false
       lv: List(V) := [(variable(s)$V)::V for s in ls]
       for q2 in lq2 while not empty?(lv) repeat
          m := leadingMonomial(q2)
          x := mainVariable(m)::V
          if ground?(leadingCoefficient(univariate(m,x))) then
               lv := remove(x, lv)
       empty? lv

     zeroDimensional?(lq1: List(Q1)): Boolean ==
       lq2: List(Q2) := [pToHdmp(q1)$poltopol for q1 in lq1]
       zeroDim?(lq2)

     fglmIfCan(lq1:List(Q1)): Union(List(Q1),"failed") == 
       lq2: List(Q2) := [pToHdmp(q1)$poltopol for q1 in lq1]
       lq2 := groebner(lq2)$groebnerpack2
       not zeroDim?(lq2) => "failed"::Union(List(Q1),"failed")
       lq3: List(Q3) := totolex(lq2)$lingrobpack
       lq1 := [dmpToP(q3)$poltopol for q3 in lq3]
       lq1::Union(List(Q1),"failed")

     groebner(lq1:List(Q1)): List(Q1) ==
       lq2: List(Q2) := [pToHdmp(q1)$poltopol for q1 in lq1]
       lq2 := groebner(lq2)$groebnerpack2
       not zeroDim?(lq2) => 
         lq3: List(Q3) := [pToDmp(q1)$poltopol for q1 in lq1]
         lq3 := groebner(lq3)$groebnerpack3
         [dmpToP(q3)$poltopol for q3 in lq3]
       lq3: List(Q3) := totolex(lq2)$lingrobpack
       [dmpToP(q3)$poltopol for q3 in lq3]