/usr/share/axiom-20170501/src/algebra/WUTSET.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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | )abbrev domain WUTSET WuWenTsunTriangularSet
++ Author: Marc Moreno Maza (marc@nag.co.uk)
++ Date Created: 11/18/1995
++ Date Last Updated: 12/15/1998
++ References :
++ [1] W. T. WU "A Zero Structure Theorem for polynomial equations solving"
++ MM Research Preprints, 1987.
++ [2] D. M. WANG "An implementation of the characteristic set method in Maple"
++ Proc. DISCO'92. Bath, England.
++ Description:
++ A domain constructor of the category \axiomType{GeneralTriangularSet}.
++ The only requirement for a list of polynomials to be a member of such
++ a domain is the following: no polynomial is constant and two distinct
++ polynomials have distinct main variables. Such a triangular set may
++ not be auto-reduced or consistent. The construct operation
++ does not check the previous requirement. Triangular sets are stored
++ as sorted lists w.r.t. the main variables of their members.
++ Furthermore, this domain exports operations dealing with the
++ characteristic set method of Wu Wen Tsun and some optimizations
++ mainly proposed by Dong Ming Wang.
WuWenTsunTriangularSet(R,E,V,P) : SIG == CODE where
R : IntegralDomain
E : OrderedAbelianMonoidSup
V : OrderedSet
P : RecursivePolynomialCategory(R,E,V)
N ==> NonNegativeInteger
Z ==> Integer
B ==> Boolean
LP ==> List P
A ==> FiniteEdge P
H ==> FiniteSimpleHypergraph P
GPS ==> GeneralPolynomialSet(R,E,V,P)
RBT ==> Record(bas:$,top:LP)
RUL ==> Record(chs:Union($,"failed"),rfs:LP)
pa ==> PolynomialSetUtilitiesPackage(R,E,V,P)
NLpT ==> SplittingNode(LP,$)
ALpT ==> SplittingTree(LP,$)
O ==> OutputForm
OP ==> OutputPackage
SIG ==> TriangularSetCategory(R,E,V,P) with
medialSet : (LP,((P,P)->B),((P,P)->P)) -> Union($,"failed")
++ \axiom{medialSet(ps,redOp?,redOp)} returns \axiom{bs} a basic set
++ (in Wu Wen Tsun sense w.r.t the reduction-test \axiom{redOp?})
++ of some set generating the same ideal as \axiom{ps} (with
++ rank not higher than any basic set of \axiom{ps}), if no non-zero
++ constant polynomials appear during the computatioms, else
++ \axiom{"failed"} is returned. In the former case, \axiom{bs} has to
++ be understood as a candidate for being a characteristic set of
++ \axiom{ps}. In the original algorithm, \axiom{bs} is simply a basic
++ set of \axiom{ps}.
medialSet : LP -> Union($,"failed")
++ \axiom{medial(ps)} returns the same as
++ \axiom{medialSet(ps,initiallyReduced?,initiallyReduce)}.
characteristicSet : (LP,((P,P)->B),((P,P)->P)) -> Union($,"failed")
++ \axiom{characteristicSet(ps,redOp?,redOp)} returns a
++ non-contradictory characteristic set of \axiom{ps} in
++ Wu Wen Tsun sense w.r.t the
++ reduction-test \axiom{redOp?} (using \axiom{redOp} to reduce
++ polynomials w.r.t a \axiom{redOp?} basic set), if no
++ non-zero constant polynomial appear during those reductions,
++ else \axiom{"failed"} is returned.
++ The operations \axiom{redOp} and \axiom{redOp?} must satisfy
++ the following conditions: \axiom{redOp?(redOp(p,q),q)} holds
++ for every polynomials \axiom{p,q} and there exists an integer
++ \axiom{e} and a polynomial \axiom{f} such that we have
++ \axiom{init(q)^e*p = f*q + redOp(p,q)}.
characteristicSet : LP -> Union($,"failed")
++ \axiom{characteristicSet(ps)} returns the same as
++ \axiom{characteristicSet(ps,initiallyReduced?,initiallyReduce)}.
characteristicSerie : (LP,((P,P)->B),((P,P)->P)) -> List $
++ \axiom{characteristicSerie(ps,redOp?,redOp)} returns a list
++ \axiom{lts}
++ of triangular sets such that the zero set of \axiom{ps} is the
++ union of the regular zero sets of the members of \axiom{lts}.
++ This is made by the Ritt and Wu Wen Tsun process applying
++ the operation \axiom{characteristicSet(ps,redOp?,redOp)}
++ to compute characteristic sets in Wu Wen Tsun sense.
characteristicSerie : LP -> List $
++ \axiom{characteristicSerie(ps)} returns the same as
++ \axiom{characteristicSerie(ps,initiallyReduced?,initiallyReduce)}.
CODE ==> GeneralTriangularSet(R,E,V,P) add
removeSquares: $ -> Union($,"failed")
Rep ==> LP
rep(s:$):Rep == s pretend Rep
per(l:Rep):$ == l pretend $
removeAssociates (lp:LP):LP ==
removeDuplicates [primPartElseUnitCanonical(p) for p in lp]
medialSetWithTrace (ps:LP,redOp?:((P,P)->B),redOp:((P,P)->P)):_
Union(RBT,"failed") ==
qs := rewriteIdealWithQuasiMonicGenerators(ps,redOp?,redOp)$pa
contradiction : B := any?(ground?,ps)
contradiction => "failed"::Union(RBT,"failed")
rs : LP := qs
bs : $
while (not empty? rs) and (not contradiction) repeat
rec := basicSet(rs,redOp?)
contradiction := (rec case "failed")@B
if not contradiction
then
bs := (rec::RBT).bas
rs := (rec::RBT).top
rs := rewriteIdealWithRemainder(rs,bs)
contradiction := ((not empty? rs) and (first(rs) = 1))
if (not empty? rs) and (not contradiction)
then
rs := rewriteSetWithReduction(rs,bs,redOp,redOp?)
contradiction := ((not empty? rs) and (first(rs) = 1))
if (not empty? rs) and (not contradiction)
then
rs := removeDuplicates concat(rs,members(bs))
rs := rewriteIdealWithQuasiMonicGenerators(rs,redOp?,redOp)$pa
contradiction := ((not empty? rs) and (first(rs) = 1))
contradiction => "failed"::Union(RBT,"failed")
([bs,qs]$RBT)::Union(RBT,"failed")
medialSet(ps:LP,redOp?:((P,P)->B),redOp:((P,P)->P)) ==
foo: Union(RBT,"failed") := medialSetWithTrace(ps,redOp?,redOp)
(foo case "failed") => "failed" :: Union($,"failed")
((foo::RBT).bas) :: Union($,"failed")
medialSet(ps:LP) == medialSet(ps,initiallyReduced?,initiallyReduce)
characteristicSetUsingTrace(ps:LP,redOp?:((P,P)->B),redOp:((P,P)->P)):_
Union($,"failed") ==
ps := removeAssociates ps
ps := remove(zero?,ps)
contradiction : B := any?(ground?,ps)
contradiction => "failed"::Union($,"failed")
rs : LP := ps
qs : LP := ps
ms : $
while (not empty? rs) and (not contradiction) repeat
rec := medialSetWithTrace (qs,redOp?,redOp)
contradiction := (rec case "failed")@B
if not contradiction
then
ms := (rec::RBT).bas
qs := (rec::RBT).top
qs := rewriteIdealWithRemainder(qs,ms)
contradiction := ((not empty? qs) and (first(qs) = 1))
if not contradiction
then
rs := rewriteSetWithReduction(qs,ms,lazyPrem,reduced?)
contradiction := ((not empty? rs) and (first(rs) = 1))
if (not contradiction) and (not empty? rs)
then
qs := removeDuplicates(concat(rs,concat(members(ms),qs)))
contradiction => "failed"::Union($,"failed")
ms::Union($,"failed")
characteristicSet(ps:LP,redOp?:((P,P)->B),redOp:((P,P)->P)) ==
characteristicSetUsingTrace(ps,redOp?,redOp)
characteristicSet(ps:LP) ==
characteristicSet(ps,initiallyReduced?,initiallyReduce)
characteristicSerie(ps:LP,redOp?:((P,P)->B),redOp:((P,P)->P)) ==
a := [[ps,empty()$$]$NLpT]$ALpT
while ((esl := extractSplittingLeaf(a)) case ALpT) repeat
ps := value(value(esl::ALpT)$ALpT)$NLpT
charSet? := characteristicSetUsingTrace(ps,redOp?,redOp)
if not (charSet? case $)
then
setvalue!(esl::ALpT,[nil()$LP,empty()$$,true]$NLpT)
updateStatus!(a)
else
cs := (charSet?)::$
lics := initials(cs)
lics := removeRedundantFactors(lics)$pa
lics := sort(infRittWu?,lics)
if empty? lics
then
setvalue!(esl::ALpT,[ps,cs,true]$NLpT)
updateStatus!(a)
else
ln : List NLpT := [[nil()$LP,cs,true]$NLpT]
while not empty? lics repeat
newps := cons(first(lics),concat(cs::LP,ps))
lics := rest lics
newps := removeDuplicates newps
newps := sort(infRittWu?,newps)
ln := cons([newps,empty()$$,false]$NLpT,ln)
splitNodeOf!(esl::ALpT,a,ln)
remove(empty()$$,conditions(a))
characteristicSerie(ps:LP) ==
characteristicSerie (ps,initiallyReduced?,initiallyReduce)
if R has GcdDomain
then
removeSquares (ts:$):Union($,"failed") ==
empty?(ts)$$ => ts::Union($,"failed")
p := (first ts)::P
rsts : Union($,"failed")
rsts := removeSquares((rest ts)::$)
not(rsts case $) => "failed"::Union($,"failed")
newts := rsts::$
empty? newts =>
p := squareFreePart(p)
(per([primitivePart(p)]$LP))::Union($,"failed")
zero? initiallyReduce(init(p),newts) => "failed"::Union($,"failed")
p := primitivePart(removeZero(p,newts))
ground? p => "failed"::Union($,"failed")
not (mvar(newts) < mvar(p)) => "failed"::Union($,"failed")
p := squareFreePart(p)
(per(cons(unitCanonical(p),rep(newts))))::Union($,"failed")
zeroSetSplit lp ==
lts : List $ := _
characteristicSerie(lp,initiallyReduced?,initiallyReduce)
lts := removeDuplicates(lts)$(List $)
newlts : List $ := []
while not empty? lts repeat
ts := first lts
lts := rest lts
iic := removeSquares(ts)
if iic case $
then
newlts := cons(iic::$,newlts)
newlts := removeDuplicates(newlts)$(List $)
sort(infRittWu?, newlts)
else
zeroSetSplit lp ==
lts : List $ := _
characteristicSerie(lp,initiallyReduced?,initiallyReduce)
sort(infRittWu?, removeDuplicates lts)
|