aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-02-08 01:44:04 +0000
committerdos-reis <gdr@axiomatics.org>2009-02-08 01:44:04 +0000
commit6d93161de89559ad66be655a50d3a5001c208c90 (patch)
tree30e165f0c3cf7d8eb28fae9fa9fc9dcf0acd3ab8 /src
parent2fbcd8bc4f97cc3e534e11414f5a12dbc08edf2d (diff)
downloadopen-axiom-6d93161de89559ad66be655a50d3a5001c208c90.tar.gz
Fix AW/66
* algebra/zerodim.spad.pamphlet: Restore use of one? * algebra/updivp.spad.pamphlet: Likewise. * algebra/unifact.spad.pamphlet: Likewise. * algebra/triset.spad.pamphlet: Likewise. * algebra/tools.spad.pamphlet: Likewise. * algebra/suts.spad.pamphlet: Likewise. * algebra/sttaylor.spad.pamphlet: Likewise. * algebra/string.spad.pamphlet: Likewise. * algebra/sregset.spad.pamphlet: Likewise. * algebra/si.spad.pamphlet: Likewise. * algebra/sf.spad.pamphlet: Likewise. * algebra/riccati.spad.pamphlet: Likewise. * algebra/rf.spad.pamphlet: Likewise. * algebra/regset.spad.pamphlet: Likewise. * algebra/rderf.spad.pamphlet: Likewise. * algebra/rdeef.spad.pamphlet: Likewise. * algebra/quat.spad.pamphlet: Likewise. * algebra/puiseux.spad.pamphlet: Likewise. * algebra/pscat.spad.pamphlet: Likewise. * algebra/prtition.spad.pamphlet: Likewise. * algebra/prs.spad.pamphlet: Likewise. * algebra/primelt.spad.pamphlet: Likewise. * algebra/polycat.spad.pamphlet: Likewise. * algebra/poly.spad.pamphlet: Likewise. * algebra/polset.spad.pamphlet: Likewise. * algebra/pfo.spad.pamphlet: Likewise. * algebra/perm.spad.pamphlet: Likewise. * algebra/pattern.spad.pamphlet: Likewise. * algebra/padiclib.spad.pamphlet:Likewise. * algebra/openmath.spad.pamphlet: Likewise. * algebra/opalg.spad.pamphlet: Likewise. * algebra/op.spad.pamphlet: Likewise. * algebra/omerror.spad.pamphlet: Likewise. * algebra/oderf.spad.pamphlet: Likewise. * algebra/odeef.spad.pamphlet: Likewise. * algebra/oct.spad.pamphlet: Likewise. * algebra/nlinsol.spad.pamphlet: Likewise. * algebra/newpoly.spad.pamphlet: Likewise. * algebra/naalgc.spad.pamphlet: Likewise. * algebra/naalg.spad.pamphlet: Likewise. * algebra/multpoly.spad.pamphlet: Likewise. * algebra/mring.spad.pamphlet: Likewise. * algebra/modring.spad.pamphlet: Likewise. * algebra/moddfact.spad.pamphlet: Likewise. * algebra/mkfunc.spad.pamphlet: Likewise. * algebra/matstor.spad.pamphlet: Likewise. * algebra/matrix.spad.pamphlet: Likewise. * algebra/matcat.spad.pamphlet: Likewise. * algebra/manip.spad.pamphlet: Likewise. * algebra/lodof.spad.pamphlet: Likewise. * algebra/liouv.spad.pamphlet: Likewise. * algebra/laplace.spad.pamphlet: Likewise. * algebra/irexpand.spad.pamphlet: Likewise. * algebra/intrf.spad.pamphlet: Likewise. * algebra/intpm.spad.pamphlet: Likewise. * algebra/intfact.spad.pamphlet: Likewise. * algebra/integer.spad.pamphlet: Likewise. * algebra/intclos.spad.pamphlet: Likewise. * algebra/intaux.spad.pamphlet: Likewise. * algebra/intalg.spad.pamphlet: Likewise. * algebra/intaf.spad.pamphlet: Likewise. * algebra/gpol.spad.pamphlet: Likewise. * algebra/gpgcd.spad.pamphlet: Likewise. * algebra/gb.spad.pamphlet: Likewise. * algebra/gaussian.spad.pamphlet: Likewise. * algebra/galutil.spad.pamphlet: Likewise. * algebra/galpolyu.spad.pamphlet: Likewise. * algebra/galfact.spad.pamphlet: Likewise. * algebra/fspace.spad.pamphlet: Likewise. * algebra/fs2ups.spad.pamphlet: Likewise. * algebra/fs2expxp.spad.pamphlet: Likewise. * algebra/free.spad.pamphlet: Likewise. * algebra/fraction.spad.pamphlet: Likewise. * algebra/fr.spad.pamphlet: Likewise. * algebra/fparfrac.spad.pamphlet: Likewise. * algebra/fortran.spad.pamphlet: Likewise. * algebra/fmod.spad.pamphlet: Likewise. * algebra/float.spad.pamphlet: Likewise. * algebra/ffx.spad.pamphlet: Likewise. * algebra/ffnb.spad.pamphlet: Likewise. * algebra/ffcg.spad.pamphlet: Likewise. * algebra/ffcat.spad.pamphlet: Likewise. * algebra/exprode.spad.pamphlet: Likewise. * algebra/expr.spad.pamphlet: Likewise. * algebra/expexpan.spad.pamphlet: Likewise. * algebra/elemntry.spad.pamphlet: Likewise. * algebra/efupxs.spad.pamphlet: Likewise. * algebra/efuls.spad.pamphlet: Likewise. * algebra/e04routine.spad.pamphlet: Likewise. * algebra/e04agents.spad.pamphlet: Likewise. * algebra/divisor.spad.pamphlet: Likewise. * algebra/derham.spad.pamphlet: Likewise. * algebra/defintrf.spad.pamphlet: Likewise. * algebra/defintef.spad.pamphlet: Likewise. * algebra/defaults.spad.pamphlet: Likewise. * algebra/d03agents.spad.pamphlet: Likewise. * algebra/d01weights.spad.pamphlet: Likewise. * algebra/d01routine.spad.pamphlet: Likewise. * algebra/d01agents.spad.pamphlet: Likewise. * algebra/curve.spad.pamphlet: Likewise. * algebra/crfp.spad.pamphlet: Likewise. * algebra/cont.spad.pamphlet: Likewise. * algebra/constant.spad.pamphlet: Likewise. * algebra/complet.spad.pamphlet: Likewise. * algebra/combfunc.spad.pamphlet: Likewise. * algebra/catdef.spad.pamphlet: Likewise. * algebra/brill.spad.pamphlet: Likewise. * algebra/array1.spad.pamphlet: Likewise. * algebra/algfunc.spad.pamphlet: Likewise. * algebra/algfact.spad.pamphlet: Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog114
-rw-r--r--src/algebra/algfact.spad.pamphlet9
-rw-r--r--src/algebra/algfunc.spad.pamphlet12
-rw-r--r--src/algebra/array1.spad.pamphlet3
-rw-r--r--src/algebra/brill.spad.pamphlet3
-rw-r--r--src/algebra/catdef.spad.pamphlet6
-rw-r--r--src/algebra/combfunc.spad.pamphlet21
-rw-r--r--src/algebra/complet.spad.pamphlet3
-rw-r--r--src/algebra/constant.spad.pamphlet3
-rw-r--r--src/algebra/cont.spad.pamphlet9
-rw-r--r--src/algebra/crfp.spad.pamphlet18
-rw-r--r--src/algebra/curve.spad.pamphlet6
-rw-r--r--src/algebra/d01agents.spad.pamphlet3
-rw-r--r--src/algebra/d01routine.spad.pamphlet9
-rw-r--r--src/algebra/d01weights.spad.pamphlet9
-rw-r--r--src/algebra/d03agents.spad.pamphlet3
-rw-r--r--src/algebra/defaults.spad.pamphlet9
-rw-r--r--src/algebra/defintef.spad.pamphlet3
-rw-r--r--src/algebra/defintrf.spad.pamphlet9
-rw-r--r--src/algebra/derham.spad.pamphlet17
-rw-r--r--src/algebra/divisor.spad.pamphlet15
-rw-r--r--src/algebra/e04agents.spad.pamphlet6
-rw-r--r--src/algebra/e04routine.spad.pamphlet12
-rw-r--r--src/algebra/efuls.spad.pamphlet6
-rw-r--r--src/algebra/efupxs.spad.pamphlet6
-rw-r--r--src/algebra/elemntry.spad.pamphlet42
-rw-r--r--src/algebra/expexpan.spad.pamphlet3
-rw-r--r--src/algebra/expr.spad.pamphlet3
-rw-r--r--src/algebra/exprode.spad.pamphlet3
-rw-r--r--src/algebra/ffcat.spad.pamphlet9
-rw-r--r--src/algebra/ffcg.spad.pamphlet6
-rw-r--r--src/algebra/ffnb.spad.pamphlet12
-rw-r--r--src/algebra/ffx.spad.pamphlet6
-rw-r--r--src/algebra/float.spad.pamphlet6
-rw-r--r--src/algebra/fmod.spad.pamphlet6
-rw-r--r--src/algebra/fortran.spad.pamphlet12
-rw-r--r--src/algebra/fparfrac.spad.pamphlet9
-rw-r--r--src/algebra/fr.spad.pamphlet21
-rw-r--r--src/algebra/fraction.spad.pamphlet39
-rw-r--r--src/algebra/free.spad.pamphlet12
-rw-r--r--src/algebra/fs2expxp.spad.pamphlet3
-rw-r--r--src/algebra/fs2ups.spad.pamphlet3
-rw-r--r--src/algebra/fspace.spad.pamphlet9
-rw-r--r--src/algebra/galfact.spad.pamphlet30
-rw-r--r--src/algebra/galpolyu.spad.pamphlet6
-rw-r--r--src/algebra/galutil.spad.pamphlet3
-rw-r--r--src/algebra/gaussian.spad.pamphlet12
-rw-r--r--src/algebra/gb.spad.pamphlet3
-rw-r--r--src/algebra/gpgcd.spad.pamphlet15
-rw-r--r--src/algebra/gpol.spad.pamphlet6
-rw-r--r--src/algebra/intaf.spad.pamphlet6
-rw-r--r--src/algebra/intalg.spad.pamphlet3
-rw-r--r--src/algebra/intaux.spad.pamphlet9
-rw-r--r--src/algebra/intclos.spad.pamphlet12
-rw-r--r--src/algebra/integer.spad.pamphlet8
-rw-r--r--src/algebra/intfact.spad.pamphlet30
-rw-r--r--src/algebra/intpm.spad.pamphlet12
-rw-r--r--src/algebra/intrf.spad.pamphlet6
-rw-r--r--src/algebra/irexpand.spad.pamphlet6
-rw-r--r--src/algebra/laplace.spad.pamphlet3
-rw-r--r--src/algebra/lindep.spad.pamphlet6
-rw-r--r--src/algebra/liouv.spad.pamphlet3
-rw-r--r--src/algebra/lodof.spad.pamphlet6
-rw-r--r--src/algebra/manip.spad.pamphlet30
-rw-r--r--src/algebra/matcat.spad.pamphlet6
-rw-r--r--src/algebra/matrix.spad.pamphlet3
-rw-r--r--src/algebra/matstor.spad.pamphlet3
-rw-r--r--src/algebra/mkfunc.spad.pamphlet6
-rw-r--r--src/algebra/moddfact.spad.pamphlet3
-rw-r--r--src/algebra/modring.spad.pamphlet18
-rw-r--r--src/algebra/mring.spad.pamphlet6
-rw-r--r--src/algebra/multpoly.spad.pamphlet12
-rw-r--r--src/algebra/naalg.spad.pamphlet3
-rw-r--r--src/algebra/naalgc.spad.pamphlet9
-rw-r--r--src/algebra/newpoly.spad.pamphlet66
-rw-r--r--src/algebra/nlinsol.spad.pamphlet3
-rw-r--r--src/algebra/oct.spad.pamphlet21
-rw-r--r--src/algebra/odeef.spad.pamphlet12
-rw-r--r--src/algebra/oderf.spad.pamphlet12
-rw-r--r--src/algebra/omerror.spad.pamphlet3
-rw-r--r--src/algebra/op.spad.pamphlet3
-rw-r--r--src/algebra/opalg.spad.pamphlet21
-rw-r--r--src/algebra/openmath.spad.pamphlet9
-rw-r--r--src/algebra/padiclib.spad.pamphlet3
-rw-r--r--src/algebra/pattern.spad.pamphlet3
-rw-r--r--src/algebra/perm.spad.pamphlet3
-rw-r--r--src/algebra/pfo.spad.pamphlet18
-rw-r--r--src/algebra/polset.spad.pamphlet3
-rw-r--r--src/algebra/poly.spad.pamphlet24
-rw-r--r--src/algebra/polycat.spad.pamphlet6
-rw-r--r--src/algebra/primelt.spad.pamphlet6
-rw-r--r--src/algebra/prs.spad.pamphlet15
-rw-r--r--src/algebra/prtition.spad.pamphlet6
-rw-r--r--src/algebra/pscat.spad.pamphlet3
-rw-r--r--src/algebra/puiseux.spad.pamphlet9
-rw-r--r--src/algebra/quat.spad.pamphlet12
-rw-r--r--src/algebra/rdeef.spad.pamphlet6
-rw-r--r--src/algebra/rderf.spad.pamphlet3
-rw-r--r--src/algebra/regset.spad.pamphlet6
-rw-r--r--src/algebra/rf.spad.pamphlet12
-rw-r--r--src/algebra/riccati.spad.pamphlet3
-rw-r--r--src/algebra/sf.spad.pamphlet7
-rw-r--r--src/algebra/si.spad.pamphlet8
-rw-r--r--src/algebra/sign.spad.pamphlet3
-rw-r--r--src/algebra/sregset.spad.pamphlet6
-rw-r--r--src/algebra/strap/DFLOAT.lsp475
-rw-r--r--src/algebra/strap/EUCDOM-.lsp115
-rw-r--r--src/algebra/strap/EUCDOM.lsp2
-rw-r--r--src/algebra/strap/FFIELDC-.lsp77
-rw-r--r--src/algebra/strap/INS-.lsp67
-rw-r--r--src/algebra/strap/INS.lsp6
-rw-r--r--src/algebra/strap/INT.lsp6
-rw-r--r--src/algebra/strap/ISTRING.lsp24
-rw-r--r--src/algebra/strap/MONOID-.lsp21
-rw-r--r--src/algebra/strap/MONOID.lsp2
-rw-r--r--src/algebra/strap/POLYCAT-.lsp246
-rw-r--r--src/algebra/strap/POLYCAT.lsp6
-rw-r--r--src/algebra/strap/PSETCAT-.lsp87
-rw-r--r--src/algebra/strap/PSETCAT.lsp8
-rw-r--r--src/algebra/strap/REF.lsp20
-rw-r--r--src/algebra/string.spad.pamphlet6
-rw-r--r--src/algebra/sttaylor.spad.pamphlet3
-rw-r--r--src/algebra/sups.spad.pamphlet15
-rw-r--r--src/algebra/suts.spad.pamphlet9
-rw-r--r--src/algebra/tools.spad.pamphlet3
-rw-r--r--src/algebra/triset.spad.pamphlet21
-rw-r--r--src/algebra/unifact.spad.pamphlet3
-rw-r--r--src/algebra/updivp.spad.pamphlet3
-rw-r--r--src/algebra/zerodim.spad.pamphlet9
129 files changed, 1051 insertions, 1300 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9cd320fe..9bc4f6b7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,119 @@
2009-02-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ Fix AW/66
+ * algebra/zerodim.spad.pamphlet: Restore use of one?
+ * algebra/updivp.spad.pamphlet: Likewise.
+ * algebra/unifact.spad.pamphlet: Likewise.
+ * algebra/triset.spad.pamphlet: Likewise.
+ * algebra/tools.spad.pamphlet: Likewise.
+ * algebra/suts.spad.pamphlet: Likewise.
+ * algebra/sttaylor.spad.pamphlet: Likewise.
+ * algebra/string.spad.pamphlet: Likewise.
+ * algebra/sregset.spad.pamphlet: Likewise.
+ * algebra/si.spad.pamphlet: Likewise.
+ * algebra/sf.spad.pamphlet: Likewise.
+ * algebra/riccati.spad.pamphlet: Likewise.
+ * algebra/rf.spad.pamphlet: Likewise.
+ * algebra/regset.spad.pamphlet: Likewise.
+ * algebra/rderf.spad.pamphlet: Likewise.
+ * algebra/rdeef.spad.pamphlet: Likewise.
+ * algebra/quat.spad.pamphlet: Likewise.
+ * algebra/puiseux.spad.pamphlet: Likewise.
+ * algebra/pscat.spad.pamphlet: Likewise.
+ * algebra/prtition.spad.pamphlet: Likewise.
+ * algebra/prs.spad.pamphlet: Likewise.
+ * algebra/primelt.spad.pamphlet: Likewise.
+ * algebra/polycat.spad.pamphlet: Likewise.
+ * algebra/poly.spad.pamphlet: Likewise.
+ * algebra/polset.spad.pamphlet: Likewise.
+ * algebra/pfo.spad.pamphlet: Likewise.
+ * algebra/perm.spad.pamphlet: Likewise.
+ * algebra/pattern.spad.pamphlet: Likewise.
+ * algebra/padiclib.spad.pamphlet:Likewise.
+ * algebra/openmath.spad.pamphlet: Likewise.
+ * algebra/opalg.spad.pamphlet: Likewise.
+ * algebra/op.spad.pamphlet: Likewise.
+ * algebra/omerror.spad.pamphlet: Likewise.
+ * algebra/oderf.spad.pamphlet: Likewise.
+ * algebra/odeef.spad.pamphlet: Likewise.
+ * algebra/oct.spad.pamphlet: Likewise.
+ * algebra/nlinsol.spad.pamphlet: Likewise.
+ * algebra/newpoly.spad.pamphlet: Likewise.
+ * algebra/naalgc.spad.pamphlet: Likewise.
+ * algebra/naalg.spad.pamphlet: Likewise.
+ * algebra/multpoly.spad.pamphlet: Likewise.
+ * algebra/mring.spad.pamphlet: Likewise.
+ * algebra/modring.spad.pamphlet: Likewise.
+ * algebra/moddfact.spad.pamphlet: Likewise.
+ * algebra/mkfunc.spad.pamphlet: Likewise.
+ * algebra/matstor.spad.pamphlet: Likewise.
+ * algebra/matrix.spad.pamphlet: Likewise.
+ * algebra/matcat.spad.pamphlet: Likewise.
+ * algebra/manip.spad.pamphlet: Likewise.
+ * algebra/lodof.spad.pamphlet: Likewise.
+ * algebra/liouv.spad.pamphlet: Likewise.
+ * algebra/laplace.spad.pamphlet: Likewise.
+ * algebra/irexpand.spad.pamphlet: Likewise.
+ * algebra/intrf.spad.pamphlet: Likewise.
+ * algebra/intpm.spad.pamphlet: Likewise.
+ * algebra/intfact.spad.pamphlet: Likewise.
+ * algebra/integer.spad.pamphlet: Likewise.
+ * algebra/intclos.spad.pamphlet: Likewise.
+ * algebra/intaux.spad.pamphlet: Likewise.
+ * algebra/intalg.spad.pamphlet: Likewise.
+ * algebra/intaf.spad.pamphlet: Likewise.
+ * algebra/gpol.spad.pamphlet: Likewise.
+ * algebra/gpgcd.spad.pamphlet: Likewise.
+ * algebra/gb.spad.pamphlet: Likewise.
+ * algebra/gaussian.spad.pamphlet: Likewise.
+ * algebra/galutil.spad.pamphlet: Likewise.
+ * algebra/galpolyu.spad.pamphlet: Likewise.
+ * algebra/galfact.spad.pamphlet: Likewise.
+ * algebra/fspace.spad.pamphlet: Likewise.
+ * algebra/fs2ups.spad.pamphlet: Likewise.
+ * algebra/fs2expxp.spad.pamphlet: Likewise.
+ * algebra/free.spad.pamphlet: Likewise.
+ * algebra/fraction.spad.pamphlet: Likewise.
+ * algebra/fr.spad.pamphlet: Likewise.
+ * algebra/fparfrac.spad.pamphlet: Likewise.
+ * algebra/fortran.spad.pamphlet: Likewise.
+ * algebra/fmod.spad.pamphlet: Likewise.
+ * algebra/float.spad.pamphlet: Likewise.
+ * algebra/ffx.spad.pamphlet: Likewise.
+ * algebra/ffnb.spad.pamphlet: Likewise.
+ * algebra/ffcg.spad.pamphlet: Likewise.
+ * algebra/ffcat.spad.pamphlet: Likewise.
+ * algebra/exprode.spad.pamphlet: Likewise.
+ * algebra/expr.spad.pamphlet: Likewise.
+ * algebra/expexpan.spad.pamphlet: Likewise.
+ * algebra/elemntry.spad.pamphlet: Likewise.
+ * algebra/efupxs.spad.pamphlet: Likewise.
+ * algebra/efuls.spad.pamphlet: Likewise.
+ * algebra/e04routine.spad.pamphlet: Likewise.
+ * algebra/e04agents.spad.pamphlet: Likewise.
+ * algebra/divisor.spad.pamphlet: Likewise.
+ * algebra/derham.spad.pamphlet: Likewise.
+ * algebra/defintrf.spad.pamphlet: Likewise.
+ * algebra/defintef.spad.pamphlet: Likewise.
+ * algebra/defaults.spad.pamphlet: Likewise.
+ * algebra/d03agents.spad.pamphlet: Likewise.
+ * algebra/d01weights.spad.pamphlet: Likewise.
+ * algebra/d01routine.spad.pamphlet: Likewise.
+ * algebra/d01agents.spad.pamphlet: Likewise.
+ * algebra/curve.spad.pamphlet: Likewise.
+ * algebra/crfp.spad.pamphlet: Likewise.
+ * algebra/cont.spad.pamphlet: Likewise.
+ * algebra/constant.spad.pamphlet: Likewise.
+ * algebra/complet.spad.pamphlet: Likewise.
+ * algebra/combfunc.spad.pamphlet: Likewise.
+ * algebra/catdef.spad.pamphlet: Likewise.
+ * algebra/brill.spad.pamphlet: Likewise.
+ * algebra/array1.spad.pamphlet: Likewise.
+ * algebra/algfunc.spad.pamphlet: Likewise.
+ * algebra/algfact.spad.pamphlet: Likewise.
+
+2009-02-07 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* algebra/system.spad.pamphlet (hostByteOrder$System): New.
* algebra/data.spad.pamphlet (ByteOrder): New.
* algebra/Makefile.pamphlet (axiom_algebra_layer_1): Include BYTEORD.
diff --git a/src/algebra/algfact.spad.pamphlet b/src/algebra/algfact.spad.pamphlet
index edb9dc76..3ac0462e 100644
--- a/src/algebra/algfact.spad.pamphlet
+++ b/src/algebra/algfact.spad.pamphlet
@@ -296,8 +296,7 @@ AlgFactor(UP): Exports == Implementation where
_*/[extend(fc.factor, fc.exponent) for fc in factors fp]
extend(p, n) ==
--- one? degree p => primeFactor(p, n)
- (degree p = 1) => primeFactor(p, n)
+ one? degree p => primeFactor(p, n)
q := monomial(1, 1)$UP - zeroOf(p pretend SUP)::UP
primeFactor(q, n) * split((p exquo q)::UP) ** (n::N)
@@ -307,12 +306,10 @@ AlgFactor(UP): Exports == Implementation where
irred? p ==
fp := factor p
--- one? numberOfFactors fp and one? nthExponent(fp, 1)
- (numberOfFactors fp = 1) and (nthExponent(fp, 1) = 1)
+ one? numberOfFactors fp and one? nthExponent(fp, 1)
fact(p, l) ==
--- one? degree p => primeFactor(p, 1)
- (degree p = 1) => primeFactor(p, 1)
+ one? degree p => primeFactor(p, 1)
empty? l =>
dr := factor(downpoly p)$RationalFactorize(UPQ)
(liftpoly unit dr) *
diff --git a/src/algebra/algfunc.spad.pamphlet b/src/algebra/algfunc.spad.pamphlet
index fbbe96dc..30cbb285 100644
--- a/src/algebra/algfunc.spad.pamphlet
+++ b/src/algebra/algfunc.spad.pamphlet
@@ -121,8 +121,7 @@ AlgebraicallyClosedField(): Category == Join(Field,RadicalCategory) with
binomialRoots(p, y, fn) ==
-- p = a * x**n + b
alpha := assign(x := new(y)$Symbol, fn(p, x))
--- one?(n := degree p) => [ alpha ]
- ((n := degree p) = 1) => [ alpha ]
+ one?(n := degree p) => [ alpha ]
cyclo := cyclotomic(n, monomial(1,1)$SUP)$NumberTheoreticPolynomialFunctions(SUP)
beta := assign(x := new(y)$Symbol, fn(cyclo, x))
[alpha*beta**i for i in 0..(n-1)::NonNegativeInteger]
@@ -384,8 +383,7 @@ AlgebraicFunction(R, F): Exports == Implementation where
monomial? q => 0
(d := degree q) <= 0 => error "rootOf: constant polynomial"
--- one? d=> - leadingCoefficient(reductum q) / leadingCoefficient q
- (d = 1) => - leadingCoefficient(reductum q) / leadingCoefficient q
+ one? d=> - leadingCoefficient(reductum q) / leadingCoefficient q
((rx := retractIfCan(x)@Union(SE, "failed")) case SE) and
((r := UP2R q) case UPR) => rootOf(r::UPR, rx::SE)::F
kernel(opalg, [q x, x])
@@ -403,8 +401,7 @@ AlgebraicFunction(R, F): Exports == Implementation where
inrootof(q, x) ==
monomial? q => 0
(d := degree q) <= 0 => error "rootOf: constant polynomial"
--- one? d => - leadingCoefficient(reductum q) /leadingCoefficient q
- (d = 1) => - leadingCoefficient(reductum q) /leadingCoefficient q
+ one? d => - leadingCoefficient(reductum q) /leadingCoefficient q
kernel(opalg, [q x, x])
evaluate(opalg, ialg)$BasicOperatorFunctions1(F)
@@ -443,8 +440,7 @@ AlgebraicFunction(R, F): Exports == Implementation where
inroot l ==
zero?(n := retract(second l)@Z) => error "root: exponent = 0"
--- one?(x := first l) or one? n => x
- ((x := first l) = 1) or (n = 1) => x
+ one?(x := first l) or one? n => x
(r := retractIfCan(x)@Union(R,"failed")) case R => iroot(r::R,n)
(u := isExpt(x)) case Record(var:K, exponent:Z) =>
pr := u::Record(var:K, exponent:Z)
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index 85368781..03916478 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -413,8 +413,7 @@ IndexedOneDimensionalArray(S:Type, mn:Integer):
negative? i or i > maxIndex(x) => error "index out of range"
qsetelt_!(x, i, s)
--- else if one? mn then
- else if (mn = 1) then
+ else if one? mn then
maxIndex x == Qsize x
qelt(x, i) == Qelt(x, i-1)
qsetelt_!(x, i, s) == Qsetelt(x, i-1, s)
diff --git a/src/algebra/brill.spad.pamphlet b/src/algebra/brill.spad.pamphlet
index ae69e86c..6f37c30a 100644
--- a/src/algebra/brill.spad.pamphlet
+++ b/src/algebra/brill.spad.pamphlet
@@ -95,8 +95,7 @@ BrillhartTests(UP): Exports == Implementation where
polyx2 := squaredPolynomial(p)
prime? p(largeEnough) => true
not polyx2 and prime? p(-largeEnough) => true
--- one? brillharttrials => false
- (brillharttrials = 1) => false
+ one? brillharttrials => false
largeEnough := largeEnough+1
primeEnough?(p(largeEnough),if noLinears then 4 else 2) => true
not polyx2 and
diff --git a/src/algebra/catdef.spad.pamphlet b/src/algebra/catdef.spad.pamphlet
index 14f30065..fae3896f 100644
--- a/src/algebra/catdef.spad.pamphlet
+++ b/src/algebra/catdef.spad.pamphlet
@@ -544,8 +544,7 @@ EuclideanDomain(): Category == PrincipalIdealDomain with
IdealElt ==> Record(coef1:%,coef2:%,generator:%)
unitNormalizeIdealElt(s:IdealElt):IdealElt ==
(u,c,a):=unitNormal(s.generator)
--- one? a => s
- (a = 1) => s
+ one? a => s
[a*s.coef1,a*s.coef2,c]$IdealElt
extendedEuclidean(x,y) == --Extended Euclidean Algorithm
s1:=unitNormalizeIdealElt([1$%,0$%,x]$IdealElt)
@@ -1014,8 +1013,7 @@ Monoid(): Category == SemiGroup with
one? x == x = 1
sample() == 1
recip x ==
--- one? x => x
- (x = 1) => x
+ one? x => x
"failed"
x:% ** n:NonNegativeInteger ==
zero? n => 1
diff --git a/src/algebra/combfunc.spad.pamphlet b/src/algebra/combfunc.spad.pamphlet
index 979b6fa2..fdf4405d 100644
--- a/src/algebra/combfunc.spad.pamphlet
+++ b/src/algebra/combfunc.spad.pamphlet
@@ -422,8 +422,7 @@ dummy variable is introduced to make the indexing variable \lq local\rq.
iprod l ==
zero? first l => 0
--- one? first l => 1
- (first l = 1) => 1
+ one? first l => 1
kernel(opprod, l)
isum l ==
@@ -441,15 +440,13 @@ dummy variable is introduced to make the indexing variable \lq local\rq.
first(l) * (fourth rest l - fourth l + 1)
ifact x ==
--- zero? x or one? x => 1
- zero? x or (x = 1) => 1
+ zero? x or one? x => 1
kernel(opfact, x)
ibinom l ==
n := first l
((p := second l) = 0) or (p = n) => 1
--- one? p or (p = n - 1) => n
- (p = 1) or (p = n - 1) => n
+ one? p or (p = n - 1) => n
kernel(opbinom, l)
iperm l ==
@@ -499,14 +496,11 @@ dummy variable is introduced to make the indexing variable \lq local\rq.
zero?(x := first l) =>
zero? second l => error "0 ** 0"
0
--- one? x or zero?(n := second l) => 1
- (x = 1) or zero?(n: F := second l) => 1
--- one? n => x
- (n = 1) => x
+ one? x or zero?(n := second l) => 1
+ one? n => x
(u := isExpt(x, OPEXP)) case "failed" => kernel(oppow, l)
rec := u::Record(var: K, exponent: Z)
--- one?(y := first argument(rec.var)) or y = -1 =>
- ((y := first argument(rec.var))=1) or y = -1 =>
+ one?(y := first argument(rec.var)) or y = -1 =>
(operator(rec.var)) (rec.exponent * y * n)
kernel(oppow, l)
@@ -716,8 +710,7 @@ FunctionalSpecialFunction(R, F): Exports == Implementation where
-- Could put more unconditional special rules for other functions here
iGamma x ==
--- one? x => x
- (x = 1) => x
+ one? x => x
kernel(opGamma, x)
iabs x ==
diff --git a/src/algebra/complet.spad.pamphlet b/src/algebra/complet.spad.pamphlet
index 2dc03ae7..73cff0fb 100644
--- a/src/algebra/complet.spad.pamphlet
+++ b/src/algebra/complet.spad.pamphlet
@@ -167,8 +167,7 @@ OrderedCompletionFunctions2(R, S): Exports == Implementation where
map(f, r, p, m) ==
zero?(n := whatInfinity r) => (f retract r)::ORS
--- one? n => p
- (n = 1) => p
+ one? n => p
m
@
diff --git a/src/algebra/constant.spad.pamphlet b/src/algebra/constant.spad.pamphlet
index 8cab8cc9..5672e9af 100644
--- a/src/algebra/constant.spad.pamphlet
+++ b/src/algebra/constant.spad.pamphlet
@@ -85,8 +85,7 @@ InnerAlgebraicNumber(): Exports == Implementation where
a,b:%
differentiate(x:%):% == 0
zero? a == zero? numer a
--- one? a == one? numer a and one? denom a
- one? a == (numer a = 1) and (denom a = 1)
+ one? a == one? numer a and one? denom a
x:% / y:% == mainRatDenom(x /$Rep y)
x:% ** n:Integer ==
n < 0 => mainRatDenom (x **$Rep n)
diff --git a/src/algebra/cont.spad.pamphlet b/src/algebra/cont.spad.pamphlet
index 5183d276..68e535df 100644
--- a/src/algebra/cont.spad.pamphlet
+++ b/src/algebra/cont.spad.pamphlet
@@ -189,8 +189,7 @@ ExpertSystemContinuityPackage(): E == I where
var:Symbol := first(variables(a))
c:EDF := w.2
c1:EDF := w.1
--- entry?(c1,[b::EDF for b in vars]) and (one?(# vars)) =>
- entry?(c1,[b::EDF for b in vars]) and ((# vars) = 1) =>
+ entry?(c1,[b::EDF for b in vars]) and (one?(# vars)) =>
c2:DF := edf2df c
c3 := c2 :: OCDF
varEdf := var :: EDF
@@ -205,8 +204,7 @@ ExpertSystemContinuityPackage(): E == I where
entry?(a,[b::EDF for b in vars]) => -- finds entries like sqrt(x)
st := getStream(n,"ones")
o := edf2df(second(t)$LEDF)
--- one?(o) or one?(-o) => -- is it like (f(x) -/+ 1)
- (o = 1) or (-o = 1) => -- is it like (f(x) -/+ 1)
+ one?(o) or one?(-o) => -- is it like (f(x) -/+ 1)
st := map(-#1/o,st)$StreamFunctions2(DF,DF)
streamInRange(st,range)
empty()$SDF
@@ -239,8 +237,7 @@ ExpertSystemContinuityPackage(): E == I where
var:Symbol := first(variables(a))
c:EDF := w.2
c1:EDF := w.1
--- entry?(c1,[b::EDF for b in vars]) and (one?(# vars)) =>
- entry?(c1,[b::EDF for b in vars]) and ((# vars) = 1) =>
+ entry?(c1,[b::EDF for b in vars]) and (one?(# vars)) =>
c2:DF := edf2df c
c3 := c2 :: OCDF
varEdf := var :: EDF
diff --git a/src/algebra/crfp.spad.pamphlet b/src/algebra/crfp.spad.pamphlet
index b2291289..3d26fbbd 100644
--- a/src/algebra/crfp.spad.pamphlet
+++ b/src/algebra/crfp.spad.pamphlet
@@ -240,8 +240,7 @@ ComplexRootFindingPackage(R, UP): public == private where
p := p quo monomial(1,md)$UP
sP : Record(start: UP, factors: FR UP) := startPolynomial p
fp : FR UP := sP.factors
--- if not one? fp then
- if not (fp = 1) then
+ if not one? fp then
qr: Record(quotient: UP, remainder: UP):= divide(p,makeMonic expand fp)
p := qr.quotient
st := sP.start
@@ -275,16 +274,14 @@ ComplexRootFindingPackage(R, UP): public == private where
for fac in split.factors repeat
fp :=
--- one? degree fac => fp * nilFactor(fac,1)$(FR UP)
- (degree fac = 1) => fp * nilFactor(fac,1)$(FR UP)
+ one? degree fac => fp * nilFactor(fac,1)$(FR UP)
fp * irreducibleFactor(fac,1)$(FR UP)
fp
startPolynomial p == -- assume minimumDegree is 0
--print (p :: OF)
fp : FR UP := 1
--- one? degree p =>
- (degree p = 1) =>
+ one? degree p =>
p := makeMonic p
[p,irreducibleFactor(p,1)]
startPoly : UP := monomial(1,1)$UP
@@ -458,8 +455,7 @@ ComplexRootFindingPackage(R, UP): public == private where
--eps0 : R := eps / den
-- for now only
eps0 : R := eps / (ten*ten)
--- one? d => irreducibleFactor(poly,1)$(FR UP)
- (d = 1) => irreducibleFactor(poly,1)$(FR UP)
+ one? d => irreducibleFactor(poly,1)$(FR UP)
listOfFactors : L Record(factor: UP,exponent: I) :=_
list [makeMonic poly,1]
if info then
@@ -475,8 +471,7 @@ ComplexRootFindingPackage(R, UP): public == private where
lof : L OF := ["just now we try to split the polynomial:",p::OF]
print vconcat lof
split : FR UP := pleskenSplit(p, eps0, info)
--- one? numberOfFactors split =>
- (numberOfFactors split = 1) =>
+ one? numberOfFactors split =>
-- in a later version we will change error bound and
-- accuracy here to deal this case as well
lof : L OF := ["factor: couldn't split factor",_
@@ -489,8 +484,7 @@ ComplexRootFindingPackage(R, UP): public == private where
for rec in factors(split)$(FR UP) repeat
newFactor : UP := rec.factor
expOfFactor := exponentOfp * rec.exponent
--- one? degree newFactor =>
- (degree newFactor = 1) =>
+ one? degree newFactor =>
result := result * nilFactor(newFactor,expOfFactor)
listOfFactors:=cons([newFactor,expOfFactor],_
listOfFactors)
diff --git a/src/algebra/curve.spad.pamphlet b/src/algebra/curve.spad.pamphlet
index 02280f37..11d82292 100644
--- a/src/algebra/curve.spad.pamphlet
+++ b/src/algebra/curve.spad.pamphlet
@@ -166,8 +166,7 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
infOrder f == (degree denom f)::Z - (degree numer f)::Z
integral? f == ground?(integralCoordinates(f).den)
integral?(f:$, a:F) == (integralCoordinates(f).den)(a) ~= 0
--- absolutelyIrreducible? == one? numberOfComponents()
- absolutelyIrreducible? == numberOfComponents() = 1
+ absolutelyIrreducible? == one? numberOfComponents()
yCoordinates f == splitDenominator coordinates f
hyperelliptic() ==
@@ -487,8 +486,7 @@ ChangeOfVariable(F, UP, UPUP): Exports == Implementation where
RPrim(c, a, q)
RPrim(c, a, q) ==
--- one? a => [c::RF, q]
- (a = 1) => [c::RF, q]
+ one? a => [c::RF, q]
[(a * c)::RF, clearDenominator q monomial(inv(a::RF), 1)]
-- always makes the algebraic integral, but does not send a point to infinity
diff --git a/src/algebra/d01agents.spad.pamphlet b/src/algebra/d01agents.spad.pamphlet
index 60aec7a2..0df6f727 100644
--- a/src/algebra/d01agents.spad.pamphlet
+++ b/src/algebra/d01agents.spad.pamphlet
@@ -226,8 +226,7 @@ d01AgentsPackage(): E == I where
commaSeparate(l:LST):ST ==
empty?(l)$LST => ""
--- one?(#(l)) => concat(l)$ST
- (#(l) = 1) => concat(l)$ST
+ one?(#(l)) => concat(l)$ST
f := first(l)$LST
t := [concat([", ",l.i])$ST for i in 2..#(l)]
concat(f,concat(t)$ST)$ST
diff --git a/src/algebra/d01routine.spad.pamphlet b/src/algebra/d01routine.spad.pamphlet
index 6daf17fd..c3b04127 100644
--- a/src/algebra/d01routine.spad.pamphlet
+++ b/src/algebra/d01routine.spad.pamphlet
@@ -234,8 +234,7 @@ d01apfAnnaType(): NumericalIntegrationCategory == Result add
if (a.1 > -1) then c := a.1
if (a.2 > -1) then d := a.2
l:INT := exprHasLogarithmicWeights(args)
--- (zero? c) and (zero? d) and (one? l) =>
- (zero? c) and (zero? d) and (l = 1) =>
+ (zero? c) and (zero? d) and (one? l) =>
[0.0,"d01apf: A suitable singularity has not been found", ext]
out:LDF := [c,d,l :: DF]
outany:Any := coerce(out)$AnyFunctions1(LDF)
@@ -312,8 +311,7 @@ d01aqfAnnaType(): NumericalIntegrationCategory == Result add
measure(R:RT,args:NIA) ==
ext:Result := empty()$Result
Den := denominator(args.fn)
--- one? Den =>
- (Den = 1) =>
+ one? Den =>
[0.0,"d01aqf: A suitable weight function has not been found", ext]
listOfZeros:LDF := problemPoints(args.fn,args.var,args.range)
numberOfZeros := (#(listOfZeros))$LDF
@@ -399,8 +397,7 @@ d01alfAnnaType(): NumericalIntegrationCategory == Result add
st:ST := "Recommended is d01alf with the singularities "
commaSeparate(listOfZeros)
m :=
--- one?(numberOfZeros) => 0.4
- (numberOfZeros = 1) => 0.4
+ one?(numberOfZeros) => 0.4
getMeasure(R,d01alf@S)$RT
[m, st, ext]
[0.0, "d01alf: A list of suitable singularities has not been found", ext]
diff --git a/src/algebra/d01weights.spad.pamphlet b/src/algebra/d01weights.spad.pamphlet
index 7f41244f..f400d32d 100644
--- a/src/algebra/d01weights.spad.pamphlet
+++ b/src/algebra/d01weights.spad.pamphlet
@@ -124,8 +124,7 @@ d01WeightsPackage(): E == I where
functionIsQuotient(expr:EDF):Union(EDF,"failed") ==
(k := mainKernel expr) case KEDF =>
expr = inv(f := k :: KEDF :: EDF)$EDF => f
--- one?(numerator expr) => denominator expr
- (numerator expr = 1) => denominator expr
+ one?(numerator expr) => denominator expr
"failed"
"failed"
@@ -134,8 +133,7 @@ d01WeightsPackage(): E == I where
functionIsNthRoot?(f:EDF,e:EDF):Boolean ==
(m := mainKernel f) case "failed" => false
--- (one?(# (kernels f)))
- ((# (kernels f)) = 1)
+ (one?(# (kernels f)))
and (name operator m = (nthRoot :: Symbol))@Boolean
and (((argument m).1 = e)@Boolean)
@@ -200,8 +198,7 @@ d01WeightsPackage(): E == I where
exprOfFormCosWXorSinWX(f:EDF,var:Symbol): URBODF ==
l:LKEDF := kernels(f)$EDF
--- one?((# l)$LKEDF)$INT =>
- # l = 1 =>
+ one?((# l)$LKEDF)$INT =>
a:LEDF := argument(e:KEDF := first(l)$LKEDF)$KEDF
empty?(a) => "failed"
m:Union(LEDF,"failed") := isTimes(first(a)$LEDF)$EDF
diff --git a/src/algebra/d03agents.spad.pamphlet b/src/algebra/d03agents.spad.pamphlet
index 3c7b57c4..53085713 100644
--- a/src/algebra/d03agents.spad.pamphlet
+++ b/src/algebra/d03agents.spad.pamphlet
@@ -88,8 +88,7 @@ d03AgentsPackage(): E == I where
v := variables(e := 4*first(p)*third(p)-(second(p))**2)
eq := subscriptedVariables(e)
noa:NOA :=
--- one?(# v) =>
- (# v) = 1 =>
+ one?(# v) =>
((first v) = X@Symbol) =>
[eq,[xstart],[xs::OCDF],empty()$LEDF,[xf::OCDF]]
[eq,[ystart],[ys::OCDF],empty()$LEDF,[yf::OCDF]]
diff --git a/src/algebra/defaults.spad.pamphlet b/src/algebra/defaults.spad.pamphlet
index f4c99786..b50fee54 100644
--- a/src/algebra/defaults.spad.pamphlet
+++ b/src/algebra/defaults.spad.pamphlet
@@ -33,8 +33,7 @@ RepeatedSquaring(S): Exports == Implementation where
x: S
n: PositiveInteger
expt(x, n) ==
--- one? n => x
- (n = 1) => x
+ one? n => x
odd?(n)$Integer=> x * expt(x*x,shift(n,-1) pretend PositiveInteger)
expt(x*x,shift(n,-1) pretend PositiveInteger)
@@ -65,8 +64,7 @@ RepeatedDoubling(S):Exports ==Implementation where
x: S
n: PositiveInteger
double(n,x) ==
--- one? n => x
- (n = 1) => x
+ one? n => x
odd?(n)$Integer =>
x + double(shift(n,-1) pretend PositiveInteger,(x+x))
double(shift(n,-1) pretend PositiveInteger,(x+x))
@@ -148,8 +146,7 @@ FiniteLinearAggregateSort(S, V): Exports == Implementation where
QuickSort(l, r, i, j) ==
n := j - i
--- if one? n and l(qelt(r, j), qelt(r, i)) then swap_!(r, i, j)
- if (n = 1) and l(qelt(r, j), qelt(r, i)) then swap_!(r, i, j)
+ if one? n and l(qelt(r, j), qelt(r, i)) then swap_!(r, i, j)
n < 2 => return r
-- for the moment split at the middle item
k := partition(l, r, i, j, i + shift(n,-1))
diff --git a/src/algebra/defintef.spad.pamphlet b/src/algebra/defintef.spad.pamphlet
index 5e654da2..9426ab08 100644
--- a/src/algebra/defintef.spad.pamphlet
+++ b/src/algebra/defintef.spad.pamphlet
@@ -136,8 +136,7 @@ ElementaryFunctionDefiniteIntegration(R, F): Exports == Implementation where
(w := checkSMP(t, x, k, a, b)) case "failed" => return w
if w::B then n := n + 1
zero? n => false -- no summand has a pole
--- one? n => true -- only one summand has a pole
- (n = 1) => true -- only one summand has a pole
+ one? n => true -- only one summand has a pole
"failed" -- at least 2 summands have a pole
(z := isExpt p) case "failed" => "failed"
kk := z.var
diff --git a/src/algebra/defintrf.spad.pamphlet b/src/algebra/defintrf.spad.pamphlet
index dc594733..dcd67691 100644
--- a/src/algebra/defintrf.spad.pamphlet
+++ b/src/algebra/defintrf.spad.pamphlet
@@ -203,12 +203,10 @@ DefiniteIntegrationTools(R, F): Exports == Implementation where
if zb? then m := inc m
odd?(v := va::Z - vb::Z) => -- p has an odd number of roots
incl? or even? m => true
--- one? v => false
- (v = 1) => false
+ one? v => false
"failed"
zero? v => false -- p has no roots
--- one? m => true -- p has an even number > 0 of roots
- (m = 1) => true -- p has an even number > 0 of roots
+ one? m => true -- p has an even number > 0 of roots
"failed"
checkDeriv(p, a, b) ==
@@ -237,8 +235,7 @@ DefiniteIntegrationTools(R, F): Exports == Implementation where
(v := var p) case "failed" => "failed"
odd?(v::Z) => -- p has an odd number of positive roots
incl0? or not(z0?) => true
--- one?(v::Z) => false
- (v::Z) = 1 => false
+ one?(v::Z) => false
"failed"
zero?(v::Z) => false -- p has no positive roots
z0? => true -- p has an even number > 0 of positive roots
diff --git a/src/algebra/derham.spad.pamphlet b/src/algebra/derham.spad.pamphlet
index 06bb096c..6b77c0e6 100644
--- a/src/algebra/derham.spad.pamphlet
+++ b/src/algebra/derham.spad.pamphlet
@@ -283,17 +283,14 @@ AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where
displayList:EAB -> O
displayList(x):O ==
le: L I := exponents(x)$EAB
--- reduce(_*,[(lVar.i)::O for i in 1..dim | le.i = 1])$L(O)
--- reduce(_*,[(lVar.i)::O for i in 1..dim | one?(le.i)])$L(O)
- reduce(_*,[(lVar.i)::O for i in 1..dim | ((le.i) = 1)])$L(O)
+ reduce(_*,[(lVar.i)::O for i in 1..dim | one?(le.i)])$L(O)
+
makeTerm:(R,EAB) -> O
makeTerm(r,x) ==
-- we know that r ~= 0
x = Nul(dim)$EAB => r::O
--- one? r => displayList(x)
- (r = 1) => displayList(x)
--- r = 1 => displayList(x)
+ one? r => displayList(x)
-- r = 0 => 0$I::O
-- x = Nul(dim)$EAB => r::O
r::O * displayList(x)
@@ -394,17 +391,13 @@ DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where
displayList:EAB -> O
displayList(x):O ==
le: L I := exponents(x)$EAB
--- reduce(_*,[(lv.i)::O for i in 1..dim | le.i = 1])$L(O)
--- reduce(_*,[(lv.i)::O for i in 1..dim | one?(le.i)])$L(O)
- reduce(_*,[(lv.i)::O for i in 1..dim | ((le.i) = 1)])$L(O)
+ reduce(_*,[(lv.i)::O for i in 1..dim | one?(le.i)])$L(O)
makeTerm:(R,EAB) -> O
makeTerm(r,x) ==
-- we know that r ~= 0
x = Nul(dim)$EAB => r::O
--- one? r => displayList(x)
- (r = 1) => displayList(x)
--- r = 1 => displayList(x)
+ one? r => displayList(x)
r::O * displayList(x)
terms : % -> List Record(k: EAB, c: R)
diff --git a/src/algebra/divisor.spad.pamphlet b/src/algebra/divisor.spad.pamphlet
index adc98c0f..c0fbbc1f 100644
--- a/src/algebra/divisor.spad.pamphlet
+++ b/src/algebra/divisor.spad.pamphlet
@@ -156,8 +156,7 @@ FractionalIdeal(R, F, UP, A): Exports == Implementation where
coerce(i:$):OutputForm ==
nm := num2O numer i
--- one? denom i => nm
- (denom i = 1) => nm
+ one? denom i => nm
(1::Integer::OutputForm) / (denom(i)::OutputForm) * nm
if F has Finite then
@@ -170,8 +169,7 @@ FractionalIdeal(R, F, UP, A): Exports == Implementation where
minimize i ==
n := (#(nm := numer i))
--- one?(n) or (n < 3 and ret? nm) => i
- (n = 1) or (n < 3 and ret? nm) => i
+ one?(n) or (n < 3 and ret? nm) => i
nrm := retract(norm mkIdeal(nm, 1))@R
for range in 1..5 repeat
(u := tryRange(range, nm, nrm, i)) case $ => return(u::$)
@@ -676,8 +674,7 @@ HyperellipticFiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
0 == divisor(1$R)
divisor(g:R) == [1, 0, g, true]
makeDivisor(a, b, g) == [a, b, g, false]
--- princ? d == one?(d.center) and zero?(d.polyPart)
- princ? d == (d.center = 1) and zero?(d.polyPart)
+ princ? d == one?(d.center) and zero?(d.polyPart)
ideal d == ideal([d.principalPart]) * mkIdeal(d.center, d.polyPart)
decompose d == [ideal makeDivisor(d.center, d.polyPart, 1), d.principalPart]
mkIdeal(a, b) == ideal [a::RF::R, reduce(monomial(1, 1)$UPUP - b::RF::UPUP)]
@@ -705,8 +702,7 @@ HyperellipticFiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
divisor(d.principalPart ** n) + divisor(mkIdeal(d.center,d.polyPart) ** n)
divisor(i:ID) ==
--- one?(n := #(v := basis minimize i)) => divisor v minIndex v
- (n := #(v := basis minimize i)) = 1 => divisor v minIndex v
+ one?(n := #(v := basis minimize i)) => divisor v minIndex v
n ~= 2 => ERR
a := v minIndex v
h := v maxIndex v
@@ -733,8 +729,7 @@ HyperellipticFiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
coerce(d:%):O ==
r := bracket [d.center::O, d.polyPart::O]
g := prefix(dvd, [d.principalPart::O])
--- z := one?(d.principalPart)
- z := (d.principalPart = 1)
+ z := one?(d.principalPart)
princ? d => (z => zer; g)
z => r
r + g
diff --git a/src/algebra/e04agents.spad.pamphlet b/src/algebra/e04agents.spad.pamphlet
index b001d080..af55f373 100644
--- a/src/algebra/e04agents.spad.pamphlet
+++ b/src/algebra/e04agents.spad.pamphlet
@@ -184,10 +184,8 @@ e04AgentsPackage(): E == I where
p := (retractIfCan(f)@Union(PDF,"failed"))$EDF
p case PDF =>
d := totalDegree(p)$PDF
--- one?(n*d) => "simple"
- (n*d) = 1 => "simple"
--- one?(d) => "linear"
- (d = 1) => "linear"
+ one?(n*d) => "simple"
+ one?(d) => "linear"
(d=2)@Boolean => "quadratic"
"non-linear"
"non-linear"
diff --git a/src/algebra/e04routine.spad.pamphlet b/src/algebra/e04routine.spad.pamphlet
index 876f969d..b0f4e6f6 100644
--- a/src/algebra/e04routine.spad.pamphlet
+++ b/src/algebra/e04routine.spad.pamphlet
@@ -166,8 +166,7 @@ e04fdfAnnaType(): NumericalOptimizationCategory == Result add
n:NNI := #(variables(args))
nn:INT := n
lw:INT :=
--- one?(nn) => 9+5*m
- (nn = 1) => 9+5*m
+ one?(nn) => 9+5*m
nn*(7+n+2*m+((nn-1) quo 2)$INT)+3*m
x := mat(args.init,n)
ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
@@ -278,8 +277,7 @@ e04gcfAnnaType(): NumericalOptimizationCategory == Result add
m:NNI := #(argsFn)
n:NNI := #(variables(args))
lw:INT :=
--- one?(n) => 11+5*m
- (n = 1) => 11+5*m
+ one?(n) => 11+5*m
2*n*(4+n+m)+3*m
x := mat(args.init,n)
ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
@@ -339,10 +337,8 @@ e04jafAnnaType(): NumericalOptimizationCategory == Result add
bound(a:LOCDF,b:LOCDF):Integer ==
empty?(concat(a,b)) => 1
--- one?(#(removeDuplicates(a))) and zero?(first(a)) => 2
- (#(removeDuplicates(a)) = 1) and zero?(first(a)) => 2
--- one?(#(removeDuplicates(a))) and one?(#(removeDuplicates(b))) => 3
- (#(removeDuplicates(a)) = 1) and (#(removeDuplicates(b)) = 1) => 3
+ one?(#(removeDuplicates(a))) and zero?(first(a)) => 2
+ one?(#(removeDuplicates(a))) and one?(#(removeDuplicates(b))) => 3
0
measure(R:RoutinesTable,args:NOA) ==
diff --git a/src/algebra/efuls.spad.pamphlet b/src/algebra/efuls.spad.pamphlet
index 6f62a3f1..41b26583 100644
--- a/src/algebra/efuls.spad.pamphlet
+++ b/src/algebra/efuls.spad.pamphlet
@@ -121,8 +121,7 @@ ElementaryFunctionsUnivariateLaurentSeries(Coef,UTS,ULS):_
nthRootUTS:(UTS,I) -> Union(UTS,"failed")
nthRootUTS(uts,n) ==
-- assumed: n > 1, uts has non-zero constant term
--- one? coefficient(uts,0) => uts ** inv(n::RN)
- coefficient(uts,0) = 1 => uts ** inv(n::RN)
+ one? coefficient(uts,0) => uts ** inv(n::RN)
RATPOWERS => uts ** inv(n::RN)
"failed"
@@ -142,8 +141,7 @@ ElementaryFunctionsUnivariateLaurentSeries(Coef,UTS,ULS):_
if Coef has Field then
(uls:ULS) ** (r:RN) ==
num := numer r; den := denom r
--- one? den => uls ** num
- den = 1 => uls ** num
+ one? den => uls ** num
deg := degree uls
if zero? (coef := coefficient(uls,deg)) then
uls := removeZeroes(1000,uls); deg := degree uls
diff --git a/src/algebra/efupxs.spad.pamphlet b/src/algebra/efupxs.spad.pamphlet
index 97bf95c7..cbf67b4a 100644
--- a/src/algebra/efupxs.spad.pamphlet
+++ b/src/algebra/efupxs.spad.pamphlet
@@ -116,8 +116,7 @@ ElementaryFunctionsUnivariatePuiseuxSeries(Coef,ULS,UPXS,EFULS):_
--% roots
nthRootIfCan(upxs,n) ==
--- one? n => upxs
- n = 1 => upxs
+ one? n => upxs
r := rationalPower upxs; uls := laurentRep upxs
deg := degree uls
if zero?(coef := coefficient(uls,deg)) then
@@ -131,8 +130,7 @@ ElementaryFunctionsUnivariatePuiseuxSeries(Coef,ULS,UPXS,EFULS):_
if Coef has Field then
(upxs:UPXS) ** (q:RN) ==
num := numer q; den := denom q
--- one? den => upxs ** num
- den = 1 => upxs ** num
+ one? den => upxs ** num
r := rationalPower upxs; uls := laurentRep upxs
deg := degree uls
if zero?(coef := coefficient(uls,deg)) then
diff --git a/src/algebra/elemntry.spad.pamphlet b/src/algebra/elemntry.spad.pamphlet
index 9a9bdeb2..356bf647 100644
--- a/src/algebra/elemntry.spad.pamphlet
+++ b/src/algebra/elemntry.spad.pamphlet
@@ -326,24 +326,20 @@ ElementaryFunction(R, F): Exports == Implementation where
even?(n::Z) => valueOrPole(values.m)
valueOrPole(values.(m+1))
(n := retractIfCan(2*q)@Union(Z, "failed")) case Z =>
--- one?(s := posrem(n::Z, 4)) => valueOrPole(values.(m+2))
- (s := posrem(n::Z, 4)) = 1 => valueOrPole(values.(m+2))
+ one?(s := posrem(n::Z, 4)) => valueOrPole(values.(m+2))
valueOrPole(values.(m+3))
(n := retractIfCan(3*q)@Union(Z, "failed")) case Z =>
--- one?(s := posrem(n::Z, 6)) => valueOrPole(values.(m+4))
- (s := posrem(n::Z, 6)) = 1 => valueOrPole(values.(m+4))
+ one?(s := posrem(n::Z, 6)) => valueOrPole(values.(m+4))
s = 2 => valueOrPole(values.(m+5))
s = 4 => valueOrPole(values.(m+6))
valueOrPole(values.(m+7))
(n := retractIfCan(4*q)@Union(Z, "failed")) case Z =>
--- one?(s := posrem(n::Z, 8)) => valueOrPole(values.(m+8))
- (s := posrem(n::Z, 8)) = 1 => valueOrPole(values.(m+8))
+ one?(s := posrem(n::Z, 8)) => valueOrPole(values.(m+8))
s = 3 => valueOrPole(values.(m+9))
s = 5 => valueOrPole(values.(m+10))
valueOrPole(values.(m+11))
(n := retractIfCan(6*q)@Union(Z, "failed")) case Z =>
--- one?(s := posrem(n::Z, 12)) => valueOrPole(values.(m+12))
- (s := posrem(n::Z, 12)) = 1 => valueOrPole(values.(m+12))
+ one?(s := posrem(n::Z, 12)) => valueOrPole(values.(m+12))
s = 5 => valueOrPole(values.(m+13))
s = 7 => valueOrPole(values.(m+14))
valueOrPole(values.(m+15))
@@ -463,8 +459,7 @@ ElementaryFunction(R, F): Exports == Implementation where
iasin x ==
zero? x => 0
--- one? x => pi() / (2::F)
- (x = 1) => pi() / (2::F)
+ one? x => pi() / (2::F)
x = -1 => - pi() / (2::F)
y := dropfun x
is?(x, opsin) => y
@@ -473,8 +468,7 @@ ElementaryFunction(R, F): Exports == Implementation where
iacos x ==
zero? x => pi() / (2::F)
--- one? x => 0
- (x = 1) => 0
+ one? x => 0
x = -1 => pi()
y := dropfun x
is?(x, opsin) => pi() / (2::F) - y
@@ -483,12 +477,10 @@ ElementaryFunction(R, F): Exports == Implementation where
iatan x ==
zero? x => 0
--- one? x => pi() / (4::F)
- (x = 1) => pi() / (4::F)
+ one? x => pi() / (4::F)
x = -1 => - pi() / (4::F)
x = (r3:=iisqrt3()) => pi() / (3::F)
--- one?(x*r3) => pi() / (6::F)
- (x*r3) = 1 => pi() / (6::F)
+ one?(x*r3) => pi() / (6::F)
y := dropfun x
is?(x, optan) => y
is?(x, opcot) => pi() / (2::F) - y
@@ -496,13 +488,11 @@ ElementaryFunction(R, F): Exports == Implementation where
iacot x ==
zero? x => pi() / (2::F)
--- one? x => pi() / (4::F)
- (x = 1) => pi() / (4::F)
+ one? x => pi() / (4::F)
x = -1 => 3 * pi() / (4::F)
x = (r3:=iisqrt3()) => pi() / (6::F)
x = -r3 => 5 * pi() / (6::F)
--- one?(xx:=x*r3) => pi() / (3::F)
- (xx:=x*r3) = 1 => pi() / (3::F)
+ one?(xx:=x*r3) => pi() / (3::F)
xx = -1 => 2* pi() / (3::F)
y := dropfun x
is?(x, optan) => pi() / (2::F) - y
@@ -511,8 +501,7 @@ ElementaryFunction(R, F): Exports == Implementation where
iasec x ==
zero? x => INV
--- one? x => 0
- (x = 1) => 0
+ one? x => 0
x = -1 => pi()
y := dropfun x
is?(x, opsec) => y
@@ -521,8 +510,7 @@ ElementaryFunction(R, F): Exports == Implementation where
iacsc x ==
zero? x => INV
--- one? x => pi() / (2::F)
- (x = 1) => pi() / (2::F)
+ one? x => pi() / (2::F)
x = -1 => - pi() / (2::F)
y := dropfun x
is?(x, opsec) => pi() / (2::F) - y
@@ -650,8 +638,7 @@ ElementaryFunction(R, F): Exports == Implementation where
iiilog x ==
zero? x => INV
--- one? x => 0
- (x = 1) => 0
+ one? x => 0
(u := isExpt(x, opexp)) case Record(var:K, exponent:Integer) =>
rec := u::Record(var:K, exponent:Integer)
arg := first argument(rec.var);
@@ -660,8 +647,7 @@ ElementaryFunction(R, F): Exports == Implementation where
ilog x
ilog x ==
--- ((num1 := one?(num := numer x)) or num = -1) and (den := denom x) ~= 1
- ((num1 := ((num := numer x) = 1)) or num = -1) and (den := denom x) ~= 1
+ ((num1 := one?(num := numer x)) or num = -1) and (den := denom x) ~= 1
and empty? variables x => - kernel(oplog, (num1 => den; -den)::F)
kernel(oplog, x)
diff --git a/src/algebra/expexpan.spad.pamphlet b/src/algebra/expexpan.spad.pamphlet
index 5dbc4c57..34ab10d2 100644
--- a/src/algebra/expexpan.spad.pamphlet
+++ b/src/algebra/expexpan.spad.pamphlet
@@ -423,8 +423,7 @@ ExponentialExpansion(R,FE,var,cen): Exports == Implementation where
--!! code can run forever in retractIfCan if original assignment
--!! for 'ff' is used
upxssingIfCan f ==
--- one? denom f => numer f
- (denom f = 1) => numer f
+ one? denom f => numer f
"failed"
retractIfCan(f:%):Union(UPXS,"failed") ==
diff --git a/src/algebra/expr.spad.pamphlet b/src/algebra/expr.spad.pamphlet
index 6c73da2a..fa8cfe82 100644
--- a/src/algebra/expr.spad.pamphlet
+++ b/src/algebra/expr.spad.pamphlet
@@ -85,8 +85,7 @@ Expression(R:OrderedSet): Exports == Implementation where
Rep := Fraction MP
0 == 0$Rep
1 == 1$Rep
--- one? x == one?(x)$Rep
- one? x == (x = 1)$Rep
+ one? x == one?(x)$Rep
zero? x == zero?(x)$Rep
- x:% == -$Rep x
n:Integer * x:% == n *$Rep x
diff --git a/src/algebra/exprode.spad.pamphlet b/src/algebra/exprode.spad.pamphlet
index 0259de07..2693eabf 100644
--- a/src/algebra/exprode.spad.pamphlet
+++ b/src/algebra/exprode.spad.pamphlet
@@ -116,8 +116,7 @@ ExpressionSpaceODESolver(R, F): Exports == Implementation where
K, R, P, F)
div2exquo f ==
--- one?(d := denom f) => f
- ((d := denom f) = 1) => f
+ one?(d := denom f) => f
opex(smp2exquo numer f, smp2exquo d)
-- if g is of the form a * k + b, then return -b/a
diff --git a/src/algebra/ffcat.spad.pamphlet b/src/algebra/ffcat.spad.pamphlet
index b69923d4..2f3c1ba4 100644
--- a/src/algebra/ffcat.spad.pamphlet
+++ b/src/algebra/ffcat.spad.pamphlet
@@ -618,8 +618,7 @@ FiniteFieldCategory() : Category ==_
q:=(size()-1)@Integer
equalone : Boolean := false
for exp in explist while not equalone repeat
--- equalone := one?(a**(q quo exp.factor))
- equalone := ((a**(q quo exp.factor)) = 1)
+ equalone := one?(a**(q quo exp.factor))
not equalone
order(e: %): PositiveInteger ==
e = 0 => error "order(0) is not defined "
@@ -628,16 +627,14 @@ FiniteFieldCategory() : Category ==_
lof:=factorsOfCyclicGroupSize()
for rec in lof repeat -- run through prime divisors
a := ord quo (primeDivisor := rec.factor)
--- goon := one?(e**a)
- goon := ((e**a) = 1)
+ goon := one?(e**a)
-- run through exponents of the prime divisors
for j in 0..(rec.exponent)-2 while goon repeat
-- as long as we get (e**ord = 1) we
-- continue dividing by primeDivisor
ord := a
a := ord quo primeDivisor
--- goon := one?(e**a)
- goon := ((e**a) = 1)
+ goon := one?(e**a)
if goon then ord := a
-- as we do a top down search we have found the
-- correct exponent of primeDivisor in order e
diff --git a/src/algebra/ffcg.spad.pamphlet b/src/algebra/ffcg.spad.pamphlet
index 941c34d6..1ed736db 100644
--- a/src/algebra/ffcg.spad.pamphlet
+++ b/src/algebra/ffcg.spad.pamphlet
@@ -157,8 +157,7 @@ FiniteFieldCyclicGroupExtensionByPolynomial(GF,defpol):_
(sizeCG quo gcd(sizeCG,x pretend NNI))::PI
primitive?(x:$) ==
--- zero?(x) or one?(x) => false
- zero?(x) or (x = 1) => false
+ zero?(x) or one?(x) => false
gcd(x::Rep,sizeCG)$Rep = 1$Rep => true
false
@@ -324,8 +323,7 @@ FiniteFieldCyclicGroupExtensionByPolynomial(GF,defpol):_
inv(x:$) ==
zero?(x) => error "inv: not invertible"
--- one?(x) => 1
- (x = 1) => 1
+ one?(x) => 1
sizeCG -$Rep x
x:$ ** n:PI == x ** n::I
diff --git a/src/algebra/ffnb.spad.pamphlet b/src/algebra/ffnb.spad.pamphlet
index c283b9ff..a4441b5a 100644
--- a/src/algebra/ffnb.spad.pamphlet
+++ b/src/algebra/ffnb.spad.pamphlet
@@ -186,8 +186,7 @@ InnerNormalBasisFieldFunctions(GF): Exports == Implementation where
a ** ex ==
e:NNI:=positiveRemainder(ex,sizeGF**((#a)::PI)-1)$I :: NNI
zero?(e)$NNI => new(#a,trGen)$VGF
--- one?(e)$NNI => copy(a)$VGF
- (e = 1)$NNI => copy(a)$VGF
+ one?(e)$NNI => copy(a)$VGF
-- inGroundField?(a) => new(#a,((a.1*trGen) **$GF e))$VGF
e1:SI:=(length(e)$I)::SI
sizeGF >$I 11 =>
@@ -213,8 +212,7 @@ InnerNormalBasisFieldFunctions(GF): Exports == Implementation where
-- computes a**e by repeated squaring
repSq(b,e) ==
a:=copy(b)$VGF
--- one? e => a
- (e = 1) => a
+ one? e => a
odd?(e)$I => a * repSq(a*a,(e quo 2) pretend NNI)
repSq(a*a,(e quo 2) pretend NNI)
@@ -586,13 +584,11 @@ FiniteFieldNormalBasisExtensionByPolynomial(GF,uni): Exports == _
coerce(x:$):OUT ==
l:List OUT:=nil()$(List OUT)
n : PI := extdeg
--- one? n => (x.1) :: OUT
- (n = 1) => (x.1) :: OUT
+ one? n => (x.1) :: OUT
for i in 1..n for b in basisOutput repeat
if not zero? x.i then
mon : OUT :=
--- one? x.i => b
- (x.i = 1) => b
+ one? x.i => b
((x.i)::OUT) *$OUT b
l:=cons(mon,l)$(List OUT)
null(l)$(List OUT) => (0::OUT)
diff --git a/src/algebra/ffx.spad.pamphlet b/src/algebra/ffx.spad.pamphlet
index 66ccd76a..4e45d712 100644
--- a/src/algebra/ffx.spad.pamphlet
+++ b/src/algebra/ffx.spad.pamphlet
@@ -66,10 +66,8 @@ IrredPolyOverFiniteField(GF:FiniteFieldCategory): Exports == Impl where
generateIrredPoly(n : N) : SUP ==
-- want same poly every time
--- one?(n) => monomial(1, 1)$SUP
- (n = 1) => monomial(1, 1)$SUP
--- one?(gcd(p, n)) or (n < q) =>
- (gcd(p, n) = 1) or (n < q) =>
+ one?(n) => monomial(1, 1)$SUP
+ one?(gcd(p, n)) or (n < q) =>
odd?(n) => getIrredPoly(2, n)
getIrredPoly(1, n)
getIrredPoly(q + 1, n)
diff --git a/src/algebra/float.spad.pamphlet b/src/algebra/float.spad.pamphlet
index 4ca77fdd..52eba7cc 100644
--- a/src/algebra/float.spad.pamphlet
+++ b/src/algebra/float.spad.pamphlet
@@ -259,8 +259,7 @@ Float():
asin x ==
zero? x => 0
negative? x => -asin(-x)
--- one? x => pi()/2
- (x = 1) => pi()/2
+ one? x => pi()/2
x > 1 => error "asin: argument > 1 in magnitude"
inc 5; r := atan(x/sqrt(sub(1,times(x,x)))); dec 5
normalize r
@@ -268,8 +267,7 @@ Float():
acos x ==
zero? x => pi()/2
negative? x => (inc 3; r := pi()-acos(-x); dec 3; normalize r)
--- one? x => 0
- (x = 1) => 0
+ one? x => 0
x > 1 => error "acos: argument > 1 in magnitude"
inc 5; r := atan(sqrt(sub(1,times(x,x)))/x); dec 5
normalize r
diff --git a/src/algebra/fmod.spad.pamphlet b/src/algebra/fmod.spad.pamphlet
index 57e6f206..5140356b 100644
--- a/src/algebra/fmod.spad.pamphlet
+++ b/src/algebra/fmod.spad.pamphlet
@@ -64,8 +64,7 @@ IntegerMod(p:PositiveInteger):
recip x ==
(c1, c2, g) := extendedEuclidean(x, q)$Rep
--- not one? g => "failed"
- not (g = 1) => "failed"
+ not one? g => "failed"
positiveRemainder(c1, q)
else
@@ -93,8 +92,7 @@ IntegerMod(p:PositiveInteger):
recip x ==
(c1, c2, g) := extendedEuclidean(x, p)$Rep
--- not one? g => "failed"
- not (g = 1) => "failed"
+ not one? g => "failed"
positiveRemainder(c1, p)
@
diff --git a/src/algebra/fortran.spad.pamphlet b/src/algebra/fortran.spad.pamphlet
index 4c6f9cc0..25da16cc 100644
--- a/src/algebra/fortran.spad.pamphlet
+++ b/src/algebra/fortran.spad.pamphlet
@@ -1592,19 +1592,15 @@ FortranExpression(basicSymbols,subscriptedSymbols,R):
fixUpSymbols(u:EXPR R):Union(EXPR R,"failed") ==
-- If its a univariate expression then just fix it up:
syms : L S := variables(u)
--- one?(#basicSymbols) and zero?(#subscriptedSymbols) =>
- (#basicSymbols = 1) and zero?(#subscriptedSymbols) =>
--- not one?(#syms) => "failed"
- not (#syms = 1) => "failed"
+ one?(#basicSymbols) and zero?(#subscriptedSymbols) =>
+ not one?(#syms) => "failed"
subst(u,equation(first(syms)::EXPR(R),first(basicSymbols)::EXPR(R)))
-- We have one variable but it is subscripted:
--- zero?(#basicSymbols) and one?(#subscriptedSymbols) =>
- zero?(#basicSymbols) and (#subscriptedSymbols = 1) =>
+ zero?(#basicSymbols) and one?(#subscriptedSymbols) =>
-- Make sure we don't have both X and X_i
for s in syms repeat
not scripted?(s) => return "failed"
--- not one?(#(syms:=removeDuplicates! [name(s) for s in syms]))=> "failed"
- not ((#(syms:=removeDuplicates! [name(s) for s in syms])) = 1)=> "failed"
+ not one?(#(syms:=removeDuplicates! [name(s) for s in syms]))=> "failed"
sym : Symbol := first subscriptedSymbols
subst(u,[mkEqn(sym,i) for i in variables(u)])
"failed"
diff --git a/src/algebra/fparfrac.spad.pamphlet b/src/algebra/fparfrac.spad.pamphlet
index 9afe1d78..7d7c48a1 100644
--- a/src/algebra/fparfrac.spad.pamphlet
+++ b/src/algebra/fparfrac.spad.pamphlet
@@ -106,8 +106,7 @@ FullPartialFractionExpansion(F, UP): Exports == Implementation where
-- returns Trace_k^k(a) (h(a) / (x - a)^n) where d(a) = 0
REC2RF(d, h, n) ==
--- one?(m := degree d) =>
- ((m := degree d) = 1) =>
+ one?(m := degree d) =>
a := - (leadingCoefficient reductum d) / (leadingCoefficient d)
h(a)::UP / (x - a::UP)**n
dd := UP2SUP d
@@ -174,16 +173,14 @@ FullPartialFractionExpansion(F, UP): Exports == Implementation where
ans
output(n, d, h) ==
--- one? degree d =>
- (degree d) = 1 =>
+ one? degree d =>
a := - leadingCoefficient(reductum d) / leadingCoefficient(d)
h(a)::O / outputexp((x - a::UP)::O, n)
sum(outputForm(makeSUP h, alpha) / outputexp(xx - alpha, n),
outputForm(makeSUP d, alpha) = zr)
outputexp(f, n) ==
--- one? n => f
- (n = 1) => f
+ one? n => f
f ** (n::O)
@
diff --git a/src/algebra/fr.spad.pamphlet b/src/algebra/fr.spad.pamphlet
index 39a7f429..fc7ccdc9 100644
--- a/src/algebra/fr.spad.pamphlet
+++ b/src/algebra/fr.spad.pamphlet
@@ -215,8 +215,7 @@ Factored(R: IntegralDomain): Exports == Implementation where
zero? u == # u.fct = 1 and
(first u.fct).flg case "nil" and
zero? (first u.fct).fctr and
--- one? u.unt
- (u.unt = 1)
+ one? u.unt
1 == [1, empty()]
one? u == empty? u.fct and u.unt = 1
mkFF(r, x) == [r, x]
@@ -277,10 +276,8 @@ Factored(R: IntegralDomain): Exports == Implementation where
u:% * v:% ==
zero? u or zero? v => 0
--- one? u => v
- (u = 1) => v
--- one? v => u
- (v = 1) => u
+ one? u => v
+ one? v => u
mkFF(unit u * unit v,
SimplifyFactorization concat(factorList u, copy factorList v))
@@ -362,8 +359,7 @@ Factored(R: IntegralDomain): Exports == Implementation where
unitNormalize(squareFree(r) pretend %)
else
coerce(r:R):% ==
--- one? r => 1
- (r = 1) => 1
+ one? r => 1
unitNormalize mkFF(1, [["nil", r, 1]$FF])
u = v ==
@@ -472,8 +468,7 @@ which causes wrong results as soon as units are involved, for example in
else
un := un * (ucar.unit ** e)
as := as * (ucar.associate ** e)
--- if not one?(ucar.canonical) then
- if not ((ucar.canonical) = 1) then
+ if not one?(ucar.canonical) then
vl := concat([x.flg, ucar.canonical, x.xpnt], vl)
[mkFF(un, empty()), mkFF(1, reverse_! vl), mkFF(as, empty())]
@@ -489,8 +484,7 @@ which causes wrong results as soon as units are involved, for example in
(expand(u * v1) + expand(v * v1)) * u1
gcd(u, v) ==
--- one? u or one? v => 1
- (u = 1) or (v = 1) => 1
+ one? u or one? v => 1
zero? u => v
zero? v => u
f1 := empty()$List(Integer) -- list of used factor indices in x
@@ -531,8 +525,7 @@ which causes wrong results as soon as units are involved, for example in
if R has UniqueFactorizationDomain then
prime? u ==
not(empty?(l := factorList u)) and (empty? rest l) and
--- one?(l.first.xpnt) and (l.first.flg case "prime")
- ((l.first.xpnt) = 1) and (l.first.flg case "prime")
+ one?(l.first.xpnt) and (l.first.flg case "prime")
@
\section{package FRUTIL FactoredFunctionUtilities}
diff --git a/src/algebra/fraction.spad.pamphlet b/src/algebra/fraction.spad.pamphlet
index 6fd77e97..56d14743 100644
--- a/src/algebra/fraction.spad.pamphlet
+++ b/src/algebra/fraction.spad.pamphlet
@@ -66,12 +66,10 @@ Localize(M:Module R,
[x.num,u]
m/d == if zero? d then error "division by zero" else [m,d]
coerce(x:%):OutputForm ==
--- one?(xd:=x.den) => (x.num)::OutputForm
- ((xd:=x.den) = 1) => (x.num)::OutputForm
+ one?(xd:=x.den) => (x.num)::OutputForm
(x.num)::OutputForm / (xd::OutputForm)
latex(x:%): String ==
--- one?(xd:=x.den) => latex(x.num)
- ((xd:=x.den) = 1) => latex(x.num)
+ one?(xd:=x.den) => latex(x.num)
nl : String := concat("{", concat(latex(x.num), "}")$String)$String
dl : String := concat("{", concat(latex(x.den), "}")$String)$String
concat("{ ", concat(nl, concat(" \over ", concat(dl, " }")$String)$String)$String)$String
@@ -324,13 +322,11 @@ Fraction(S: IntegralDomain): QuotientFieldCategory S with
if S has GcdDomain and S has canonicalUnitNormal then
retract(x:%):S ==
--- one?(x.den) => x.num
- ((x.den) = 1) => x.num
+ one?(x.den) => x.num
error "Denominator not equal to 1"
retractIfCan(x:%):Union(S, "failed") ==
--- one?(x.den) => x.num
- ((x.den) = 1) => x.num
+ one?(x.den) => x.num
"failed"
else
retract(x:%):S ==
@@ -341,21 +337,18 @@ Fraction(S: IntegralDomain): QuotientFieldCategory S with
if S has EuclideanDomain then
wholePart x ==
--- one?(x.den) => x.num
- ((x.den) = 1) => x.num
+ one?(x.den) => x.num
x.num quo x.den
if S has IntegerNumberSystem then
floor x ==
--- one?(x.den) => x.num
- ((x.den) = 1) => x.num
+ one?(x.den) => x.num
x < 0 => -ceiling(-x)
wholePart x
ceiling x ==
--- one?(x.den) => x.num
- ((x.den) = 1) => x.num
+ one?(x.den) => x.num
x < 0 => -floor(-x)
1 + wholePart x
@@ -414,8 +407,7 @@ Fraction(S: IntegralDomain): QuotientFieldCategory S with
normalize x ==
zero?(x.num) => 0
--- one?(x.den) => x
- ((x.den) = 1) => x
+ one?(x.den) => x
uca := unitNormal(x.den)
zero?(x.den := uca.canonical) => error "division by zero"
x.num := x.num * uca.associate
@@ -426,8 +418,7 @@ Fraction(S: IntegralDomain): QuotientFieldCategory S with
normalize [x.den, x.num]
cancelGcd x ==
--- one?(x.den) => x.den
- ((x.den) = 1) => x.den
+ one?(x.den) => x.den
d := gcd(x.num, x.den)
xn := x.num exquo d
xn case "failed" =>
@@ -475,10 +466,8 @@ Fraction(S: IntegralDomain): QuotientFieldCategory S with
x:% * y:% ==
zero? x or zero? y => 0
--- one? x => y
- (x = 1) => y
--- one? y => x
- (y = 1) => x
+ one? x => y
+ one? y => x
(x, y) := ([x.num, y.den], [y.num, x.den])
cancelGcd x; cancelGcd y;
normalize [x.num * y.num, x.den * y.den]
@@ -506,8 +495,7 @@ Fraction(S: IntegralDomain): QuotientFieldCategory S with
x = y == (x.num = y.num) and (x.den = y.den)
--x / dd == (cancelGcd (z:=[x.num,dd*x.den]); normalize z)
--- one? x == one? (x.num) and one? (x.den)
- one? x == ((x.num) = 1) and ((x.den) = 1)
+ one? x == one? (x.num) and one? (x.den)
-- again assuming canonical nature of representation
else
@@ -549,8 +537,7 @@ Fraction(S: IntegralDomain): QuotientFieldCategory S with
qqD:DP:=map(retract(#1*denqq),qq)
g:=gcdPolynomial(ppD,qqD)
zero? degree g => 1
--- one? (lc:=leadingCoefficient g) => map(#1::%,g)
- ((lc:=leadingCoefficient g) = 1) => map(#1::%,g)
+ one? (lc:=leadingCoefficient g) => map(#1::%,g)
map(#1 / lc,g)
if (S has PolynomialFactorizationExplicit) then
diff --git a/src/algebra/free.spad.pamphlet b/src/algebra/free.spad.pamphlet
index 19bf701c..c57b4c64 100644
--- a/src/algebra/free.spad.pamphlet
+++ b/src/algebra/free.spad.pamphlet
@@ -238,10 +238,8 @@ FreeMonoid(S: SetCategory): FMcategory == FMdefinition where
s:S ** n:NonNegativeInteger == makeTerm(s, n)
f:$ * g:$ ==
--- one? f => g
- (f = 1) => g
--- one? g => f
- (g = 1) => f
+ one? f => g
+ one? g => f
lg := listOfMonoms g
ls := last(lf := listOfMonoms f)
ls.gen = lg.first.gen =>
@@ -250,8 +248,7 @@ FreeMonoid(S: SetCategory): FMcategory == FMdefinition where
makeMulti concat(lf, lg)
overlap(la, ar) ==
--- one? la or one? ar => [la, 1, ar]
- (la = 1) or (ar = 1) => [la, 1, ar]
+ one? la or one? ar => [la, 1, ar]
lla := la0 := listOfMonoms la
lar := listOfMonoms ar
l:List(REC) := empty()
@@ -278,8 +275,7 @@ FreeMonoid(S: SetCategory): FMcategory == FMdefinition where
[makeMulti la0, 1, makeMulti lar]
divide(lar, a) ==
--- one? a => [lar, 1]
- (a = 1) => [lar, 1]
+ one? a => [lar, 1]
Na : Integer := #(la := listOfMonoms a)
Nlar : Integer := #(llar := listOfMonoms lar)
l:List(REC) := empty()
diff --git a/src/algebra/fs2expxp.spad.pamphlet b/src/algebra/fs2expxp.spad.pamphlet
index fed80080..ad344d99 100644
--- a/src/algebra/fs2expxp.spad.pamphlet
+++ b/src/algebra/fs2expxp.spad.pamphlet
@@ -209,8 +209,7 @@ FunctionSpaceToExponentialExpansion(R,FE,x,cen):_
-- is the function a power with exponent other than 0 or 1?
(expt := isPower fcn) case "failed" => "failed"
power := expt :: Record(val:FE,exponent:I)
--- one? power.exponent => "failed"
- (power.exponent = 1) => "failed"
+ one? power.exponent => "failed"
power
negativePowerOK? upxs ==
diff --git a/src/algebra/fs2ups.spad.pamphlet b/src/algebra/fs2ups.spad.pamphlet
index b43416e3..e27f4900 100644
--- a/src/algebra/fs2ups.spad.pamphlet
+++ b/src/algebra/fs2ups.spad.pamphlet
@@ -267,8 +267,7 @@ FunctionSpaceToUnivariatePowerSeries(R,FE,Expon,UPS,TRAN,x):_
-- is the function a power with exponent other than 0 or 1?
(expt := isPower fcn) case "failed" => "failed"
power := expt :: Record(val:FE,exponent:I)
--- one? power.exponent => "failed"
- (power.exponent = 1) => "failed"
+ one? power.exponent => "failed"
power
powerToUPS(fcn,n,posCheck?,atanFlag) ==
diff --git a/src/algebra/fspace.spad.pamphlet b/src/algebra/fspace.spad.pamphlet
index 1d46ffca..4ba47d9d 100644
--- a/src/algebra/fspace.spad.pamphlet
+++ b/src/algebra/fspace.spad.pamphlet
@@ -735,8 +735,7 @@ FunctionSpace(R:OrderedSet): Category == Definition where
[kernel(op, z), g, l.n]
opderiv(op, n) ==
--- one? n =>
- (n = 1) =>
+ one? n =>
g := symsub(gendiff, n)::%
[kernel(opdiff,[kernel(op, g), g, first #1])]
[kernel(opdiff, diffArg(#1, op, i)) for i in 1..n]
@@ -842,8 +841,7 @@ FunctionSpace(R:OrderedSet): Category == Definition where
if R has RetractableTo Z then
smpIsMult p ==
--- (u := mainVariable p) case K and one? degree(q:=univariate(p,u::K))
- (u := mainVariable p) case K and (degree(q:=univariate(p,u::K))=1)
+ (u := mainVariable p) case K and one? degree(q:=univariate(p,u::K))
and zero?(leadingCoefficient reductum q)
and ((r:=retractIfCan(leadingCoefficient q)@Union(R,"failed"))
case R)
@@ -948,8 +946,7 @@ FunctionSpace(R:OrderedSet): Category == Definition where
retract(x:%):R == (retract(numer x)@R exquo retract(denom x)@R)::R
coerce(x:%):OutputForm ==
--- one?(denom x) => smp2O numer x
- ((denom x) = 1) => smp2O numer x
+ one?(denom x) => smp2O numer x
smp2O(numer x) / smp2O(denom x)
retractIfCan(x:%):Union(R, "failed") ==
diff --git a/src/algebra/galfact.spad.pamphlet b/src/algebra/galfact.spad.pamphlet
index 0e06b615..92ad2d65 100644
--- a/src/algebra/galfact.spad.pamphlet
+++ b/src/algebra/galfact.spad.pamphlet
@@ -260,8 +260,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
tc := leadingCoefficient rf
rf := reductum rf
for p in factors(factor c)$Factored(Z) repeat
--- if (one? p.exponent) and (not zero? (lc rem p.factor)) and
- if (p.exponent = 1) and (not zero? (lc rem p.factor)) and
+ if (one? p.exponent) and (not zero? (lc rem p.factor)) and
(not zero? (tc rem ((p.factor)**2))) then return true
false
@@ -298,8 +297,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
fullSet(n:N):Set N == set [ i for i in 0..n ]
modularFactor(p:UP):MFact ==
--- not one? abs(content(p)) =>
- not (abs(content(p)) = 1) =>
+ not one? abs(content(p)) =>
error "modularFactor: the polynomial is not primitive."
zero? (n := degree p) => [0,[p]]
@@ -462,8 +460,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
degf := degree f
d := select(#1<=degf,d)
if degf<=1 then -- lf exhausted
--- if one? degf then
- if (degf = 1) then
+ if one? degf then
ltrue := cons(f,ltrue)
return ltrue -- 1st exit, all factors found
else -- can we go on with the same pk?
@@ -576,8 +573,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
b := b+(r::Z)
a := 2*a
d := gcd(a,b)
--- if not one? d then
- if not (d = 1) then
+ if not one? d then
a := a quo d
b := b quo d
f: UP := monomial(a,1)+monomial(b,0)
@@ -616,8 +612,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
zero? d => [c,factorlist]$FinalFact
-- is f linear?
--- one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
- (d = 1) => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
+ one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
lcPol: UP := leadingCoefficient(f) :: UP
@@ -654,8 +649,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
mult := sqfr.exponent
sqff := sqfr.factor
d := degree sqff
--- one? d => factorlist := cons([sqff,mult]$ParFact,factorlist)
- (d = 1) => factorlist := cons([sqff,mult]$ParFact,factorlist)
+ one? d => factorlist := cons([sqff,mult]$ParFact,factorlist)
d=2 =>
factorlist := append([[pf,mult]$ParFact for pf in quadratic(sqff)],
factorlist)
@@ -689,8 +683,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
zero? d => [c,factorlist]$FinalFact
-- is f linear?
--- one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
- (d = 1) => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
+ one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
lcPol: UP := leadingCoefficient(f) :: UP
@@ -723,8 +716,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
-- f is not square-free :
sqfflist := factors squareFree(f)
--- if one?(#(sqfflist)) then -- indeed f was a power of a square-free
- if ((#(sqfflist)) = 1) then -- indeed f was a power of a square-free
+ if one?(#(sqfflist)) then -- indeed f was a power of a square-free
r := max(r quo ((first sqfflist).exponent),2)::N
else
r := 2
@@ -732,8 +724,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
mult := sqfr.exponent
sqff := sqfr.factor
d := degree sqff
--- one? d =>
- (d = 1) =>
+ one? d =>
factorlist := cons([sqff,mult]$ParFact,factorlist)
maxd := (max(fd)-mult)::N
fd := select(#1<=maxd,fd)
@@ -798,8 +789,7 @@ GaloisGroupFactorizer(UP): Exports == Implementation where
factorOfDegree(d:P,p:UP,ld:List N,r:N,sqf:Boolean):Union(UP,"failed") ==
dp := degree p
errorsum?(dp,ld) => error "factorOfDegree: Bad arguments"
--- (one? (d::N)) and noLinearFactor?(p) => "failed"
- ((d::N) = 1) and noLinearFactor?(p) => "failed"
+ (one? (d::N)) and noLinearFactor?(p) => "failed"
lf := btwFact(p,sqf,makeSet(ld),r).factors
for f in lf repeat
degree(f.irr)=d => return f.irr
diff --git a/src/algebra/galpolyu.spad.pamphlet b/src/algebra/galpolyu.spad.pamphlet
index 2e573208..7e870fb0 100644
--- a/src/algebra/galpolyu.spad.pamphlet
+++ b/src/algebra/galpolyu.spad.pamphlet
@@ -79,8 +79,7 @@ GaloisGroupPolynomialUtilities(R,UP): Exports == Implementation where
degreePartition(r:Factored UP):Multiset N ==
multiset([ degree(nthFactor(r,i)) for i in 1..numberOfFactors r ])
--- monic?(p:UP):Boolean == one? leadingCoefficient p
- monic?(p:UP):Boolean == (leadingCoefficient p) = 1
+ monic?(p:UP):Boolean == one? leadingCoefficient p
unvectorise(v:Vector R):UP ==
p : UP := 0
@@ -94,8 +93,7 @@ GaloisGroupPolynomialUtilities(R,UP): Exports == Implementation where
r
scaleRoots(p:UP,c:R):UP ==
--- one? c => p
- (c = 1) => p
+ one? c => p
n := degree p
zero? c => monomial(leadingCoefficient p,n)
r : UP := 0
diff --git a/src/algebra/galutil.spad.pamphlet b/src/algebra/galutil.spad.pamphlet
index 8873a5eb..fd126dbe 100644
--- a/src/algebra/galutil.spad.pamphlet
+++ b/src/algebra/galutil.spad.pamphlet
@@ -91,8 +91,7 @@ GaloisGroupUtilities(R): Exports == Implementation where
negative? r => 0
(d := n-r) < r => pascalTriangle(n,d)
zero? r => 1$R
--- one? r => n :: R
- (r = 1) => n :: R
+ one? r => n :: R
n > rangepascaltriangle =>
binomial(n,r)$IntegerCombinatoricFunctions(Z) :: R
n <= ncomputed =>
diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet
index a22dc1a0..abbe8cee 100644
--- a/src/algebra/gaussian.spad.pamphlet
+++ b/src/algebra/gaussian.spad.pamphlet
@@ -170,10 +170,8 @@ ComplexCategory(R:CommutativeRing): Category ==
zero? i => re
outi := '%i::OutputForm
ip :=
--- one? i => outi
- (i = 1) => outi
--- one?(-i) => -outi
- ((-i) = 1) => -outi
+ one? i => outi
+ one?(-i) => -outi
ie * outi
zero? r => ip
re + ip
@@ -256,8 +254,7 @@ ComplexCategory(R:CommutativeRing): Category ==
if R has IntegralDomain then
_exquo(x:%, r:R) ==
--- one? r => x
- (r = 1) => x
+ one? r => x
(r1 := real(x) exquo r) case "failed" => "failed"
(r2 := imag(x) exquo r) case "failed" => "failed"
complex(r1, r2)
@@ -604,8 +601,7 @@ Complex(R:CommutativeRing): ComplexCategory(R) with
0 == [0, 0]
1 == [1, 0]
zero? x == zero?(x.real) and zero?(x.imag)
--- one? x == one?(x.real) and zero?(x.imag)
- one? x == ((x.real) = 1) and zero?(x.imag)
+ one? x == one?(x.real) and zero?(x.imag)
coerce(r:R):% == [r, 0]
complex(r, i) == [r, i]
real x == x.real
diff --git a/src/algebra/gb.spad.pamphlet b/src/algebra/gb.spad.pamphlet
index 4cff4aac..895480fd 100644
--- a/src/algebra/gb.spad.pamphlet
+++ b/src/algebra/gb.spad.pamphlet
@@ -117,8 +117,7 @@ GroebnerPackage(Dom, Expon, VarSet, Dpol): T == C where
if Dom has Field then
monicize(p: Dpol):Dpol ==
--- one?(lc := leadingCoefficient p) => p
- ((lc := leadingCoefficient p) = 1) => p
+ one?(lc := leadingCoefficient p) => p
inv(lc)*p
normalForm(p : Dpol, l : List(Dpol)) : Dpol ==
diff --git a/src/algebra/gpgcd.spad.pamphlet b/src/algebra/gpgcd.spad.pamphlet
index 5b5c4510..7a5d282f 100644
--- a/src/algebra/gpgcd.spad.pamphlet
+++ b/src/algebra/gpgcd.spad.pamphlet
@@ -119,8 +119,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
pp1:=flatten(p1,v1)
pp2:=flatten(p2,v2)
g:=gcdSameVariables(pp1,pp2,v)
--- one? g => gcd(c1,c2)::SUPP
- (g = 1) => gcd(c1,c2)::SUPP
+ one? g => gcd(c1,c2)::SUPP
(#v1 = 0 or not (p1 exquo g) case "failed") and
-- if #vi = 0 then pp1 = p1, so we know g divides
(#v2 = 0 or not (p2 exquo g) case "failed")
@@ -132,8 +131,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
if (#v1 = 0) then g:= gcdSameVariables(g,flatten(p2,v2),v)
else if (#v2=0) then g:=gcdSameVariables(g,flatten(p1,v1),v)
else g:=gcdSameVariables(g,flatten(p1,v1)-flatten(p2,v2),v)
--- one? g => gcd(c1,c2)::SUPP
- (g = 1) => gcd(c1,c2)::SUPP
+ one? g => gcd(c1,c2)::SUPP
(#v1 = 0 or not (p1 exquo g) case "failed") and
(#v2 = 0 or not (p2 exquo g) case "failed")
=> g*gcd(c1,c2)::SUPP -- divdes them both, so is the gcd
@@ -141,8 +139,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
v1:=setDifference(vp1,v)
if #v1 ~= 0 then
g:=recursivelyGCDCoefficients(g,v,p1,v1)
--- one? g => return gcd(c1,c2)::SUPP
- (g = 1) => return gcd(c1,c2)::SUPP
+ one? g => return gcd(c1,c2)::SUPP
v:=variables g -- there can be at most these variables in answer
v2:=setDifference(vp2,v)
recursivelyGCDCoefficients(g,v,p2,v2)*gcd(c1,c2)
@@ -254,8 +251,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
oldg:=g
if pv = [] then g:=gcdSameVariables(g,p1,v)
else g:=recursivelyGCDCoefficients(p,v,p1,pv)
--- one? g => return 1
- (g = 1) => return 1
+ one? g => return 1
g~=oldg =>
oldv:=v
v:=variables g
@@ -276,8 +272,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
-- p1 is non-zero, but has degree zero
-- p2 is non-zero
cp1:=leadingCoefficient p1
--- one? cp1 => 1
- (cp1 = 1) => 1
+ one? cp1 => 1
degree p2 = 0 => gcd(cp1,leadingCoefficient p2)::SUPP
un?:=unit? cp1
while not zero? p2 and not un? repeat
diff --git a/src/algebra/gpol.spad.pamphlet b/src/algebra/gpol.spad.pamphlet
index 3d09fc08..52918474 100644
--- a/src/algebra/gpol.spad.pamphlet
+++ b/src/algebra/gpol.spad.pamphlet
@@ -103,14 +103,12 @@ LaurentPolynomial(R, UP): Exports == Implementation where
monTerm(r, n, v) ==
zero? n => r::O
--- one? n => v
- (n = 1) => v
+ one? n => v
v ** (n::O)
toutput(r, n, v) ==
mon := monTerm(r, n, v)
--- zero? n or one? r => mon
- zero? n or (r = 1) => mon
+ zero? n or one? r => mon
r = -1 => - mon
r::O * mon
diff --git a/src/algebra/intaf.spad.pamphlet b/src/algebra/intaf.spad.pamphlet
index 8a4e2b94..83ba77fb 100644
--- a/src/algebra/intaf.spad.pamphlet
+++ b/src/algebra/intaf.spad.pamphlet
@@ -436,8 +436,7 @@ PureAlgebraicIntegration(R, F, L): Exports == Implementation where
-- u^n = y^n = g(x) = a x + b
-- returns the integral as an integral of a rational function in u
rationalInt(f, n, g) ==
--- not one? degree g => error "rationalInt: radicand must be linear"
- not ((degree g) = 1) => error "rationalInt: radicand must be linear"
+ not one? degree g => error "rationalInt: radicand must be linear"
a := leadingCoefficient g
integrate(n * monomial(inv a, (n-1)::N)$UP
* chv(f, n, a, leadingCoefficient reductum g))
@@ -505,8 +504,7 @@ PureAlgebraicIntegration(R, F, L): Exports == Implementation where
* chv0(ug::UPUP, rec.exponent, 1, 0),
symbolIfCan(dumk)::SY)) case "failed" => "failed"
eval(u::F, dumk, k::F)
--- one?(rec.coef) =>
- ((rec.coef) = 1) =>
+ one?(rec.coef) =>
curve := RadicalFunctionField(F, UP, UPUP, q::RF, rec.exponent)
rc := algDsolve(D()$LDALG + reduce(univariate(nfp, x, k, p))::LDALG,
reduce univariate(g, x, k, p))$RDALG
diff --git a/src/algebra/intalg.spad.pamphlet b/src/algebra/intalg.spad.pamphlet
index c9002c53..cb4b7d08 100644
--- a/src/algebra/intalg.spad.pamphlet
+++ b/src/algebra/intalg.spad.pamphlet
@@ -298,8 +298,7 @@ AlgebraicIntegrate(R0, F, UP, UPUP, R): Exports == Implementation where
pLogDeriv(log, derivation) ==
map(derivation, log.coeff) ~= 0 =>
error "can only handle logs with constant coefficients"
--- one?(n := degree(log.coeff)) =>
- ((n := degree(log.coeff)) = 1) =>
+ one?(n := degree(log.coeff)) =>
c := - (leadingCoefficient reductum log.coeff)
/ (leadingCoefficient log.coeff)
ans := (log.logand) c
diff --git a/src/algebra/intaux.spad.pamphlet b/src/algebra/intaux.spad.pamphlet
index d7b72256..8f103651 100644
--- a/src/algebra/intaux.spad.pamphlet
+++ b/src/algebra/intaux.spad.pamphlet
@@ -94,8 +94,7 @@ IntegrationResult(F:Field): Exports == Implementation where
integral(f:F, x:Symbol):% == integral(f, x::F)
LOG2O rec ==
--- one? degree rec.coeff =>
- (degree rec.coeff) = 1 =>
+ one? degree rec.coeff =>
-- deg 1 minimal poly doesn't get sigma
lastc := - coefficient(rec.coeff, 0) / coefficient(rec.coeff, 1)
lg := (rec.logand) lastc
@@ -145,16 +144,14 @@ IntegrationResult(F:Field): Exports == Implementation where
+ _+/[pNeDeriv(ne, derivation) for ne in notelem u]
pNeDeriv(ne, derivation) ==
--- one? derivation(ne.intvar) => ne.integrand
- (derivation(ne.intvar) = 1) => ne.integrand
+ one? derivation(ne.intvar) => ne.integrand
zero? derivation(ne.integrand) => 0
error "pNeDeriv: cannot differentiate not elementary part into F"
pLogDeriv(log, derivation) ==
map(derivation, log.coeff) ~= 0 =>
error "pLogDeriv: can only handle logs with constant coefficients"
--- one?(n := degree(log.coeff)) =>
- ((n := degree(log.coeff)) = 1) =>
+ one?(n := degree(log.coeff)) =>
c := - (leadingCoefficient reductum log.coeff)
/ (leadingCoefficient log.coeff)
ans := (log.logand) c
diff --git a/src/algebra/intclos.spad.pamphlet b/src/algebra/intclos.spad.pamphlet
index 802f079d..5e5a13a5 100644
--- a/src/algebra/intclos.spad.pamphlet
+++ b/src/algebra/intclos.spad.pamphlet
@@ -158,8 +158,7 @@ IntegralBasisTools(R,UP,F): Exports == Implementation where
for i in 1..n repeat
for j in i..n repeat
if not zero?(mij := qelt(mat,i,j)) then d := gcd(d,mij)
--- one? d => return d
- (d = 1) => return d
+ one? d => return d
d
divideIfCan_!(matrix,matrixOut,prime,n) ==
@@ -654,8 +653,7 @@ NumberFieldIntegralBasis(UP,F): Exports == Implementation where
-- these are wrt the original basis for F
runningRbden : I := 1
-- runningRbden = denominator for current basis matrix
--- one? sing and empty? wilds => [runningRb, runningRbden, runningRbinv]
- (sing = 1) and empty? wilds => [runningRb, runningRbden, runningRbinv]
+ one? sing and empty? wilds => [runningRb, runningRbden, runningRbinv]
-- id = basis matrix of the ideal (p-radical) wrt current basis
matrixOut : Mat := scalarMatrix(n,0)
for p in wilds repeat
@@ -721,8 +719,7 @@ NumberFieldIntegralBasis(UP,F): Exports == Implementation where
rbinv := UpTriBddDenomInv(rb, rbden)
disc := disc0 quo (index * index)
indexChange := index quo oldIndex; oldIndex := index
--- one? indexChange => return [rb, rbden, rbinv, disc]
- (indexChange = 1) => return [rb, rbden, rbinv, disc]
+ one? indexChange => return [rb, rbden, rbinv, disc]
tfm := ((rb * traceMat * transpose rb) exquo (rbden * rbden)) :: Mat
iWildLocalIntegralBasis(matrixOut,disc,p) ==
@@ -755,8 +752,7 @@ NumberFieldIntegralBasis(UP,F): Exports == Implementation where
rbinv := UpTriBddDenomInv(rb, rbden)
indexChange := index quo oldIndex; oldIndex := index
disc := disc quo (indexChange * indexChange)
--- one? indexChange or gcd(p2,disc) ~= p2 =>
- (indexChange = 1) or gcd(p2,disc) ~= p2 =>
+ one? indexChange or gcd(p2,disc) ~= p2 =>
return [rb, rbden, rbinv, disc]
discriminant() ==
diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet
index 1d0009a0..f25af008 100644
--- a/src/algebra/integer.spad.pamphlet
+++ b/src/algebra/integer.spad.pamphlet
@@ -58,9 +58,7 @@ IntegerSolveLinearPolynomialEquation(): C ==T
@
\section{domain INT Integer}
-The function {\bf one?} has been rewritten back to its original form.
-The NAG version called a lisp primitive that exists only in Codemist
-Common Lisp and is not defined in Common Lisp.
+
<<domain INT Integer>>=
)abbrev domain INT Integer
++ Author:
@@ -135,7 +133,6 @@ Integer: Join(IntegerNumberSystem, ConvertibleTo String, OpenMath) with
OMputEndObject(dev)
zero? x == ZEROP(x)$Lisp
--- one? x == ONEP(x)$Lisp
one? x == x = 1
0 == 0$Lisp
1 == 1$Lisp
@@ -201,8 +198,7 @@ Integer: Join(IntegerNumberSystem, ConvertibleTo String, OpenMath) with
zero? y => "failed"
zero?(x rem y) => x quo y
"failed"
--- recip(x) == if one? x or x=-1 then x else "failed"
- recip(x) == if (x = 1) or x=-1 then x else "failed"
+ recip(x) == if one? x or x=-1 then x else "failed"
gcd(x,y) == GCD(x,y)$Lisp
UCA ==> Record(unit:%,canonical:%,associate:%)
unitNormal x ==
diff --git a/src/algebra/intfact.spad.pamphlet b/src/algebra/intfact.spad.pamphlet
index 8e21b097..a1e08c3b 100644
--- a/src/algebra/intfact.spad.pamphlet
+++ b/src/algebra/intfact.spad.pamphlet
@@ -112,13 +112,11 @@ IntegerPrimesPackage(I:IntegerNumberSystem): with
-- for most n this probability is much greater than 3/4
t := powmod(p, q, n)
-- neither of these cases tells us anything
--- if not (one? t or t = nm1) then
- if not ((t = 1) or t = nm1) then
+ if not (one? t or t = nm1) then
for j in 1..k-1 repeat
oldt := t
t := mulmod(t, t, n)
--- one? t => return true
- (t = 1) => return true
+ one? t => return true
-- we have squared someting not -1 and got 1
t = nm1 =>
leave
@@ -131,13 +129,11 @@ IntegerPrimesPackage(I:IntegerNumberSystem): with
t := powmod(p, q, n)
-- neither of these cases tells us anything
if t=nm1 then count2Order(1):=count2Order(1)+1
--- if not (one? t or t = nm1) then
- if not ((t = 1) or t = nm1) then
+ if not (one? t or t = nm1) then
for j in 1..k-1 repeat
oldt := t
t := mulmod(t, t, n)
--- one? t => return true
- (t = 1) => return true
+ one? t => return true
-- we have squared someting not -1 and got 1
t = nm1 =>
rootsMinus1:=union(rootsMinus1,oldt)
@@ -150,8 +146,7 @@ IntegerPrimesPackage(I:IntegerNumberSystem): with
prime? n ==
n < two => false
n < nextSmallPrime => member?(n, smallPrimes)
--- not one? gcd(n, productSmallPrimes) => false
- not (gcd(n, productSmallPrimes) = 1) => false
+ not one? gcd(n, productSmallPrimes) => false
n < nextSmallPrimeSquared => true
nm1 := n-1
@@ -277,8 +272,7 @@ IntegerRoots(I:IntegerNumberSystem): Exports == Implementation where
perfectNthRoot n == -- complexity (log log n)**2 (log n)**2
m:NNI
--- one? n or zero? n or n = -1 => [n, 1]
- (n = 1) or zero? n or n = -1 => [n, 1]
+ one? n or zero? n or n = -1 => [n, 1]
e:NNI := 1
p:NNI := 2
while p::I <= length(n) + 1 repeat
@@ -290,15 +284,13 @@ IntegerRoots(I:IntegerNumberSystem): Exports == Implementation where
approxNthRoot(a, n) == -- complexity (log log n) (log n)**2
zero? n => error "invalid arguments"
--- one? n => a
- (n = 1) => a
+ one? n => a
n=2 => approxSqrt a
negative? a =>
odd? n => - approxNthRoot(-a, n)
0
zero? a => 0
--- one? a => 1
- (a = 1) => 1
+ one? a => 1
-- quick check for case of large n
((3*n) quo 2)::I >= (l := length a) => two
-- the initial approximation must be >= the root
@@ -389,8 +381,7 @@ IntegerFactorizationPackage(I): Exports == Implementation where
lim > (100000::I) => makeFR(u, factorList factor m)
x := BasicSieve(m, lim)
y :=
--- one?(m:= unit x) => factorList x
- ((m:= unit x) = 1) => factorList x
+ one?(m:= unit x) => factorList x
(v := perfectSqrt m) case I =>
concat_!(factorList x, ["sqfr",v,2]$FFE)
concat_!(factorList x, ["sqfr",m,1]$FFE)
@@ -484,8 +475,7 @@ IntegerFactorizationPackage(I): Exports == Implementation where
else (n := m; u := 1)
b := BasicSieve(n, 10000::I)
flb := factorList b
--- one?(n := unit b) => makeFR(u, flb)
- ((n := unit b) = 1) => makeFR(u, flb)
+ one?(n := unit b) => makeFR(u, flb)
a:LMI := dictionary() -- numbers yet to be factored
b:LMI := dictionary() -- prime factors found
f:LMI := dictionary() -- number which could not be factored
diff --git a/src/algebra/intpm.spad.pamphlet b/src/algebra/intpm.spad.pamphlet
index dad6bfa9..3fb0f60a 100644
--- a/src/algebra/intpm.spad.pamphlet
+++ b/src/algebra/intpm.spad.pamphlet
@@ -138,12 +138,10 @@ PatternMatchIntegration(R, F): Exports == Implementation where
goodlilog? : (K, P) -> Boolean
gooddilog? : (K, P, P) -> Boolean
--- goodlilog?(k, p) == is?(k, "log"::SY) and one? minimumDegree(p, k)
- goodlilog?(k, p) == is?(k, "log"::SY) and (minimumDegree(p, k) = 1)
+ goodlilog?(k, p) == is?(k, "log"::SY) and one? minimumDegree(p, k)
gooddilog?(k, p, q) ==
--- is?(k, "log"::SY) and one? degree(p, k) and zero? degree(q, k)
- is?(k, "log"::SY) and (degree(p, k) = 1) and zero? degree(q, k)
+ is?(k, "log"::SY) and one? degree(p, k) and zero? degree(q, k)
-- matches the integral to a result of the form d * erf(u) or d * ei(u)
-- returns [case, u, d]
@@ -246,8 +244,7 @@ PatternMatchIntegration(R, F): Exports == Implementation where
-- returns a simplified sqrt(y)
insqrt y ==
rec := froot(y, 2)$PolynomialRoots(IndexedExponents K, K, R, P, F)
--- one?(rec.exponent) => rec.coef * rec.radicand
- ((rec.exponent) = 1) => rec.coef * rec.radicand
+ one?(rec.exponent) => rec.coef * rec.radicand
rec.exponent ~=2 => error "insqrt: hould not happen"
rec.coef * sqrt(rec.radicand)
@@ -320,8 +317,7 @@ PatternMatchIntegration(R, F): Exports == Implementation where
empty()
pmintegrate(f, x, a, b) ==
--- zero? a and one? whatInfinity b =>
- zero? a and ((whatInfinity b) = 1) =>
+ zero? a and one? whatInfinity b =>
formula1(f, x, constant(x::F), suchThat(c, freeOf?(#1, x)))
"failed"
diff --git a/src/algebra/intrf.spad.pamphlet b/src/algebra/intrf.spad.pamphlet
index 73a73040..ae261643 100644
--- a/src/algebra/intrf.spad.pamphlet
+++ b/src/algebra/intrf.spad.pamphlet
@@ -443,8 +443,7 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
UP22UPR swap primitivePart(resultvec(term.exponent),term.factor)]
for term in factors(rec.special)]
dlog :=
--- one? derivation x => r.logpart
- ((derivation x) = 1) => r.logpart
+ one? derivation x => r.logpart
differentiate(mkAnswer(0, logs, empty()),
differentiate(#1, derivation))
(u := retractIfCan(p := r.logpart - dlog)@Union(UP, "failed")) case UP =>
@@ -526,8 +525,7 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
num := numer f
den := denom f
l1:List Record(logand2:RF, contrib:UP) :=
--- [[u, numer v] for u in lu | one? denom(v := den * logderiv u)]
- [[u, numer v] for u in lu | (denom(v := den * logderiv u) = 1)]
+ [[u, numer v] for u in lu | one? denom(v := den * logderiv u)]
rows := max(degree den,
1 + reduce(max, [degree(u.contrib) for u in l1], 0)$List(N))
m:Matrix(F) := zero(rows, cols := 1 + #l1)
diff --git a/src/algebra/irexpand.spad.pamphlet b/src/algebra/irexpand.spad.pamphlet
index c01605cb..47fc84a2 100644
--- a/src/algebra/irexpand.spad.pamphlet
+++ b/src/algebra/irexpand.spad.pamphlet
@@ -152,8 +152,7 @@ IntegrationResultToFunction(R, F): Exports == Implementation where
lg2func lg ==
zero?(d := degree(p := lg.coeff)) => error "poly has degree 0"
--- one? d => [linear(p, lg.logand)]
- (d = 1) => [linear(p, lg.logand)]
+ one? d => [linear(p, lg.logand)]
d = 2 => quadratic(p, lg.logand)
odd? d and
((r := retractIfCan(reductum p)@Union(F, "failed")) case F) =>
@@ -213,8 +212,7 @@ IntegrationResultToFunction(R, F): Exports == Implementation where
-- s = 1 if b > 0, -1 if b < 0, 0 if the sign of b cannot be determined
insqrt y ==
rec := froot(y, 2)$PolynomialRoots(IndexedExponents K, K, R, P, F)
--- one?(rec.exponent) => [[rec.coef * rec.radicand, 1], 1]
- ((rec.exponent) = 1) => [[rec.coef * rec.radicand, 1], 1]
+ one?(rec.exponent) => [[rec.coef * rec.radicand, 1], 1]
rec.exponent ~=2 => error "Should not happen"
[[rec.coef, rec.radicand],
((s := sign(rec.radicand)) case "failed" => 0; s::Z)]
diff --git a/src/algebra/laplace.spad.pamphlet b/src/algebra/laplace.spad.pamphlet
index 949253cc..ad8647f4 100644
--- a/src/algebra/laplace.spad.pamphlet
+++ b/src/algebra/laplace.spad.pamphlet
@@ -182,8 +182,7 @@ LaplaceTransform(R, F): Exports == Implementation where
-- or using one of known base cases
locallaplace(f, t, tt, s, ss) ==
zero? f => 0
--- one? f => inv ss
- (f = 1) => inv ss
+ one? f => inv ss
-- laplace(f(t)/t,t,s)
-- = integrate(laplace(f(t),t,v), v = s..%plusInfinity)
diff --git a/src/algebra/lindep.spad.pamphlet b/src/algebra/lindep.spad.pamphlet
index fb52df5c..f8028421 100644
--- a/src/algebra/lindep.spad.pamphlet
+++ b/src/algebra/lindep.spad.pamphlet
@@ -51,14 +51,12 @@ LinearDependence(S, R): Exports == Implementation where
linearlyDependent? v ==
zero?(n := #v) => true
--- one? n => zero?(v(minIndex v))
- (n = 1) => zero?(v(minIndex v))
+ one? n => zero?(v(minIndex v))
positive? nullity reducedSystem transpose v
linearDependence v ==
zero?(n := #v) => empty()
--- one? n =>
- (n = 1) =>
+ one? n =>
zero?(v(minIndex v)) => new(1, 1)
"failed"
aNonZeroSolution reducedSystem transpose v
diff --git a/src/algebra/liouv.spad.pamphlet b/src/algebra/liouv.spad.pamphlet
index ee4bd756..4145f37f 100644
--- a/src/algebra/liouv.spad.pamphlet
+++ b/src/algebra/liouv.spad.pamphlet
@@ -95,8 +95,7 @@ LiouvillianFunction(R, F): Exports == Implementation where
isi x == kernel(opsi, x)
ici x == kernel(opci, x)
ierf x == (zero? x => 0; kernel(operf, x))
--- ili2 x == (one? x => INV; kernel(opli2, x))
- ili2 x == ((x = 1) => INV; kernel(opli2, x))
+ ili2 x == (one? x => INV; kernel(opli2, x))
integrand l == eval(first l, retract(second l)@K, third l)
integral(f:F, x:SE) == opint [eval(f, k:=kernel(x)$K, dummy), dummy, k::F]
diff --git a/src/algebra/lodof.spad.pamphlet b/src/algebra/lodof.spad.pamphlet
index 3a35261a..171909b4 100644
--- a/src/algebra/lodof.spad.pamphlet
+++ b/src/algebra/lodof.spad.pamphlet
@@ -433,8 +433,7 @@ LinearOrdinaryDifferentialOperatorFactorizer(F, UP): Exports == Impl where
innerFactor(q, zeros, ezfactor, true)
rfactor(op, r, zeros, ezfactor, adj?) ==
--- degree r > 1 or not one? leadingCoefficient r =>
- degree r > 1 or not ((leadingCoefficient r) = 1) =>
+ degree r > 1 or not one? leadingCoefficient r =>
recurfactor(op, r, zeros, ezfactor, adj?)
op1 := opeval(op, dd - coefficient(r, 0)::L)
map_!(opeval(#1, r), recurfactor(op1, dd, zeros, ezfactor, adj?))
@@ -451,8 +450,7 @@ LinearOrdinaryDifferentialOperatorFactorizer(F, UP): Exports == Impl where
[l]
rightFactor(l, n, zeros, ezfactor) ==
--- one? n =>
- (n = 1) =>
+ one? n =>
(u := expsol(l, zeros, ezfactor)) case "failed" => "failed"
D() - u::RF::L
-- rec := associatedEquations(l, n::PositiveInteger)
diff --git a/src/algebra/manip.spad.pamphlet b/src/algebra/manip.spad.pamphlet
index e112a811..17fb455a 100644
--- a/src/algebra/manip.spad.pamphlet
+++ b/src/algebra/manip.spad.pamphlet
@@ -33,8 +33,7 @@ FactoredFunctions(M:IntegralDomain): Exports == Implementation where
Implementation ==> add
nthRoot(ff, n) ==
coeff:M := 1
--- radi:List(M) := (one? unit ff => empty(); [unit ff])
- radi:List(M) := (((unit ff) = 1) => empty(); [unit ff])
+ radi:List(M) := (one? unit ff => empty(); [unit ff])
lf := factors ff
d:N :=
empty? radi => gcd(concat(n, [t.exponent::N for t in lf]))::N
@@ -100,8 +99,7 @@ PolynomialRoots(E, V, R, P, F):Exports == Implementation where
zroot : (Z, N) -> Record(exponent:N, coef:Z, radicand:Z)
zroot(x, n) ==
--- zero? x or one? x => [1, x, 1]
- zero? x or (x = 1) => [1, x, 1]
+ zero? x or one? x => [1, x, 1]
s := nthRoot(squareFree x, n)
[s.exponent, s.coef, */s.radicand]
@@ -164,8 +162,7 @@ PolynomialRoots(E, V, R, P, F):Exports == Implementation where
else nthr(x, n) == nthRoot(squareFree x, n)
froot(x, n) ==
--- zero? x or one? x => [1, x, 1]
- zero? x or (x = 1) => [1, x, 1]
+ zero? x or one? x => [1, x, 1]
sn := nthr(numer x, n)
sd := nthr(denom x, n)
pn := rsplit(sn.radicand)
@@ -358,18 +355,15 @@ AlgebraicManipulations(R, F): Exports == Implementation where
q := univariate(p, k)
while (d := degree q) > 0 repeat
term :=
--- one?(g := gcd(d, n)) => monomial(1, k, d)
- ((g := gcd(d, n)) = 1) => monomial(1, k, d)
+ one?(g := gcd(d, n)) => monomial(1, k, d)
monomial(1, kernel(operator k, [a,(n quo g)::F], height k), d quo g)
ans := ans + leadingCoefficient(q)::F * term::F
q := reductum q
leadingCoefficient(q)::F + ans
inroot(op, x, n) ==
--- one? x => x
- (x = 1) => x
--- (x ~= -1) and (one?(num := numer x) or (num = -1)) =>
- (x ~= -1) and (((num := numer x) = 1) or (num = -1)) =>
+ one? x => x
+ (x ~= -1) and (one?(num := numer x) or (num = -1)) =>
inv inroot(op, (num * denom x)::F, n)
(u := isExpt(x, op)) case "failed" => kernel(op, [x, n::F])
pr := u::Record(var:K, exponent:Integer)
@@ -648,13 +642,11 @@ TranscendentalManipulations(R, F): Exports == Implementation where
not (terms case "failed") => logArgs(terms)
expt : Union(POW, "failed") := isPower(e)
--- (expt case POW) and not one? expt.exponent =>
- (expt case POW) and not (expt.exponent = 1) =>
+ (expt case POW) and not one? expt.exponent =>
simplifyLog(expt.val)**(expt.exponent)
kers : List K := kernels e
--- not(one?(#kers)) => e -- Have a constant
- not(((#kers) = 1)) => e -- Have a constant
+ not(one?(#kers)) => e -- Have a constant
kernel(operator first kers,[simplifyLog(u) for u in argument first kers])
@@ -666,10 +658,8 @@ TranscendentalManipulations(R, F): Exports == Implementation where
expandpow k ==
a := expandPower first(arg := argument k)
b := expandPower second arg
--- ne:F := (one? numer a => 1; numer(a)::F ** b)
- ne:F := (((numer a) = 1) => 1; numer(a)::F ** b)
--- de:F := (one? denom a => 1; denom(a)::F ** (-b))
- de:F := (((denom a) = 1) => 1; denom(a)::F ** (-b))
+ ne:F := (one? numer a => 1; numer(a)::F ** b)
+ de:F := (one? denom a => 1; denom(a)::F ** (-b))
ne * de
termexp p ==
diff --git a/src/algebra/matcat.spad.pamphlet b/src/algebra/matcat.spad.pamphlet
index f3fdb8dc..97af1385 100644
--- a/src/algebra/matcat.spad.pamphlet
+++ b/src/algebra/matcat.spad.pamphlet
@@ -473,8 +473,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
positivePower:(%,Integer) -> %
positivePower(x,n) ==
--- one? n => x
- (n = 1) => x
+ one? n => x
odd? n => x * positivePower(x,n - 1)
y := positivePower(x,n quo 2)
y * y
@@ -783,8 +782,7 @@ SquareMatrixCategory(ndim,R,Row,Col): Category == Definition where
positivePower:(%,Integer) -> %
positivePower(x,n) ==
--- one? n => x
- (n = 1) => x
+ one? n => x
odd? n => x * positivePower(x,n - 1)
y := positivePower(x,n quo 2)
y * y
diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet
index a456deec..d2b603d8 100644
--- a/src/algebra/matrix.spad.pamphlet
+++ b/src/algebra/matrix.spad.pamphlet
@@ -153,8 +153,7 @@ Matrix(R): Exports == Implementation where
positivePower:($,Integer,NonNegativeInteger) -> $
positivePower(x,n,nn) ==
--- one? n => x
- (n = 1) => x
+ one? n => x
-- no need to allocate space for 3 additional matrices
n = 2 => x * x
n = 3 => x * x * x
diff --git a/src/algebra/matstor.spad.pamphlet b/src/algebra/matstor.spad.pamphlet
index f34f9e29..d0a1841f 100644
--- a/src/algebra/matstor.spad.pamphlet
+++ b/src/algebra/matstor.spad.pamphlet
@@ -189,8 +189,7 @@ StorageEfficientMatrixOperations(R): Exports == Implementation where
copy_!(a,c)
flag := true
copy_!(a,b)
--- one? p => return a
- (p = 1) => return a
+ one? p => return a
p := p quo 2
times_!(c,b,b)
copy_!(b,c)
diff --git a/src/algebra/mkfunc.spad.pamphlet b/src/algebra/mkfunc.spad.pamphlet
index 08192d77..8f7131c9 100644
--- a/src/algebra/mkfunc.spad.pamphlet
+++ b/src/algebra/mkfunc.spad.pamphlet
@@ -107,8 +107,7 @@ InputForm():
convert(x:DoubleFloat):% ==
zero? x => 0
--- one? x => 1
- (x = 1) => 1
+ one? x => 1
convert(x)$Rep
flatten s ==
@@ -183,8 +182,7 @@ InputForm():
s1:% ** n:Integer ==
s1 = 0 and n > 0 => 0
s1 = 1 or zero? n => 1
--- one? n => s1
- (n = 1) => s1
+ one? n => s1
conv [convert("**"::Symbol), s1, convert n]$List(%)
s1:% ** n:NonNegativeInteger == s1 ** (n::Integer)
diff --git a/src/algebra/moddfact.spad.pamphlet b/src/algebra/moddfact.spad.pamphlet
index 7c12510c..e402185f 100644
--- a/src/algebra/moddfact.spad.pamphlet
+++ b/src/algebra/moddfact.spad.pamphlet
@@ -205,8 +205,7 @@ ModularDistinctDegreeFactorizer(U):C == T where
s:= 0
ss := ss + 1
x:= y * decode(ss, p, y)
--- not one? leadingCoefficient(x) =>
- not (leadingCoefficient(x) = 1) =>
+ not one? leadingCoefficient(x) =>
ss := p ** degree x
x:= y ** (degree(x) + 1)
[c * first(ans),:rest(ans)]
diff --git a/src/algebra/modring.spad.pamphlet b/src/algebra/modring.spad.pamphlet
index 3ee11ff6..e4303078 100644
--- a/src/algebra/modring.spad.pamphlet
+++ b/src/algebra/modring.spad.pamphlet
@@ -66,8 +66,7 @@ ModularRing(R,Mod,reduction:(R,Mod) -> R,
0 == [0$R,0$Mod]$Rep
1 == [1$R,0$Mod]$Rep
zero? x == zero? x.val
--- one? x == one? x.val
- one? x == (x.val = 1)
+ one? x == one? x.val
newmodulo(m1:Mod,m2:Mod) : Mod ==
r:=merge(m1,m2)
@@ -146,8 +145,7 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
xm:=t::Mod
yv:=y.val
invlcy:R
--- if one? leadingCoefficient yv then invlcy:=1
- if (leadingCoefficient yv = 1) then invlcy:=1
+ if one? leadingCoefficient yv then invlcy:=1
else
invlcy:=(inv reduce((leadingCoefficient yv)::R,xm)).val
yv:=reduction(invlcy*yv,xm)
@@ -161,8 +159,7 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
xm:=t::Mod
yv:=y.val
invlcy:R
--- if not one? leadingCoefficient yv then
- if not (leadingCoefficient yv = 1) then
+ if not one? leadingCoefficient yv then
invlcy:=(inv reduce((leadingCoefficient yv)::R,xm)).val
yv:=reduction(invlcy*yv,xm)
dy:=degree yv
@@ -178,8 +175,7 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
xm:=t::Mod
yv:=y.val
invlcy:R
--- if not one? leadingCoefficient yv then
- if not (leadingCoefficient yv = 1) then
+ if not one? leadingCoefficient yv then
invlcy:=(inv reduce((leadingCoefficient yv)::R,xm)).val
yv:=reduction(invlcy*yv,xm)
r:=monicDivide(x.val,yv)
@@ -190,14 +186,12 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R,
unitCanonical x ==
zero? x => x
degree(x.val) = 0 => 1
--- one? leadingCoefficient(x.val) => x
- (leadingCoefficient(x.val) = 1) => x
+ one? leadingCoefficient(x.val) => x
invlcx:%:=inv reduce((leadingCoefficient(x.val))::R,x.modulo)
invlcx * x
unitNormal x ==
--- zero?(x) or one?(leadingCoefficient(x.val)) => [1, x, 1]
- zero?(x) or ((leadingCoefficient(x.val)) = 1) => [1, x, 1]
+ zero?(x) or one?(leadingCoefficient(x.val)) => [1, x, 1]
lcx := reduce((leadingCoefficient(x.val))::R,x.modulo)
invlcx:=inv lcx
degree(x.val) = 0 => [lcx, 1, invlcx]
diff --git a/src/algebra/mring.spad.pamphlet b/src/algebra/mring.spad.pamphlet
index 3d2ca1c7..ba63134c 100644
--- a/src/algebra/mring.spad.pamphlet
+++ b/src/algebra/mring.spad.pamphlet
@@ -175,13 +175,11 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where
numberOfMonomials a == #a
retractIfCan(a:%):Union(M, "failed") ==
--- one?(#a) and one?(a.first.Cf) => a.first.Mn
- ((#a) = 1) and ((a.first.Cf) = 1) => a.first.Mn
+ one?(#a) and one?(a.first.Cf) => a.first.Mn
"failed"
retractIfCan(a:%):Union(R, "failed") ==
--- one?(#a) and one?(a.first.Mn) => a.first.Cf
- ((#a) = 1) and ((a.first.Mn) = 1) => a.first.Cf
+ one?(#a) and one?(a.first.Mn) => a.first.Cf
"failed"
if R has noZeroDivisors then
diff --git a/src/algebra/multpoly.spad.pamphlet b/src/algebra/multpoly.spad.pamphlet
index 91c26a01..f3f5f2a3 100644
--- a/src/algebra/multpoly.spad.pamphlet
+++ b/src/algebra/multpoly.spad.pamphlet
@@ -162,8 +162,7 @@ SparseMultivariatePolynomial(R: Ring,VarSet: OrderedSet): C == T where
zero? p == p case R and zero?(p)$R
--- one? p == p case R and one?(p)$R
- one? p == p case R and ((p) = 1)$R
+ one? p == p case R and one?(p)$R
-- a local function
red(p:%):% ==
p case R => 0
@@ -384,8 +383,7 @@ SparseMultivariatePolynomial(R: Ring,VarSet: OrderedSet): C == T where
a:= (p1::R exquo p2::R)
if a case "failed" then "failed" else a::%
zero? p1 => p1
--- one? p2 => p1
- (p2 = 1) => p1
+ one? p2 => p1
p1 case R or p2 case VPoly and p1.v < p2.v => "failed"
p2 case R or p1.v > p2.v =>
a:= (p1.ts exquo p2::D)
@@ -410,8 +408,7 @@ SparseMultivariatePolynomial(R: Ring,VarSet: OrderedSet): C == T where
a:= (p1::R exquo p2::R)
if a case "failed" then "failed" else a::%
zero? p1 => p1
--- one? p2 => p1
- (p2 = 1) => p1
+ one? p2 => p1
p1 case R or p2 case VPoly and p1.v < p2.v => "failed"
p2 case R or p1.v > p2.v =>
a:= (p1.ts exquo p2::D)
@@ -437,8 +434,7 @@ SparseMultivariatePolynomial(R: Ring,VarSet: OrderedSet): C == T where
p case R => p
c :R :=0
up:=p.ts
--- while not(zero? up) and not(one? c) repeat
- while not(zero? up) and not(c = 1) repeat
+ while not(zero? up) and not(one? c) repeat
c:=gcd(c,content leadingCoefficient(up))
up := reductum up
c
diff --git a/src/algebra/naalg.spad.pamphlet b/src/algebra/naalg.spad.pamphlet
index f252ef74..9937d9aa 100644
--- a/src/algebra/naalg.spad.pamphlet
+++ b/src/algebra/naalg.spad.pamphlet
@@ -98,8 +98,7 @@ AlgebraGivenByStructuralConstants(R:Field, n : PositiveInteger,_
for i in 1..n repeat
coef : R := elt(x::Rep,i)
not zero?(coef)$R =>
--- one?(coef)$R =>
- ((coef) = 1)$R =>
+ one?(coef)$R =>
-- sy : OutputForm := elt(ls,i)$(List Symbol) :: OutputForm
le := cons(elt(ls,i)$(List Symbol) :: OutputForm, le)
le := cons(coef :: OutputForm * elt(ls,i)$(List Symbol)_
diff --git a/src/algebra/naalgc.spad.pamphlet b/src/algebra/naalgc.spad.pamphlet
index 37f1babe..b185cb29 100644
--- a/src/algebra/naalgc.spad.pamphlet
+++ b/src/algebra/naalgc.spad.pamphlet
@@ -46,14 +46,12 @@ Monad(): Category == SetCategory with
import RepeatedSquaring(%)
x:% ** n:PositiveInteger == expt(x,n)
rightPower(a,n) ==
--- one? n => a
- (n = 1) => a
+ one? n => a
res := a
for i in 1..(n-1) repeat res := res * a
res
leftPower(a,n) ==
--- one? n => a
- (n = 1) => a
+ one? n => a
res := a
for i in 1..(n-1) repeat res := a * res
res
@@ -223,8 +221,7 @@ NonAssociativeAlgebra(R:CommutativeRing): Category == _
++ and \spad{a} for \spad{n=1}.
add
plenaryPower(a,n) ==
--- one? n => a
- ( n = 1 ) => a
+ one? n => a
n1 : PositiveInteger := (n-1)::NonNegativeInteger::PositiveInteger
plenaryPower(a,n1) * plenaryPower(a,n1)
diff --git a/src/algebra/newpoly.spad.pamphlet b/src/algebra/newpoly.spad.pamphlet
index db2974e2..8fee6315 100644
--- a/src/algebra/newpoly.spad.pamphlet
+++ b/src/algebra/newpoly.spad.pamphlet
@@ -114,8 +114,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where
ground? y =>
error "in monicModulo$NSUP: ground? #2"
yy := rep y
--- not one? (yy.first.c) =>
- not ((yy.first.c) = 1) =>
+ not one? (yy.first.c) =>
error "in monicModulo$NSUP: not monic #2"
xx := rep x; empty? xx => x
e := yy.first.k; y := per(yy.rest)
@@ -148,8 +147,7 @@ NewSparseUnivariatePolynomial(R): Exports == Implementation where
error "in lazyPseudoRemainder$NSUP: ground? #2"
ground? x => x
yy := rep y; co := yy.first.c
--- one? co => monicModulo(x,y)
- (co = 1) => monicModulo(x,y)
+ one? co => monicModulo(x,y)
(co = -1) => - monicModulo(-x,-y)
xx:= rep x; e := yy.first.k; y := per(yy.rest)
repeat
@@ -633,20 +631,17 @@ RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet): Ca
coerce(p:$):O ==
ground? (p) => (ground(p))::O
--- if one?((ip := init(p)))
- if (((ip := init(p))) = 1)
+ if one?((ip := init(p)))
then
if zero?((tp := tail(p)))
then
--- if one?((dp := mdeg(p)))
- if (((dp := mdeg(p))) = 1)
+ if one?((dp := mdeg(p)))
then
return((mvar(p))::O)
else
return(((mvar(p))::O **$O (dp::O)))
else
--- if one?((dp := mdeg(p)))
- if (((dp := mdeg(p))) = 1)
+ if one?((dp := mdeg(p)))
then
return((mvar(p))::O +$O (tp::O))
else
@@ -654,15 +649,13 @@ RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet): Ca
else
if zero?((tp := tail(p)))
then
--- if one?((dp := mdeg(p)))
- if (((dp := mdeg(p))) = 1)
+ if one?((dp := mdeg(p)))
then
return((ip::O) *$O (mvar(p))::O)
else
return((ip::O) *$O ((mvar(p))::O **$O (dp::O)))
else
--- if one?(mdeg(p))
- if ((mdeg(p)) = 1)
+ if one?(mdeg(p))
then
return(((ip::O) *$O (mvar(p))::O) +$O (tp::O))
((ip)::O *$O ((mvar(p))::O **$O ((mdeg(p)::O))) +$O (tail(p)::O))
@@ -1063,8 +1056,7 @@ RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet): Ca
primitivePart! p ==
zero? p => p
--- if one?(cp := content(p))
- if ((cp := content(p)) = 1)
+ if one?(cp := content(p))
then
p := unitCanonical p
else
@@ -1086,8 +1078,7 @@ RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet): Ca
then
gcd(r:R,p:$):R ==
--- one? r => r
- (r = 1) => r
+ one? r => r
zero? p => r
ground? p => gcd(r,ground(p))$R
gcd(gcd(r,init(p)),tail(p))
@@ -1392,13 +1383,11 @@ RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet): Ca
dpol : NNI := mdeg(pol)
tpol: $ := tail(pol)
sipol,svpol,sdpol,stpol : String
--- if one? ipol
- if (ipol = 1)
+ if one? ipol
then
sipol := empty()$String
else
--- if one?(-ipol)
- if ((-ipol) = 1)
+ if one?(-ipol)
then
sipol := "-"
else
@@ -1409,8 +1398,7 @@ RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet): Ca
else
sipol := concat(sipol,"*")$String
svpol := string(convert(vpol)@Symbol)
--- if one? dpol
- if (dpol = 1)
+ if one? dpol
then
sdpol := empty()$String
else
@@ -1571,8 +1559,7 @@ NewSparseMultivariatePolynomial(R,VarSet) : Exports == Implementation where
not ground?(ib)$$ =>
error"Error in monicModulo from NSMP : #2 is not monic"
mM : $
--- if not one?(ib)$$
- if not ((ib) = 1)$$
+ if not one?(ib)$$
then
r : R := ground(ib)$$
rec : Union(R,"failed"):= recip(r)$R
@@ -1703,23 +1690,20 @@ NewSparseMultivariatePolynomial(R,VarSet) : Exports == Implementation where
LazardQuotient(x:$, y:$, n: N):$ ==
zero?(n) => error("LazardQuotient$NSMP : n = 0")
--- one?(n) => x
- (n = 1) => x
+ one?(n) => x
a: N := 1
while n >= (b := 2*a) repeat a := b
c: $ := x
n := (n - a)::N
repeat
--- one?(a) => return c
- (a = 1) => return c
+ one?(a) => return c
a := a quo 2
c := exactQuo(c*c,y)
if n >= a then ( c := exactQuo(c*x,y) ; n := (n - a)::N )
LazardQuotient2(p:$, a:$, b:$, n: N) ==
zero?(n) => error " in LazardQuotient2$NSMP: bad #4"
--- one?(n) => p
- (n = 1) => p
+ one?(n) => p
c: $ := LazardQuotient(a,b,(n-1)::N)
exactQuo(c*p,b)
@@ -1782,14 +1766,12 @@ NewSparseMultivariatePolynomial(R,VarSet) : Exports == Implementation where
then
exactQuotient (a:$,b:R) ==
--- one? b => a
- (b = 1) => a
+ one? b => a
a case R => (a::R quo$R b)::$
([a.v, map(exactQuotient(#1,b),a.ts)$SUP2]$VPoly)::Rep
exactQuotient! (a:$,b:R) ==
--- one? b => a
- (b = 1) => a
+ one? b => a
a case R => (a::R quo$R b)::$
a.ts := map(exactQuotient!(#1,b),a.ts)$SUP2
a
@@ -1797,14 +1779,12 @@ NewSparseMultivariatePolynomial(R,VarSet) : Exports == Implementation where
else
exactQuotient (a:$,b:R) ==
--- one? b => a
- (b = 1) => a
+ one? b => a
a case R => ((a::R exquo$R b)::R)::$
([a.v, map(exactQuotient(#1,b),a.ts)$SUP2]$VPoly)::Rep
exactQuotient! (a:$,b:R) ==
--- one? b => a
- (b = 1) => a
+ one? b => a
a case R => ((a::R exquo$R b)::R)::$
a.ts := map(exactQuotient!(#1,b),a.ts)$SUP2
a
@@ -1817,8 +1797,7 @@ NewSparseMultivariatePolynomial(R,VarSet) : Exports == Implementation where
gcd(r,content(p))$R
gcd(r:R,p:$):R ==
--- one? r => r
- (r = 1) => r
+ one? r => r
zero? p => r
localGcd(r,p)
@@ -1826,8 +1805,7 @@ NewSparseMultivariatePolynomial(R,VarSet) : Exports == Implementation where
p case R => p
up : D := p.ts
r := 0$R
--- while (not zero? up) and (not one? r) repeat
- while (not zero? up) and (not (r = 1)) repeat
+ while (not zero? up) and (not one? r) repeat
r := localGcd(r,leadingCoefficient(up))
up := reductum up
r
diff --git a/src/algebra/nlinsol.spad.pamphlet b/src/algebra/nlinsol.spad.pamphlet
index c69d5633..21147fb8 100644
--- a/src/algebra/nlinsol.spad.pamphlet
+++ b/src/algebra/nlinsol.spad.pamphlet
@@ -147,8 +147,7 @@ NonLinearSolvePackage(R:IntegralDomain): Exports == Implementation where
else lsubs := concat(eq, lsubs)
else
if ((u := retractIfCan(lhs eq)@Union(P, "failed")) case P) and
--- one?(# variables(u::P)) and ((r := RIfCan rhs eq) case R) then
- ((# variables(u::P)) = 1) and ((r := RIfCan rhs eq) case R) then
+ one?(# variables(u::P)) and ((r := RIfCan rhs eq) case R) then
luniv := concat(u::P - r::R::P, luniv)
else return [l]
empty? luniv => [l]
diff --git a/src/algebra/oct.spad.pamphlet b/src/algebra/oct.spad.pamphlet
index fbaa68ed..b1ed406d 100644
--- a/src/algebra/oct.spad.pamphlet
+++ b/src/algebra/oct.spad.pamphlet
@@ -156,8 +156,7 @@ OctonionCategory(R: CommutativeRing): Category ==
imagI(x),imagJ(x),imagK(x))
z :=
part := 'i::OutputForm
--- one? imagi(x) => part
- (imagi(x) = 1) => part
+ one? imagi(x) => part
(imagi(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
@@ -167,8 +166,7 @@ OctonionCategory(R: CommutativeRing): Category ==
imagI(x),imagJ(x),imagK(x))
z :=
part := 'j::OutputForm
--- one? imagj(x) => part
- (imagj(x) = 1) => part
+ one? imagj(x) => part
(imagj(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
@@ -178,8 +176,7 @@ OctonionCategory(R: CommutativeRing): Category ==
imagI(x),imagJ(x),imagK(x))
z :=
part := 'k::OutputForm
--- one? imagk(x) => part
- (imagk(x) = 1) => part
+ one? imagk(x) => part
(imagk(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
@@ -189,8 +186,7 @@ OctonionCategory(R: CommutativeRing): Category ==
imagI(x),imagJ(x),imagK(x))
z :=
part := 'E::OutputForm
--- one? imagE(x) => part
- (imagE(x) = 1) => part
+ one? imagE(x) => part
(imagE(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
@@ -199,8 +195,7 @@ OctonionCategory(R: CommutativeRing): Category ==
y := octon(0$R,0$R,0$R,0$R,0$R,0$R,imagJ(x),imagK(x))
z :=
part := 'I::OutputForm
--- one? imagI(x) => part
- (imagI(x) = 1) => part
+ one? imagI(x) => part
(imagI(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
@@ -209,15 +204,13 @@ OctonionCategory(R: CommutativeRing): Category ==
y := octon(0$R,0$R,0$R,0$R,0$R,0$R,0$R,imagK(x))
z :=
part := 'J::OutputForm
--- one? imagJ(x) => part
- (imagJ(x) = 1) => part
+ one? imagJ(x) => part
(imagJ(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
-- we know that the real part,i,j,k,E,I,J parts are 0
part := 'K::OutputForm
--- one? imagK(x) => part
- (imagK(x) = 1) => part
+ one? imagK(x) => part
(imagK(x) :: OutputForm) * part
if R has Field then
diff --git a/src/algebra/odeef.spad.pamphlet b/src/algebra/odeef.spad.pamphlet
index e33f827e..9795f76d 100644
--- a/src/algebra/odeef.spad.pamphlet
+++ b/src/algebra/odeef.spad.pamphlet
@@ -191,8 +191,7 @@ ElementaryFunctionLODESolver(R, F, L): Exports == Implementation where
[u::F, bas]
lastChance(op, g, x) ==
--- one? degree op => firstOrder(coefficient(op,0), leadingCoefficient op,g,x)
- (degree op) = 1 => firstOrder(coefficient(op,0), leadingCoefficient op,g,x)
+ one? degree op => firstOrder(coefficient(op,0), leadingCoefficient op,g,x)
"failed"
-- solves a0 y + a1 y' = g
@@ -224,8 +223,7 @@ ElementaryFunctionLODESolver(R, F, L): Exports == Implementation where
a
expsols(op, k, x) ==
--- one? degree op =>
- (degree op) = 1 =>
+ one? degree op =>
firstOrder(multivariate(coefficient(op, 0), k),
multivariate(leadingCoefficient op, k), 0, x).basis
[xpart(expint(multivariate(h, k), x), x) for h in ricDsolve(op, ffactor)]
@@ -249,8 +247,7 @@ ElementaryFunctionLODESolver(R, F, L): Exports == Implementation where
-- if the coefficients are rational functions, then the equation does not
-- not have a proper 1st-order right factor over the rational functions
norf1(op, k, x, n) ==
--- one? n => firstOrder(coefficient(op, 0), leadingCoefficient op,0,x).basis
- (n = 1) => firstOrder(coefficient(op, 0), leadingCoefficient op,0,x).basis
+ one? n => firstOrder(coefficient(op, 0), leadingCoefficient op,0,x).basis
-- for order > 2, we check that the coeffs are still rational functions
symbolIfCan(kmax vark(coefficients op, x)) case SY =>
eq := ulodo(op, k)
@@ -466,8 +463,7 @@ ElementaryFunctionODESolver(R, F): Exports == Implementation where
a := rhs center
kx:K := kernel(x := retract(lhs(center))@SY)
(ur := parseODE(diffeq, y, x)) case NLQ =>
--- not one?(#y0) => error "solve: more than one initial condition!"
- not ((#y0) = 1) => error "solve: more than one initial condition!"
+ not one?(#y0) => error "solve: more than one initial condition!"
rc := ur::NLQ
(u := solve(rc.dx, rc.dy, y, x)) case "failed" => "failed"
u::F - eval(u::F, [kx, retract(y(x::F))@K], [a, first y0])
diff --git a/src/algebra/oderf.spad.pamphlet b/src/algebra/oderf.spad.pamphlet
index 096c8973..96e1f9f1 100644
--- a/src/algebra/oderf.spad.pamphlet
+++ b/src/algebra/oderf.spad.pamphlet
@@ -116,24 +116,21 @@ BoundIntegerRoots(F, UP): Exports == Implementation where
retract eval(f, t, [random()$Q :: F for k in t])
integerBound p ==
--- one? degree p => zroot1 p
- (degree p) = 1 => zroot1 p
+ one? degree p => zroot1 p
q1 := map(bringDown, p)
q2 := map(bringDown, p)
qbound(p, gcd(q1, q2))
else
integerBound p ==
--- one? degree p => zroot1 p
- (degree p) = 1 => zroot1 p
+ one? degree p => zroot1 p
qbound(p, map(retract(#1)@Q, p))
-- we can probably do better here (i.e. without factoring)
qbound(p, q) ==
bound:Z := 0
for rec in factors factor q repeat
--- if one?(degree(rec.factor)) and ((r := qzroot1(rec.factor)) < bound)
- if ((degree(rec.factor)) = 1) and ((r := qzroot1(rec.factor)) < bound)
+ if one?(degree(rec.factor)) and ((r := qzroot1(rec.factor)) < bound)
and zero? p(r::Q::F) then bound := r
bound
@@ -828,8 +825,7 @@ ConstantLODE(R, F, L): Exports == Implementation where
l
basisSqfr(p, x) ==
--- one?(d := degree p) =>
- ((d := degree p) = 1) =>
+ one?(d := degree p) =>
[exp(- coefficient(p, 0) * x / leadingCoefficient p)]
d = 2 => quadSol(p, x)
[exp(a * x) for a in rootsOf p]
diff --git a/src/algebra/omerror.spad.pamphlet b/src/algebra/omerror.spad.pamphlet
index 410b31d6..444dcfce 100644
--- a/src/algebra/omerror.spad.pamphlet
+++ b/src/algebra/omerror.spad.pamphlet
@@ -88,8 +88,7 @@ OpenMathError() : SetCategory with
OMParseError? e.err => message "Error parsing OpenMath object"
infoSize := #(e.info)
OMUnknownCD? e.err =>
--- not one? infoSize => error "Malformed info list in OMUnknownCD"
- not (infoSize = 1) => error "Malformed info list in OMUnknownCD"
+ not one? infoSize => error "Malformed info list in OMUnknownCD"
message concat("Cannot handle CD ",string first e.info)
OMUnknownSymbol? e.err =>
not 2=infoSize => error "Malformed info list in OMUnknownSymbol"
diff --git a/src/algebra/op.spad.pamphlet b/src/algebra/op.spad.pamphlet
index bbd3e443..525835b9 100644
--- a/src/algebra/op.spad.pamphlet
+++ b/src/algebra/op.spad.pamphlet
@@ -125,8 +125,7 @@ BasicOperator(): Exports == Implementation where
oper(se, n, prop) == [se, n, prop]
weight(op, n) == setProperty(op, WEIGHT, n pretend None)
nullary? op == zero?(op.narg)
--- unary? op == one?(op.narg)
- unary? op == ((op.narg) = 1)
+ unary? op == one?(op.narg)
nary? op == negative?(op.narg)
equality(op, func) == setProperty(op, EQUAL?, func pretend None)
comparison(op, func) == setProperty(op, LESS?, func pretend None)
diff --git a/src/algebra/opalg.spad.pamphlet b/src/algebra/opalg.spad.pamphlet
index a03c8cec..dc5b5e3f 100644
--- a/src/algebra/opalg.spad.pamphlet
+++ b/src/algebra/opalg.spad.pamphlet
@@ -114,8 +114,7 @@ ModuleOperator(R: Ring, M:LeftModule(R)): Exports == Implementation where
reduce(_+, [trm2O(t.exp, t.gen) for t in terms x])$List(O)
trm2O(c, t) ==
--- one? c => term2O t
- (c = 1) => term2O t
+ one? c => term2O t
c = -1 => - term2O t
c::O * term2O t
@@ -123,10 +122,8 @@ ModuleOperator(R: Ring, M:LeftModule(R)): Exports == Implementation where
reduce(_*, [rm2O(rm.coef, rm.monom) for rm in t])$List(O)
rm2O(c, m) ==
--- one? c => m::O
- (c = 1) => m::O
--- one? m => c::O
- (m = 1) => c::O
+ one? c => m::O
+ one? m => c::O
c::O * m::O
x:$ * y:$ ==
@@ -141,12 +138,10 @@ ModuleOperator(R: Ring, M:LeftModule(R)): Exports == Implementation where
lc := first(xx := termcopy x)
lc.coef := n * lc.coef
rm := last xx
--- one?(first(y).coef) =>
- ((first(y).coef) = 1) =>
+ one?(first(y).coef) =>
rm.monom := rm.monom * first(y).monom
concat_!(xx, termcopy rest y)
--- one?(rm.monom) =>
- ((rm.monom) = 1) =>
+ one?(rm.monom) =>
rm.coef := rm.coef * first(y).coef
rm.monom := first(y).monom
concat_!(xx, termcopy rest y)
@@ -192,8 +187,7 @@ ModuleOperator(R: Ring, M:LeftModule(R)): Exports == Implementation where
empty?(t := r::TERM) => 0$R
empty? rest t =>
rm := first t
--- one?(rm.monom) => rm.coef
- (rm.monom = 1) => rm.coef
+ one?(rm.monom) => rm.coef
"failed"
"failed"
@@ -202,8 +196,7 @@ ModuleOperator(R: Ring, M:LeftModule(R)): Exports == Implementation where
empty?(t := r::TERM) => "failed"
empty? rest t =>
rm := first t
--- one?(rm.coef) => retractIfCan(rm.monom)
- (rm.coef = 1) => retractIfCan(rm.monom)
+ one?(rm.coef) => retractIfCan(rm.monom)
"failed"
"failed"
diff --git a/src/algebra/openmath.spad.pamphlet b/src/algebra/openmath.spad.pamphlet
index c186a2fd..62f19a37 100644
--- a/src/algebra/openmath.spad.pamphlet
+++ b/src/algebra/openmath.spad.pamphlet
@@ -187,8 +187,7 @@ ExpressionToOpenMath(R: Join(OpenMath, OrderedSet, Ring)): with
omOp case "failed" =>
error concat ["No OpenMath definition for nullary function ", coerce op]
OMputSymbol(dev, omOp.cd, omOp.name)
--- one? nargs =>
- (nargs = 1) =>
+ one? nargs =>
omOp: Union(SymInfo, "failed") := search(op, unaryFunctionAList)
omOp case "failed" =>
error concat ["No OpenMath definition for unary function ", coerce op]
@@ -222,8 +221,7 @@ ExpressionToOpenMath(R: Join(OpenMath, OrderedSet, Ring)): with
-- here but they may be relevent when we integrate this stuff into
-- the main Expression code. Note that if we don't check that
-- the exponent is non-trivial we get thrown into an infinite recursion.
--- not (((x := isExpt ex) case "failed") or one? x.exponent) =>
- not (((x := isExpt ex) case "failed") or (x.exponent = 1)) =>
+ not (((x := isExpt ex) case "failed") or one? x.exponent) =>
not((s := symbolIfCan(x.var)@Union(Symbol,"failed")) case "failed") =>
--outputOMPower(dev, [s::Expression(R), (x.exponent)::Expression(R)])
OMputApp(dev)
@@ -232,8 +230,7 @@ ExpressionToOpenMath(R: Join(OpenMath, OrderedSet, Ring)): with
OMputInteger(dev, x.exponent)
OMputEndApp(dev)
-- TODO: add error handling code here...
--- not (((z := isPower ex) case "failed") or one? z.exponent) =>
- not (((z := isPower ex) case "failed") or (z.exponent = 1)) =>
+ not (((z := isPower ex) case "failed") or one? z.exponent) =>
outputOMPower(dev, [ z.val, z.exponent::Expression R ])
--OMputApp(dev)
--OMputSymbol(dev, "arith1", "power")
diff --git a/src/algebra/padiclib.spad.pamphlet b/src/algebra/padiclib.spad.pamphlet
index 9b3e79cc..460bdfc6 100644
--- a/src/algebra/padiclib.spad.pamphlet
+++ b/src/algebra/padiclib.spad.pamphlet
@@ -206,8 +206,7 @@ ChineseRemainderToolsForIntegralBases(K,R,UP): Exports == Implementation where
fBar : SUP sae := map(convert(#1)@sae,fSUP)$SUP2(R,sae)
gBar : SUP sae := map(convert(#1)@sae,gSUP)$SUP2(R,sae)
ee := extendedEuclidean(fBar,gBar)
--- not one?(ee.generator) =>
- not (ee.generator = 1) =>
+ not one?(ee.generator) =>
error "polynomials aren't relatively prime"
ss1 := ee.coef1; tt1 := ee.coef2
s1 : SUP R := map(convert(#1)@R,ss1)$SUP2(sae,R); s := s1
diff --git a/src/algebra/pattern.spad.pamphlet b/src/algebra/pattern.spad.pamphlet
index c446462f..031c6167 100644
--- a/src/algebra/pattern.spad.pamphlet
+++ b/src/algebra/pattern.spad.pamphlet
@@ -257,8 +257,7 @@ Pattern(R:SetCategory): Exports == Implementation where
p:% ** n:NonNegativeInteger ==
p = 0 and n > 0 => 0
p = 1 or zero? n => 1
--- one? n => p
- (n = 1) => p
+ one? n => p
mkPat(constant? p, [[p, n]$REC], 1 + (p.lev))
p1 / p2 ==
diff --git a/src/algebra/perm.spad.pamphlet b/src/algebra/perm.spad.pamphlet
index 141f9c58..e0f014d1 100644
--- a/src/algebra/perm.spad.pamphlet
+++ b/src/algebra/perm.spad.pamphlet
@@ -213,8 +213,7 @@ domain.
if smaller?(cyc.i,min) then
min := cyc.i
minpos := i
--- one? minpos => cyc
- (minpos = 1) => cyc
+ one? minpos => cyc
concat(last(cyc,((#cyc-minpos+1)::NNI)),first(cyc,(minpos-1)::NNI))
coerceCycle(lls : L L S): % ==
diff --git a/src/algebra/pfo.spad.pamphlet b/src/algebra/pfo.spad.pamphlet
index 493a68e4..5a36f184 100644
--- a/src/algebra/pfo.spad.pamphlet
+++ b/src/algebra/pfo.spad.pamphlet
@@ -190,8 +190,7 @@ PointsOfFiniteOrderRational(UP, UPUP, R): Exports == Implementation where
n := rat(modulus, d, p := getGoodPrime bad)
-- if n > 1 then it is cheaper to compute the order modulo a second prime,
-- since computing n * d could be very expensive
--- one? n => n
- (n = 1) => n
+ one? n => n
m := rat(modulus, d, getGoodPrime(p * bad))
n = m => n
0
@@ -203,8 +202,7 @@ PointsOfFiniteOrderRational(UP, UPUP, R): Exports == Implementation where
-- returns the potential order of d, 0 if d is of infinite order
possibleOrder d ==
--- zero?(genus()) or one?(#(numer ideal d)) => 1
- zero?(genus()) or (#(numer ideal d) = 1) => 1
+ zero?(genus()) or one?(#(numer ideal d)) => 1
r := polyred definingPolynomial()$R
ratcurve(d, r, doubleDisc r)
@@ -447,8 +445,7 @@ PointsOfFiniteOrder(R0, F, UP, UPUP, R): Exports == Implementation where
gf := InnerPrimeField p
m := map(retract(#1)@Z :: gf,
mm)$SparseUnivariatePolynomialFunctions2(Q, gf)
--- one? degree m =>
- (degree m = 1) =>
+ one? degree m =>
alpha := - coefficient(m, 0) / leadingCoefficient m
order(d, pp,
(map(numer(#1)::gf / denom(#1)::gf,
@@ -476,8 +473,7 @@ PointsOfFiniteOrder(R0, F, UP, UPUP, R): Exports == Implementation where
n := rat(pp, d, p := getGoodPrime bad)
-- if n > 1 then it is cheaper to compute the order modulo a second prime,
-- since computing n * d could be very expensive
--- one? n => n
- (n = 1) => n
+ one? n => n
m := rat(pp, d, getGoodPrime(p * bad))
n = m => n
0
@@ -490,8 +486,7 @@ PointsOfFiniteOrder(R0, F, UP, UPUP, R): Exports == Implementation where
-- returns the potential order of d, 0 if d is of infinite order
possibleOrder d ==
--- zero?(genus()) or one?(#(numer ideal d)) => 1
- zero?(genus()) or (#(numer ideal d) = 1) => 1
+ zero?(genus()) or one?(#(numer ideal d)) => 1
empty?(la := alglist d) => ratcurve(d, selIntegers())
not(empty? rest la) =>
error "PFO::possibleOrder: more than 1 algebraic constant"
@@ -548,8 +543,7 @@ PointsOfFiniteOrder(R0, F, UP, UPUP, R): Exports == Implementation where
l := [f.factor for f in factors factor(map(retract(#1)@Z :: gf,
rec.dfpoly)$SparseUnivariatePolynomialFunctions2(Q,
gf))$DistinctDegreeFactorize(gf,
--- SparseUnivariatePolynomial gf) | one?(f.exponent)]
- SparseUnivariatePolynomial gf) | (f.exponent = 1)]
+ SparseUnivariatePolynomial gf) | one?(f.exponent)]
empty? l => "failed"
mdg := first l
for ff in rest l repeat
diff --git a/src/algebra/polset.spad.pamphlet b/src/algebra/polset.spad.pamphlet
index eaee8dc6..db7e1dc0 100644
--- a/src/algebra/polset.spad.pamphlet
+++ b/src/algebra/polset.spad.pamphlet
@@ -285,8 +285,7 @@ PolynomialSetCategory(R:Ring, E:OrderedAbelianMonoidSup,_
makeIrreducible! (frac:Record(num:P,den:R)):Record(num:P,den:R) ==
g := gcd(frac.den,frac.num)$P
--- one? g => frac
- (g = 1) => frac
+ one? g => frac
frac.num := exactQuotient!(frac.num,g)
frac.den := exactQuo(frac.den,g)
frac
diff --git a/src/algebra/poly.spad.pamphlet b/src/algebra/poly.spad.pamphlet
index ff21510e..077ba898 100644
--- a/src/algebra/poly.spad.pamphlet
+++ b/src/algebra/poly.spad.pamphlet
@@ -44,29 +44,25 @@ FreeModule(R:Ring,S:OrderedSet):
if R has EntireRing then
r * x ==
zero? r => 0
--- one? r => x
- (r = 1) => x
+ one? r => x
--map(r*#1,x)
[[u.k,r*u.c] for u in x ]
else
r * x ==
zero? r => 0
--- one? r => x
- (r = 1) => x
+ one? r => x
--map(r*#1,x)
[[u.k,a] for u in x | (a:=r*u.c) ~= 0$R]
if R has EntireRing then
x * r ==
zero? r => 0
--- one? r => x
- (r = 1) => x
+ one? r => x
--map(r*#1,x)
[[u.k,u.c*r] for u in x ]
else
x * r ==
zero? r => 0
--- one? r => x
- (r = 1) => x
+ one? r => x
--map(r*#1,x)
[[u.k,a] for u in x | (a:=u.c*r) ~= 0$R]
@@ -298,8 +294,7 @@ PolynomialRing(R:Ring,E:OrderedAbelianMonoid): T == C
p ** nn ==
null p => 0
zero? nn => 1
--- one? nn => p
- (nn = 1) => p
+ one? nn => p
empty? p.rest =>
zero?(cc:=p.first.c ** nn) => 0
[[nn * p.first.k, cc]]
@@ -438,8 +433,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
p ** n ==
null p => 0
zero? n => 1
--- one? n => p
- (n = 1) => p
+ one? n => p
empty? p.rest =>
zero?(cc:=p.first.c ** n) => 0
[[n * p.first.k, cc]]
@@ -465,8 +459,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
zero?(p): Boolean == empty?(p)
--- one?(p):Boolean == not empty? p and (empty? rest p and zero? first(p).k and one? first(p).c)
- one?(p):Boolean == not empty? p and (empty? rest p and zero? first(p).k and (first(p).c = 1))
+ one?(p):Boolean == not empty? p and (empty? rest p and zero? first(p).k and one? first(p).c)
ground?(p): Boolean == empty? p or (empty? rest p and zero? first(p).k)
multiplyExponents(p,n) == [ [u.k*n,u.c] for u in p]
divideExponents(p,n) ==
@@ -720,8 +713,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
if R has Field then
divide( p1, p2) ==
zero? p2 => error "Division by 0"
--- one? p2 => [p1,0]
- (p2 = 1) => [p1,0]
+ one? p2 => [p1,0]
ct:=inv(p2.first.c)
n:=p2.first.k
p2:=p2.rest
diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet
index 9f86558a..0847febd 100644
--- a/src/algebra/polycat.spad.pamphlet
+++ b/src/algebra/polycat.spad.pamphlet
@@ -181,8 +181,7 @@ FiniteAbelianMonoidRing(R:Ring, E:OrderedAbelianMonoid): Category ==
zero? x => 0
r:=leadingCoefficient x
x:=reductum x
--- while not zero? x and not one? r repeat
- while not zero? x and not (r = 1) repeat
+ while not zero? x and not one? r repeat
r:=gcd(r,leadingCoefficient x)
x:=reductum x
r
@@ -375,8 +374,7 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
isTimes p ==
empty?(lv := variables p) or not monomial? p => "failed"
l := [monomial(1, v, degree(p, v)) for v in lv]
--- one?(r := leadingCoefficient p) =>
- ((r := leadingCoefficient p) = 1) =>
+ one?(r := leadingCoefficient p) =>
empty? rest lv => "failed"
l
concat(r::%, l)
diff --git a/src/algebra/primelt.spad.pamphlet b/src/algebra/primelt.spad.pamphlet
index cc1d9bf4..551acce8 100644
--- a/src/algebra/primelt.spad.pamphlet
+++ b/src/algebra/primelt.spad.pamphlet
@@ -72,8 +72,7 @@ PrimitiveElement(F): Exports == Implementation where
primitiveElement(l, v) == primitiveElement(l, v, new()$SY)
primitiveElement(p1, a1, p2, a2) ==
--- one? degree(p2, a1) => [0, 1, univariate resultant(p1, p2, a1)]
- (degree(p2, a1) = 1) => [0, 1, univariate resultant(p1, p2, a1)]
+ one? degree(p2, a1) => [0, 1, univariate resultant(p1, p2, a1)]
u := (new()$SY)::P
b := a2::P
for i in 10.. repeat
@@ -216,8 +215,7 @@ FunctionSpacePrimitiveElement(R, F): Exports == Implementation where
[w, monomial(ic1, 1)$UP - rec.coef2 * ic1 * q, q, rec.prim]
getpoly(r, g) ==
--- one? degree r =>
- (degree r = 1) =>
+ one? degree r =>
k := retract(g)@K
univariate(-coefficient(r,0)/leadingCoefficient r,k,minPoly k)
error "GCD not of degree 1"
diff --git a/src/algebra/prs.spad.pamphlet b/src/algebra/prs.spad.pamphlet
index 14a68daf..e117eb99 100644
--- a/src/algebra/prs.spad.pamphlet
+++ b/src/algebra/prs.spad.pamphlet
@@ -326,31 +326,27 @@ PseudoRemainderSequence(R, polR) : Specification == Implementation where
Lazard(x : R, y : R, n : NNI) : R ==
zero?(n) => error("Lazard$PRS : n = 0")
--- one?(n) => x
- (n = 1) => x
+ one?(n) => x
a : NNI := 1
while n >= (b := 2*a) repeat a := b
c : R := x
n := (n - a)::NNI
repeat -- c = x**i / y**(i-1), i=n_0 quo a, a=2**?
--- one?(a) => return c
- (a = 1) => return c
+ one?(a) => return c
a := a quo 2
c := ((c * c) exquo y)::R
if n >= a then ( c := ((c * x) exquo y)::R ; n := (n - a)::NNI )
Lazard2(F : polR, x : R, y : R, n : NNI) : polR ==
zero?(n) => error("Lazard2$PRS : n = 0")
--- one?(n) => F
- (n = 1) => F
+ one?(n) => F
x := Lazard(x, y, (n-1)::NNI)
return ((x * F) exquo y)::polR
Lazard3(V : Vector(polR), x : R, y : R, n : NNI) : Vector(polR) ==
-- computes x**(n-1) * V / y**(n-1)
zero?(n) => error("Lazard2$prs : n = 0")
--- one?(n) => V
- (n = 1) => V
+ one?(n) => V
x := Lazard(x, y, (n-1)::NNI)
return ((x * V) exquo y)
@@ -382,8 +378,7 @@ PseudoRemainderSequence(R, polR) : Specification == Implementation where
(P, Q) := (VP.1, VQ.1)
(lcP, c) := (LC(P), LC(Q))
e : NNI := degree(Q)
--- if one?(delta := degree(P) - e) then -- algo_new
- if ((delta := degree(P) - e) = 1) then -- algo_new
+ if one?(delta := degree(P) - e) then -- algo_new
VP := c * VP - coefficient(P, e) * VQ
VP := VP exquo lcP
VP := c * (VP - X * VQ) + coefficient(Q, (e-1)::NNI) * VQ
diff --git a/src/algebra/prtition.spad.pamphlet b/src/algebra/prtition.spad.pamphlet
index dd09fcd3..c6b8f896 100644
--- a/src/algebra/prtition.spad.pamphlet
+++ b/src/algebra/prtition.spad.pamphlet
@@ -156,8 +156,7 @@ SymmetricPolynomial(R:Ring) == PolynomialRing(R,Partition) add
null p1 => 0
null p2 => 0
zero?(p1.first.k) => p1.first.c * p2
--- one? p2 => p1
- (p2 = 1) => p1
+ one? p2 => p1
+/[[[t1.k+t2.k,t1.c*t2.c]$Term for t2 in p2]
for t1 in reverse(p1)]
-- This 'reverse' is an efficiency improvement:
@@ -167,8 +166,7 @@ SymmetricPolynomial(R:Ring) == PolynomialRing(R,Partition) add
null p1 => 0
null p2 => 0
zero?(p1.first.k) => p1.first.c * p2
--- one? p2 => p1
- (p2 = 1) => p1
+ one? p2 => p1
+/[[[t1.k+t2.k,r]$Term for t2 in p2 | (r:=t1.c*t2.c) ~= 0]
for t1 in reverse(p1)]
-- This 'reverse' is an efficiency improvement:
diff --git a/src/algebra/pscat.spad.pamphlet b/src/algebra/pscat.spad.pamphlet
index ffa92a3f..f09df15a 100644
--- a/src/algebra/pscat.spad.pamphlet
+++ b/src/algebra/pscat.spad.pamphlet
@@ -363,8 +363,7 @@ UnivariateTaylorSeriesCategory(Coef): Category == Definition where
positive? r => 0
zero? r => error "0**0 undefined"
error "0 raised to a negative power"
--- not one? frst coefs =>
- not (frst coefs = 1) =>
+ not one? frst coefs =>
error "**: constant coefficient should be 1"
coefs := concat(0,rst coefs)
onePlusX := monom(1,0)$STTA + $STTA monom(1,1)$STTA
diff --git a/src/algebra/puiseux.spad.pamphlet b/src/algebra/puiseux.spad.pamphlet
index e0c2dc5d..1bd402aa 100644
--- a/src/algebra/puiseux.spad.pamphlet
+++ b/src/algebra/puiseux.spad.pamphlet
@@ -134,8 +134,7 @@ UnivariatePuiseuxSeriesConstructor(Coef,ULS):_
laurentIfCan upxs ==
r := getExpon upxs
--- one? denom r =>
- (denom r) = 1 =>
+ one? denom r =>
multiplyExponents(getULS upxs,numer(r) :: PI)
"failed"
@@ -253,8 +252,7 @@ UnivariatePuiseuxSeriesConstructor(Coef,ULS):_
center upxs == center getULS upxs
coefficient(upxs,rn) ==
--- one? denom(n := rn / getExpon upxs) =>
- (denom(n := rn / getExpon upxs)) = 1 =>
+ one? denom(n := rn / getExpon upxs) =>
coefficient(getULS upxs,numer n)
0
@@ -368,8 +366,7 @@ UnivariatePuiseuxSeriesConstructor(Coef,ULS):_
if Coef has Field then
(upxs:%) ** (q:RN) ==
num := numer q; den := denom q
--- one? den => upxs ** num
- den = 1 => upxs ** num
+ one? den => upxs ** num
r := rationalPower upxs; uls := laurentRep upxs
deg := degree uls
if zero?(coef := coefficient(uls,deg)) then
diff --git a/src/algebra/quat.spad.pamphlet b/src/algebra/quat.spad.pamphlet
index 72f99f76..709d9331 100644
--- a/src/algebra/quat.spad.pamphlet
+++ b/src/algebra/quat.spad.pamphlet
@@ -107,8 +107,7 @@ QuaternionCategory(R: CommutativeRing): Category ==
coerce(n:Integer) ==
quatern(n :: R,0$R,0$R,0$R)
one? x ==
--- one? real x and zero? imagI x and
- (real x) = 1 and zero? imagI x and
+ one? real x and zero? imagI x and
zero? imagJ x and zero? imagK x
zero? x ==
zero? real x and zero? imagI x and
@@ -135,8 +134,7 @@ QuaternionCategory(R: CommutativeRing): Category ==
y := quatern(0$R,0$R,imagJ(x),imagK(x))
z :=
part := 'i::OutputForm
--- one? imagI(x) => part
- (imagI(x) = 1) => part
+ one? imagI(x) => part
(imagI(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
@@ -145,15 +143,13 @@ QuaternionCategory(R: CommutativeRing): Category ==
y := quatern(0$R,0$R,0$R,imagK(x))
z :=
part := 'j::OutputForm
--- one? imagJ(x) => part
- (imagJ(x) = 1) => part
+ one? imagJ(x) => part
(imagJ(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
-- we know that the real part and i and j parts are 0
part := 'k::OutputForm
--- one? imagK(x) => part
- (imagK(x) = 1) => part
+ one? imagK(x) => part
(imagK(x) :: OutputForm) * part
if R has Field then
diff --git a/src/algebra/rdeef.spad.pamphlet b/src/algebra/rdeef.spad.pamphlet
index 812a7e44..6e141ea0 100644
--- a/src/algebra/rdeef.spad.pamphlet
+++ b/src/algebra/rdeef.spad.pamphlet
@@ -110,8 +110,7 @@ IntegrationTools(R:OrderedSet, F:FunctionSpace R): Exp == Impl where
linearLog?(k, f, x) ==
is?(k, "log"::SE) and
((u := retractIfCan(univariate(f,k))@Union(UP,"failed")) case UP)
--- and one?(degree(u::UP))
- and (degree(u::UP) = 1)
+ and one?(degree(u::UP))
and not member?(x, variables leadingCoefficient(u::UP))
mkPrim(f, x) ==
@@ -316,8 +315,7 @@ ElementaryRischDE(R, F): Exports == Implementation where
for u in varselect(kernels f, x) | is?(u, "log"::SE) repeat
logand := first argument u
if zero?(degree univariate(fden, u)) and
--- one?(degree(num := univariate(fnum, u))) then
- (degree(num := univariate(fnum, u)) = 1) then
+ one?(degree(num := univariate(fnum, u))) then
cf := (leadingCoefficient num) / fden
if (n := retractIfCan(cf)@Union(Z, "failed")) case Z then
if degree(numer logand, k) > 0 then
diff --git a/src/algebra/rderf.spad.pamphlet b/src/algebra/rderf.spad.pamphlet
index f8d8d0b3..29d55915 100644
--- a/src/algebra/rderf.spad.pamphlet
+++ b/src/algebra/rderf.spad.pamphlet
@@ -67,8 +67,7 @@ TranscendentalRischDE(F, UP): Exports == Implementation where
n:Z
(u := SPDE(aa, bb, cc, d, derivation)) case "failed" => [[0, true]]
zero?(u.c) => [[u.beta, false]]
--- baseCase? := one?(dt := derivation monomial(1, 1))
- baseCase? := ((dt := derivation monomial(1, 1)) = 1)
+ baseCase? := one?(dt := derivation monomial(1, 1))
n := degree(dt)::Z - 1
b0? := zero?(u.b)
(~b0?) and (baseCase? or degree(u.b) > max(0, n)) =>
diff --git a/src/algebra/regset.spad.pamphlet b/src/algebra/regset.spad.pamphlet
index 63e02274..691a91a9 100644
--- a/src/algebra/regset.spad.pamphlet
+++ b/src/algebra/regset.spad.pamphlet
@@ -948,8 +948,7 @@ RegularTriangularSetGcdPackage(R,E,V,P,TS): Exports == Implementation where
-- ASSUME p is not constant and mvar(p) > mvar(ts)
-- ASSUME init(p) is invertible w.r.t. ts
-- ASSUME p is mainly primitive
--- one? mdeg(p) => [[p,ts]$PWT]
- mdeg(p) = 1 => [[p,ts]$PWT]
+ one? mdeg(p) => [[p,ts]$PWT]
v := mvar(p)$P
q: P := mainPrimitivePart D(p,v)
lgwt: List PWT := internalLastSubResultant(p,q,ts,true,false)
@@ -1680,8 +1679,7 @@ RegularTriangularSet(R,E,V,P) : Exports == Implementation where
lts: List($) := []
(numberOfVariables(lp,lts)$regsetdecomppack :: Z - #lp :: Z) < 2
--- lin?(p:P):Boolean == ground?(init(p)) and one?(mdeg(p))
- lin?(p:P):Boolean == ground?(init(p)) and (mdeg(p) = 1)
+ lin?(p:P):Boolean == ground?(init(p)) and one?(mdeg(p))
pre_process(lp:LP,clos?:B,info?:B): Record(val: LP, towers: Split) ==
-- if info? then PRINT information
diff --git a/src/algebra/rf.spad.pamphlet b/src/algebra/rf.spad.pamphlet
index c8e40f71..7daac419 100644
--- a/src/algebra/rf.spad.pamphlet
+++ b/src/algebra/rf.spad.pamphlet
@@ -102,15 +102,13 @@ PolynomialCategoryQuotientFunctions(E, V, R, P, F):
isExpt f ==
(ur := isExpt numer f) case "failed" =>
--- one? numer f =>
- (numer f) = 1 =>
+ one? numer f =>
(ur := isExpt denom f) case "failed" => "failed"
r := ur::Record(var:V, exponent:NonNegativeInteger)
[r.var, - (r.exponent::Integer)]
"failed"
r := ur::Record(var:V, exponent:NonNegativeInteger)
--- one? denom f => [r.var, r.exponent::Integer]
- (denom f) = 1 => [r.var, r.exponent::Integer]
+ one? denom f => [r.var, r.exponent::Integer]
"failed"
isTimes f ==
@@ -118,10 +116,8 @@ PolynomialCategoryQuotientFunctions(E, V, R, P, F):
l:Union(List F, "failed") :=
t case "failed" => "failed"
[x::F for x in t]
--- one?(den := denom f) => l
- ((den := denom f) = 1) => l
--- one? num => "failed"
- num = 1 => "failed"
+ one?(den := denom f) => l
+ one? num => "failed"
d := inv(den::F)
l case "failed" => [num::F, d]
concat_!(l::List(F), d)
diff --git a/src/algebra/riccati.spad.pamphlet b/src/algebra/riccati.spad.pamphlet
index 0f411bdf..43a3c5f1 100644
--- a/src/algebra/riccati.spad.pamphlet
+++ b/src/algebra/riccati.spad.pamphlet
@@ -149,8 +149,7 @@ PrimitiveRatRicDE(F, UP, L, LQ): Exports == Implementation where
sort_!(#1.deg > #2.deg, ans)
getPol(rec, c, l, ind) ==
--- one?(rec.deg) => getPol1(ind, c, l)
- (rec.deg = 1) => getPol1(ind, c, l)
+ one?(rec.deg) => getPol1(ind, c, l)
+/[monomial(tau0(c, coefficient(l, i::N)), i::N)$UP2 for i in ind]
getPol1(ind, c, l) ==
diff --git a/src/algebra/sf.spad.pamphlet b/src/algebra/sf.spad.pamphlet
index 3fae80c1..b104b7f5 100644
--- a/src/algebra/sf.spad.pamphlet
+++ b/src/algebra/sf.spad.pamphlet
@@ -386,6 +386,7 @@ DoubleFloat(): Join(FloatingPointSystem, DifferentialRing, OpenMath,
x:% / y:% == (x/y)$Lisp
negative? x == MINUSP(x)$Lisp
zero? x == ZEROP(x)$Lisp
+ one? x == x = 1
hash x == HASHEQ(x)$Lisp
recip(x) == (zero? x => "failed"; 1 / x)
differentiate x == 0
@@ -483,10 +484,8 @@ DoubleFloat(): Join(FloatingPointSystem, DifferentialRing, OpenMath,
zero? r => error "0**0 is undefined"
negative? r => error "division by 0"
0
--- zero? r or one? x => 1
- zero? r or (x = 1) => 1
--- one? r => x
- (r = 1) => x
+ zero? r or one? x => 1
+ one? r => x
n := numer r
d := denom r
negative? x =>
diff --git a/src/algebra/si.spad.pamphlet b/src/algebra/si.spad.pamphlet
index b6767706..f620c59f 100644
--- a/src/algebra/si.spad.pamphlet
+++ b/src/algebra/si.spad.pamphlet
@@ -143,8 +143,7 @@ IntegerNumberSystem(): Category ==
r1 := c1-q*d1
c := d; c1 := d1
d := r; d1 := r1
--- not one? c => error "inverse does not exist"
- not (c = 1) => error "inverse does not exist"
+ not one? c => error "inverse does not exist"
negative? c1 => c1 + b
c1
@@ -163,10 +162,6 @@ IntegerNumberSystem(): Category ==
\section{domain SINT SingleInteger}
-The definition of {\bf one?} has been rewritten
-as it relies on calling {\bf ONEP} which is a function specific
-to Codemist Common Lisp but is not defined in Common Lisp.
-
<<domain SINT SingleInteger>>=
)abbrev domain SINT SingleInteger
@@ -307,7 +302,6 @@ SingleInteger(): Join(IntegerNumberSystem,OrderedFinite,Logic,OpenMath) with
abs(x) == QSABSVAL(x)$Lisp
odd?(x) == QSODDP(x)$Lisp
zero?(x) == QSZEROP(x)$Lisp
--- one?(x) == ONEP(x)$Lisp
one?(x) == x = 1
max(x,y) == QSMAX(x,y)$Lisp
min(x,y) == QSMIN(x,y)$Lisp
diff --git a/src/algebra/sign.spad.pamphlet b/src/algebra/sign.spad.pamphlet
index 627b6c36..f717ae8b 100644
--- a/src/algebra/sign.spad.pamphlet
+++ b/src/algebra/sign.spad.pamphlet
@@ -49,8 +49,7 @@ ToolsForSign(R:Ring): with
else
sign r ==
zero? r => 0
--- one? r => 1
- r = 1 => 1
+ one? r => 1
r = -1 => -1
"failed"
diff --git a/src/algebra/sregset.spad.pamphlet b/src/algebra/sregset.spad.pamphlet
index 7528a521..634f37c8 100644
--- a/src/algebra/sregset.spad.pamphlet
+++ b/src/algebra/sregset.spad.pamphlet
@@ -674,8 +674,7 @@ SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,TS): Exports == Implementation
-- ASSUME p is not constant and mvar(p) > mvar(ts)
-- ASSUME init(p) is invertible w.r.t. ts
-- ASSUME p is mainly primitive
--- one? mdeg(p) => [[p,ts]$PWT]
- mdeg(p) = 1 => [[p,ts]$PWT]
+ one? mdeg(p) => [[p,ts]$PWT]
v := mvar(p)$P
q: P := mainPrimitivePart D(p,v)
lgwt: List PWT := stoseInternalLastSubResultant(p,q,ts,true,false)
@@ -1480,8 +1479,7 @@ SquareFreeRegularTriangularSet(R,E,V,P) : Exports == Implementation where
lts: List($) := []
(numberOfVariables(lp,lts)$regsetdecomppack :: Z - #lp :: Z) < 2
--- lin?(p:P):Boolean == ground?(init(p)) and one?(mdeg(p))
- lin?(p:P):Boolean == ground?(init(p)) and (mdeg(p) = 1)
+ lin?(p:P):Boolean == ground?(init(p)) and one?(mdeg(p))
pre_process(lp:LP,clos?:B,info?:B): Record(val: LP, towers: Split) ==
-- if info? then PRINT information
diff --git a/src/algebra/strap/DFLOAT.lsp b/src/algebra/strap/DFLOAT.lsp
index 7a5876ff..97c30162 100644
--- a/src/algebra/strap/DFLOAT.lsp
+++ b/src/algebra/strap/DFLOAT.lsp
@@ -289,73 +289,78 @@
(PUT '|DFLOAT;zero?;$B;64| '|SPADreplace| 'ZEROP)
+(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Boolean|)
+ |DFLOAT;one?;$B;65|))
+
+(PUT '|DFLOAT;one?;$B;65| '|SPADreplace| '(XLAM (|x|) (= |x| 1.0)))
+
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Short|)
- |DFLOAT;hash;$Si;65|))
+ |DFLOAT;hash;$Si;66|))
-(PUT '|DFLOAT;hash;$Si;65| '|SPADreplace| 'HASHEQ)
+(PUT '|DFLOAT;hash;$Si;66| '|SPADreplace| 'HASHEQ)
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Pair|)
- |DFLOAT;recip;$U;66|))
+ |DFLOAT;recip;$U;67|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%DoubleFloat|)
- |DFLOAT;differentiate;2$;67|))
+ |DFLOAT;differentiate;2$;68|))
-(PUT '|DFLOAT;differentiate;2$;67| '|SPADreplace| '(XLAM (|x|) 0.0))
+(PUT '|DFLOAT;differentiate;2$;68| '|SPADreplace| '(XLAM (|x|) 0.0))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%DoubleFloat|)
- |DFLOAT;Gamma;2$;68|))
+ |DFLOAT;Gamma;2$;69|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%DoubleFloat| |%Shell|)
|%DoubleFloat|)
- |DFLOAT;Beta;3$;69|))
+ |DFLOAT;Beta;3$;70|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Integer|)
- |DFLOAT;wholePart;$I;70|))
+ |DFLOAT;wholePart;$I;71|))
-(PUT '|DFLOAT;wholePart;$I;70| '|SPADreplace| 'FIX)
+(PUT '|DFLOAT;wholePart;$I;71| '|SPADreplace| 'FIX)
(DECLAIM (FTYPE (FUNCTION
(|%Integer| |%Integer| (|%IntegerSection| 1)
|%Shell|)
|%DoubleFloat|)
- |DFLOAT;float;2IPi$;71|))
+ |DFLOAT;float;2IPi$;72|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%DoubleFloat|)
- |DFLOAT;convert;2$;72|))
+ |DFLOAT;convert;2$;73|))
-(PUT '|DFLOAT;convert;2$;72| '|SPADreplace| '(XLAM (|x|) |x|))
+(PUT '|DFLOAT;convert;2$;73| '|SPADreplace| '(XLAM (|x|) |x|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Thing|)
- |DFLOAT;convert;$F;73|))
+ |DFLOAT;convert;$F;74|))
(DECLAIM (FTYPE (FUNCTION
(|%DoubleFloat| (|%IntegerSection| 0) |%Shell|)
|%Thing|)
- |DFLOAT;rationalApproximation;$NniF;74|))
+ |DFLOAT;rationalApproximation;$NniF;75|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%DoubleFloat| |%Shell|)
|%DoubleFloat|)
- |DFLOAT;atan;3$;75|))
+ |DFLOAT;atan;3$;76|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Thing|)
- |DFLOAT;retract;$F;76|))
+ |DFLOAT;retract;$F;77|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Pair|)
- |DFLOAT;retractIfCan;$U;77|))
+ |DFLOAT;retractIfCan;$U;78|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Integer|)
- |DFLOAT;retract;$I;78|))
+ |DFLOAT;retract;$I;79|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Pair|)
- |DFLOAT;retractIfCan;$U;79|))
+ |DFLOAT;retractIfCan;$U;80|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Integer|)
- |DFLOAT;sign;$I;80|))
+ |DFLOAT;sign;$I;81|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%DoubleFloat|)
- |DFLOAT;abs;2$;81|))
+ |DFLOAT;abs;2$;82|))
-(PUT '|DFLOAT;abs;2$;81| '|SPADreplace|
+(PUT '|DFLOAT;abs;2$;82| '|SPADreplace|
'(XLAM (|x|) (FLOAT-SIGN 1.0 |x|)))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Shell|) |%Pair|)
@@ -365,11 +370,11 @@
(|%DoubleFloat| (|%IntegerSection| 0)
(|%IntegerSection| 0) |%Shell|)
|%Thing|)
- |DFLOAT;rationalApproximation;$2NniF;83|))
+ |DFLOAT;rationalApproximation;$2NniF;84|))
(DECLAIM (FTYPE (FUNCTION (|%DoubleFloat| |%Thing| |%Shell|)
|%DoubleFloat|)
- |DFLOAT;**;$F$;84|))
+ |DFLOAT;**;$F$;85|))
(DEFUN |DFLOAT;OMwrite;$S;1| (|x| $)
(PROG (|sp| |dev| |s|)
@@ -431,7 +436,7 @@
(FLOAT-DIGITS 0.0))
(DEFUN |DFLOAT;bits;Pi;10| ($)
- (PROG (#0=#:G1423)
+ (PROG (#0=#:G1425)
(RETURN
(COND
((EQL (FLOAT-RADIX 0.0) 2) (FLOAT-DIGITS 0.0))
@@ -580,35 +585,37 @@
(DEFUN |DFLOAT;zero?;$B;64| (|x| $) (DECLARE (IGNORE $)) (ZEROP |x|))
-(DEFUN |DFLOAT;hash;$Si;65| (|x| $) (DECLARE (IGNORE $)) (HASHEQ |x|))
+(DEFUN |DFLOAT;one?;$B;65| (|x| $) (DECLARE (IGNORE $)) (= |x| 1.0))
-(DEFUN |DFLOAT;recip;$U;66| (|x| $)
+(DEFUN |DFLOAT;hash;$Si;66| (|x| $) (DECLARE (IGNORE $)) (HASHEQ |x|))
+
+(DEFUN |DFLOAT;recip;$U;67| (|x| $)
(COND ((ZEROP |x|) (CONS 1 "failed")) ('T (CONS 0 (/ 1.0 |x|)))))
-(DEFUN |DFLOAT;differentiate;2$;67| (|x| $) (DECLARE (IGNORE $)) 0.0)
+(DEFUN |DFLOAT;differentiate;2$;68| (|x| $) (DECLARE (IGNORE $)) 0.0)
-(DEFUN |DFLOAT;Gamma;2$;68| (|x| $)
- (SPADCALL |x| (|getShellEntry| $ 94)))
+(DEFUN |DFLOAT;Gamma;2$;69| (|x| $)
+ (SPADCALL |x| (|getShellEntry| $ 95)))
-(DEFUN |DFLOAT;Beta;3$;69| (|x| |y| $)
- (SPADCALL |x| |y| (|getShellEntry| $ 96)))
+(DEFUN |DFLOAT;Beta;3$;70| (|x| |y| $)
+ (SPADCALL |x| |y| (|getShellEntry| $ 97)))
-(DEFUN |DFLOAT;wholePart;$I;70| (|x| $)
+(DEFUN |DFLOAT;wholePart;$I;71| (|x| $)
(DECLARE (IGNORE $))
(FIX |x|))
-(DEFUN |DFLOAT;float;2IPi$;71| (|ma| |ex| |b| $)
+(DEFUN |DFLOAT;float;2IPi$;72| (|ma| |ex| |b| $)
(* |ma| (EXPT (FLOAT |b| |$DoubleFloatMaximum|) |ex|)))
-(DEFUN |DFLOAT;convert;2$;72| (|x| $) (DECLARE (IGNORE $)) |x|)
+(DEFUN |DFLOAT;convert;2$;73| (|x| $) (DECLARE (IGNORE $)) |x|)
-(DEFUN |DFLOAT;convert;$F;73| (|x| $)
- (SPADCALL |x| (|getShellEntry| $ 102)))
+(DEFUN |DFLOAT;convert;$F;74| (|x| $)
+ (SPADCALL |x| (|getShellEntry| $ 103)))
-(DEFUN |DFLOAT;rationalApproximation;$NniF;74| (|x| |d| $)
- (|DFLOAT;rationalApproximation;$2NniF;83| |x| |d| 10 $))
+(DEFUN |DFLOAT;rationalApproximation;$NniF;75| (|x| |d| $)
+ (|DFLOAT;rationalApproximation;$2NniF;84| |x| |d| 10 $))
-(DEFUN |DFLOAT;atan;3$;75| (|x| |y| $)
+(DEFUN |DFLOAT;atan;3$;76| (|x| |y| $)
(PROG (|theta|)
(RETURN
(SEQ (COND
@@ -619,67 +626,67 @@
('T 0.0)))
('T
(SEQ (LETT |theta| (ATAN (FLOAT-SIGN 1.0 (/ |y| |x|)))
- |DFLOAT;atan;3$;75|)
+ |DFLOAT;atan;3$;76|)
(COND
((< |x| 0.0)
- (LETT |theta| (- PI |theta|) |DFLOAT;atan;3$;75|)))
+ (LETT |theta| (- PI |theta|) |DFLOAT;atan;3$;76|)))
(COND
((< |y| 0.0)
- (LETT |theta| (- |theta|) |DFLOAT;atan;3$;75|)))
+ (LETT |theta| (- |theta|) |DFLOAT;atan;3$;76|)))
(EXIT |theta|))))))))
-(DEFUN |DFLOAT;retract;$F;76| (|x| $)
- (PROG (#0=#:G1498)
+(DEFUN |DFLOAT;retract;$F;77| (|x| $)
+ (PROG (#0=#:G1501)
(RETURN
- (|DFLOAT;rationalApproximation;$2NniF;83| |x|
+ (|DFLOAT;rationalApproximation;$2NniF;84| |x|
(PROG1 (LETT #0# (- (FLOAT-DIGITS 0.0) 1)
- |DFLOAT;retract;$F;76|)
+ |DFLOAT;retract;$F;77|)
(|check-subtype| (COND ((< #0# 0) 'NIL) ('T 'T))
'(|NonNegativeInteger|) #0#))
(FLOAT-RADIX 0.0) $))))
-(DEFUN |DFLOAT;retractIfCan;$U;77| (|x| $)
- (PROG (#0=#:G1503)
+(DEFUN |DFLOAT;retractIfCan;$U;78| (|x| $)
+ (PROG (#0=#:G1506)
(RETURN
(CONS 0
- (|DFLOAT;rationalApproximation;$2NniF;83| |x|
+ (|DFLOAT;rationalApproximation;$2NniF;84| |x|
(PROG1 (LETT #0# (- (FLOAT-DIGITS 0.0) 1)
- |DFLOAT;retractIfCan;$U;77|)
+ |DFLOAT;retractIfCan;$U;78|)
(|check-subtype| (COND ((< #0# 0) 'NIL) ('T 'T))
'(|NonNegativeInteger|) #0#))
(FLOAT-RADIX 0.0) $)))))
-(DEFUN |DFLOAT;retract;$I;78| (|x| $)
+(DEFUN |DFLOAT;retract;$I;79| (|x| $)
(PROG (|n|)
(RETURN
- (SEQ (LETT |n| (FIX |x|) |DFLOAT;retract;$I;78|)
+ (SEQ (LETT |n| (FIX |x|) |DFLOAT;retract;$I;79|)
(EXIT (COND
((= |x| (FLOAT |n| |$DoubleFloatMaximum|)) |n|)
('T (|error| "Not an integer"))))))))
-(DEFUN |DFLOAT;retractIfCan;$U;79| (|x| $)
+(DEFUN |DFLOAT;retractIfCan;$U;80| (|x| $)
(PROG (|n|)
(RETURN
- (SEQ (LETT |n| (FIX |x|) |DFLOAT;retractIfCan;$U;79|)
+ (SEQ (LETT |n| (FIX |x|) |DFLOAT;retractIfCan;$U;80|)
(EXIT (COND
((= |x| (FLOAT |n| |$DoubleFloatMaximum|))
(CONS 0 |n|))
('T (CONS 1 "failed"))))))))
-(DEFUN |DFLOAT;sign;$I;80| (|x| $)
- (|DFLOAT;retract;$I;78| (FLOAT-SIGN |x| 1.0) $))
+(DEFUN |DFLOAT;sign;$I;81| (|x| $)
+ (|DFLOAT;retract;$I;79| (FLOAT-SIGN |x| 1.0) $))
-(DEFUN |DFLOAT;abs;2$;81| (|x| $)
+(DEFUN |DFLOAT;abs;2$;82| (|x| $)
(DECLARE (IGNORE $))
(FLOAT-SIGN 1.0 |x|))
(DEFUN |DFLOAT;manexp| (|x| $)
- (PROG (|s| #0=#:G1524 |me| |two53|)
+ (PROG (|s| #0=#:G1527 |me| |two53|)
(RETURN
(SEQ (EXIT (COND
((ZEROP |x|) (CONS 0 0))
('T
- (SEQ (LETT |s| (|DFLOAT;sign;$I;80| |x| $)
+ (SEQ (LETT |s| (|DFLOAT;sign;$I;81| |x| $)
|DFLOAT;manexp|)
(LETT |x| (FLOAT-SIGN 1.0 |x|)
|DFLOAT;manexp|)
@@ -707,34 +714,34 @@
(- (QCDR |me|) (FLOAT-DIGITS 0.0))))))))
#0# (EXIT #0#)))))
-(DEFUN |DFLOAT;rationalApproximation;$2NniF;83| (|f| |d| |b| $)
- (PROG (|#G102| |nu| |ex| BASE #0=#:G1527 |de| |tol| |#G103| |q| |r|
- |p2| |q2| #1=#:G1535 |#G104| |#G105| |p0| |p1| |#G106|
- |#G107| |q0| |q1| |#G108| |#G109| |s| |t|)
+(DEFUN |DFLOAT;rationalApproximation;$2NniF;84| (|f| |d| |b| $)
+ (PROG (|#G103| |nu| |ex| BASE #0=#:G1530 |de| |tol| |#G104| |q| |r|
+ |p2| |q2| #1=#:G1538 |#G105| |#G106| |p0| |p1| |#G107|
+ |#G108| |q0| |q1| |#G109| |#G110| |s| |t|)
(RETURN
(SEQ (EXIT (SEQ (PROGN
- (LETT |#G102| (|DFLOAT;manexp| |f| $)
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |nu| (QCAR |#G102|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |ex| (QCDR |#G102|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
- |#G102|)
+ (LETT |#G103| (|DFLOAT;manexp| |f| $)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |nu| (QCAR |#G103|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |ex| (QCDR |#G103|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ |#G103|)
(LETT BASE (FLOAT-RADIX 0.0)
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(EXIT (COND
((< |ex| 0)
(SEQ (LETT |de|
(EXPT BASE
(PROG1
(LETT #0# (- |ex|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(|check-subtype|
(COND
((< #0# 0) 'NIL)
('T 'T))
'(|NonNegativeInteger|) #0#)))
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(EXIT
(COND
((< |b| 2)
@@ -742,37 +749,37 @@
('T
(SEQ
(LETT |tol| (EXPT |b| |d|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(LETT |s| |nu|
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(LETT |t| |de|
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(LETT |p0| 0
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(LETT |p1| 1
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(LETT |q0| 1
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(LETT |q1| 0
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(EXIT
(SEQ G190 NIL
(SEQ
(PROGN
- (LETT |#G103|
+ (LETT |#G104|
(DIVIDE2 |s| |t|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |q| (QCAR |#G103|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |r| (QCDR |#G103|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
- |#G103|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |q| (QCAR |#G104|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |r| (QCDR |#G104|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ |#G104|)
(LETT |p2|
(+ (* |q| |p1|) |p0|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(LETT |q2|
(+ (* |q| |q1|) |q0|)
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(COND
((OR (EQL |r| 0)
(<
@@ -781,44 +788,44 @@
(- (* |nu| |q2|)
(* |de| |p2|)))
(|getShellEntry| $
- 119))
+ 120))
(* |de| (ABS |p2|))))
(EXIT
(PROGN
(LETT #1#
(SPADCALL |p2| |q2|
(|getShellEntry| $
- 118))
- |DFLOAT;rationalApproximation;$2NniF;83|)
+ 119))
+ |DFLOAT;rationalApproximation;$2NniF;84|)
(GO #1#)))))
(PROGN
- (LETT |#G104| |p1|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |#G105| |p2|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |p0| |#G104|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |p1| |#G105|
- |DFLOAT;rationalApproximation;$2NniF;83|))
+ (LETT |#G105| |p1|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |#G106| |p2|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |p0| |#G105|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |p1| |#G106|
+ |DFLOAT;rationalApproximation;$2NniF;84|))
(PROGN
- (LETT |#G106| |q1|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |#G107| |q2|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |q0| |#G106|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |q1| |#G107|
- |DFLOAT;rationalApproximation;$2NniF;83|))
+ (LETT |#G107| |q1|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |#G108| |q2|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |q0| |#G107|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |q1| |#G108|
+ |DFLOAT;rationalApproximation;$2NniF;84|))
(EXIT
(PROGN
- (LETT |#G108| |t|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |#G109| |r|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |s| |#G108|
- |DFLOAT;rationalApproximation;$2NniF;83|)
- (LETT |t| |#G109|
- |DFLOAT;rationalApproximation;$2NniF;83|))))
+ (LETT |#G109| |t|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |#G110| |r|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |s| |#G109|
+ |DFLOAT;rationalApproximation;$2NniF;84|)
+ (LETT |t| |#G110|
+ |DFLOAT;rationalApproximation;$2NniF;84|))))
NIL (GO G190) G191
(EXIT NIL)))))))))
('T
@@ -831,37 +838,35 @@
((< |ex| 0) 'NIL)
('T 'T))
'(|NonNegativeInteger|) |ex|))))
- (|getShellEntry| $ 120)))))))
+ (|getShellEntry| $ 121)))))))
#1# (EXIT #1#)))))
-(DEFUN |DFLOAT;**;$F$;84| (|x| |r| $)
- (PROG (|n| |d| #0=#:G1544)
+(DEFUN |DFLOAT;**;$F$;85| (|x| |r| $)
+ (PROG (|n| |d| #0=#:G1548)
(RETURN
(SEQ (EXIT (COND
((ZEROP |x|)
(COND
- ((SPADCALL |r| (|getShellEntry| $ 121))
- (|error| "0**0 is undefined"))
((SPADCALL |r| (|getShellEntry| $ 122))
+ (|error| "0**0 is undefined"))
+ ((SPADCALL |r| (|getShellEntry| $ 123))
(|error| "division by 0"))
('T 0.0)))
- ((OR (SPADCALL |r| (|getShellEntry| $ 121))
+ ((OR (SPADCALL |r| (|getShellEntry| $ 122))
(= |x| 1.0))
1.0)
('T
(COND
- ((SPADCALL |r| (|spadConstant| $ 123)
- (|getShellEntry| $ 124))
- |x|)
+ ((SPADCALL |r| (|getShellEntry| $ 124)) |x|)
('T
(SEQ (LETT |n|
(SPADCALL |r|
(|getShellEntry| $ 125))
- |DFLOAT;**;$F$;84|)
+ |DFLOAT;**;$F$;85|)
(LETT |d|
(SPADCALL |r|
(|getShellEntry| $ 126))
- |DFLOAT;**;$F$;84|)
+ |DFLOAT;**;$F$;85|)
(EXIT (COND
((MINUSP |x|)
(COND
@@ -871,16 +876,16 @@
(PROGN
(LETT #0#
(-
- (|DFLOAT;**;$F$;84|
+ (|DFLOAT;**;$F$;85|
(- |x|) |r| $))
- |DFLOAT;**;$F$;84|)
+ |DFLOAT;**;$F$;85|)
(GO #0#)))
('T
(PROGN
(LETT #0#
- (|DFLOAT;**;$F$;84|
+ (|DFLOAT;**;$F$;85|
(- |x|) |r| $)
- |DFLOAT;**;$F$;84|)
+ |DFLOAT;**;$F$;85|)
(GO #0#)))))
('T (|error| "negative root"))))
((EQL |d| 2)
@@ -899,7 +904,7 @@
(DEFUN |DoubleFloat| ()
(PROG ()
(RETURN
- (PROG (#0=#:G1557)
+ (PROG (#0=#:G1562)
(RETURN
(COND
((LETT #0# (HGET |$ConstructorCache| '|DoubleFloat|)
@@ -966,26 +971,26 @@
|DFLOAT;acsch;2$;59| |DFLOAT;acoth;2$;60|
|DFLOAT;asech;2$;61| |DFLOAT;/;3$;62|
|DFLOAT;negative?;$B;63| |DFLOAT;zero?;$B;64|
- (|SingleInteger|) |DFLOAT;hash;$Si;65|
- (|Union| $ '"failed") |DFLOAT;recip;$U;66|
- |DFLOAT;differentiate;2$;67|
+ |DFLOAT;one?;$B;65| (|SingleInteger|) |DFLOAT;hash;$Si;66|
+ (|Union| $ '"failed") |DFLOAT;recip;$U;67|
+ |DFLOAT;differentiate;2$;68|
(|DoubleFloatSpecialFunctions|) (47 . |Gamma|)
- |DFLOAT;Gamma;2$;68| (52 . |Beta|) |DFLOAT;Beta;3$;69|
- |DFLOAT;wholePart;$I;70| |DFLOAT;float;2IPi$;71|
- |DFLOAT;convert;2$;72| (|Float|) (58 . |convert|)
- |DFLOAT;convert;$F;73| (|Fraction| 24)
+ |DFLOAT;Gamma;2$;69| (52 . |Beta|) |DFLOAT;Beta;3$;70|
+ |DFLOAT;wholePart;$I;71| |DFLOAT;float;2IPi$;72|
+ |DFLOAT;convert;2$;73| (|Float|) (58 . |convert|)
+ |DFLOAT;convert;$F;74| (|Fraction| 24)
(|NonNegativeInteger|)
- |DFLOAT;rationalApproximation;$2NniF;83|
- |DFLOAT;rationalApproximation;$NniF;74|
- |DFLOAT;atan;3$;75| |DFLOAT;retract;$F;76|
- (|Union| 104 '"failed") |DFLOAT;retractIfCan;$U;77|
- |DFLOAT;retract;$I;78| (|Union| 24 '"failed")
- |DFLOAT;retractIfCan;$U;79| |DFLOAT;sign;$I;80|
- |DFLOAT;abs;2$;81| (63 . |Zero|) (67 . /) (73 . *)
+ |DFLOAT;rationalApproximation;$2NniF;84|
+ |DFLOAT;rationalApproximation;$NniF;75|
+ |DFLOAT;atan;3$;76| |DFLOAT;retract;$F;77|
+ (|Union| 105 '"failed") |DFLOAT;retractIfCan;$U;78|
+ |DFLOAT;retract;$I;79| (|Union| 24 '"failed")
+ |DFLOAT;retractIfCan;$U;80| |DFLOAT;sign;$I;81|
+ |DFLOAT;abs;2$;82| (63 . |Zero|) (67 . /) (73 . *)
(79 . |coerce|) (84 . |zero?|) (89 . |negative?|)
- (94 . |One|) (98 . =) (104 . |numer|) (109 . |denom|)
- |DFLOAT;**;$F$;84| (|PatternMatchResult| 101 $)
- (|Pattern| 101) (|Factored| $)
+ (94 . |one?|) (99 . |numer|) (104 . |denom|)
+ |DFLOAT;**;$F$;85| (|PatternMatchResult| 102 $)
+ (|Pattern| 102) (|Factored| $)
(|Record| (|:| |coef1| $) (|:| |coef2| $))
(|Union| 131 '"failed") (|List| $) (|Union| 133 '"failed")
(|Record| (|:| |coef1| $) (|:| |coef2| $)
@@ -995,31 +1000,31 @@
(|Record| (|:| |coef| 133) (|:| |generator| $))
(|Record| (|:| |unit| $) (|:| |canonical| $)
(|:| |associate| $)))
- '#(~= 114 |zero?| 120 |wholePart| 125 |unitNormal| 130
- |unitCanonical| 135 |unit?| 140 |truncate| 145 |tanh| 150
- |tan| 155 |subtractIfCan| 160 |squareFreePart| 166
- |squareFree| 171 |sqrt| 176 |sizeLess?| 181 |sinh| 187
- |sin| 192 |sign| 197 |sech| 202 |sec| 207 |sample| 212
- |round| 216 |retractIfCan| 221 |retract| 231 |rem| 241
- |recip| 247 |rationalApproximation| 252 |quo| 265
- |principalIdeal| 271 |prime?| 276 |precision| 281
- |positive?| 285 |pi| 290 |patternMatch| 294 |order| 301
- |one?| 306 |nthRoot| 311 |norm| 317 |negative?| 322
- |multiEuclidean| 327 |min| 333 |max| 343 |mantissa| 353
- |log2| 358 |log10| 363 |log| 368 |lcm| 373 |latex| 384
- |inv| 389 |hash| 394 |gcdPolynomial| 399 |gcd| 405
- |fractionPart| 416 |floor| 421 |float| 426 |factor| 439
- |extendedEuclidean| 444 |exquo| 457 |expressIdealMember|
- 463 |exponent| 469 |exp1| 474 |exp| 478 |euclideanSize|
- 483 |divide| 488 |digits| 494 |differentiate| 498 |csch|
- 509 |csc| 514 |coth| 519 |cot| 524 |cosh| 529 |cos| 534
- |convert| 539 |coerce| 559 |characteristic| 589 |ceiling|
- 593 |bits| 598 |base| 602 |atanh| 606 |atan| 611
- |associates?| 622 |asinh| 628 |asin| 633 |asech| 638
- |asec| 643 |acsch| 648 |acsc| 653 |acoth| 658 |acot| 663
- |acosh| 668 |acos| 673 |abs| 678 |Zero| 683 |One| 687
- |OMwrite| 691 |Gamma| 715 D 720 |Beta| 731 >= 737 > 743 =
- 749 <= 755 < 761 / 767 - 779 + 790 ** 796 * 826)
+ '#(~= 109 |zero?| 115 |wholePart| 120 |unitNormal| 125
+ |unitCanonical| 130 |unit?| 135 |truncate| 140 |tanh| 145
+ |tan| 150 |subtractIfCan| 155 |squareFreePart| 161
+ |squareFree| 166 |sqrt| 171 |sizeLess?| 176 |sinh| 182
+ |sin| 187 |sign| 192 |sech| 197 |sec| 202 |sample| 207
+ |round| 211 |retractIfCan| 216 |retract| 226 |rem| 236
+ |recip| 242 |rationalApproximation| 247 |quo| 260
+ |principalIdeal| 266 |prime?| 271 |precision| 276
+ |positive?| 280 |pi| 285 |patternMatch| 289 |order| 296
+ |one?| 301 |nthRoot| 306 |norm| 312 |negative?| 317
+ |multiEuclidean| 322 |min| 328 |max| 338 |mantissa| 348
+ |log2| 353 |log10| 358 |log| 363 |lcm| 368 |latex| 379
+ |inv| 384 |hash| 389 |gcdPolynomial| 394 |gcd| 400
+ |fractionPart| 411 |floor| 416 |float| 421 |factor| 434
+ |extendedEuclidean| 439 |exquo| 452 |expressIdealMember|
+ 458 |exponent| 464 |exp1| 469 |exp| 473 |euclideanSize|
+ 478 |divide| 483 |digits| 489 |differentiate| 493 |csch|
+ 504 |csc| 509 |coth| 514 |cot| 519 |cosh| 524 |cos| 529
+ |convert| 534 |coerce| 554 |characteristic| 584 |ceiling|
+ 588 |bits| 593 |base| 597 |atanh| 601 |atan| 606
+ |associates?| 617 |asinh| 623 |asin| 628 |asech| 633
+ |asec| 638 |acsch| 643 |acsc| 648 |acoth| 653 |acot| 658
+ |acosh| 663 |acos| 668 |abs| 673 |Zero| 678 |One| 682
+ |OMwrite| 686 |Gamma| 710 D 715 |Beta| 726 >= 732 > 738 =
+ 744 <= 750 < 756 / 762 - 774 + 785 ** 791 * 821)
'((|approximate| . 0) (|canonicalsClosed| . 0)
(|canonicalUnitNormal| . 0) (|noZeroDivisors| . 0)
((|commutative| "*") . 0) (|rightUnitary| . 0)
@@ -1053,14 +1058,14 @@
(|PrincipalIdealDomain|)
(|UniqueFactorizationDomain|)
(|GcdDomain|) (|DivisionRing|)
- (|IntegralDomain|) (|Algebra| 104)
+ (|IntegralDomain|) (|Algebra| 105)
(|Algebra| $$) (|DifferentialRing|)
(|CharacteristicZero|) (|OrderedRing|)
- (|Module| 104) (|EntireRing|)
+ (|Module| 105) (|EntireRing|)
(|CommutativeRing|) (|Module| $$)
- (|BiModule| 104 104) (|BiModule| $$ $$)
+ (|BiModule| 105 105) (|BiModule| $$ $$)
(|Ring|) (|OrderedAbelianGroup|)
- (|RightModule| 104) (|LeftModule| 104)
+ (|RightModule| 105) (|LeftModule| 105)
(|LeftModule| $$) (|Rng|)
(|RightModule| $$)
(|OrderedCancellationAbelianMonoid|)
@@ -1069,10 +1074,10 @@
(|CancellationAbelianMonoid|)
(|OrderedAbelianSemiGroup|)
(|AbelianMonoid|) (|Monoid|)
- (|PatternMatchable| 101) (|OrderedSet|)
+ (|PatternMatchable| 102) (|OrderedSet|)
(|AbelianSemiGroup|) (|SemiGroup|)
(|TranscendentalFunctionCategory|)
- (|RetractableTo| 104)
+ (|RetractableTo| 105)
(|RetractableTo| 24) (|RealConstant|)
(|SetCategory|) (|ConvertibleTo| 41)
(|ElementaryFunctionCategory|)
@@ -1082,9 +1087,9 @@
(|TrigonometricFunctionCategory|)
(|OpenMath|) (|ConvertibleTo| 129)
(|RadicalCategory|)
- (|ConvertibleTo| 101)
+ (|ConvertibleTo| 102)
(|ConvertibleTo| 13)
- (|CoercibleFrom| 104)
+ (|CoercibleFrom| 105)
(|CoercibleFrom| $$)
(|CoercibleFrom| 24) (|BasicType|)
(|CoercibleTo| 38))
@@ -1092,58 +1097,58 @@
'(0 6 0 7 2 9 0 8 6 10 1 9 11 0 12 2 9
11 0 13 14 1 9 11 0 15 1 9 11 0 16 2
0 0 22 0 29 1 38 0 13 39 1 41 0 13 42
- 1 93 13 13 94 2 93 13 13 13 96 1 101
- 0 13 102 0 104 0 117 2 104 0 24 24
- 118 2 24 0 105 0 119 1 104 0 24 120 1
- 104 18 0 121 1 104 18 0 122 0 104 0
- 123 2 104 18 0 0 124 1 104 24 0 125 1
- 104 24 0 126 2 0 18 0 0 1 1 0 18 0 87
- 1 0 24 0 98 1 0 139 0 1 1 0 0 0 1 1 0
- 18 0 1 1 0 0 0 1 1 0 0 0 75 1 0 0 0
- 63 2 0 90 0 0 1 1 0 0 0 1 1 0 130 0 1
- 1 0 0 0 54 2 0 18 0 0 1 1 0 0 0 73 1
- 0 0 0 61 1 0 24 0 115 1 0 0 0 78 1 0
- 0 0 65 0 0 0 1 1 0 0 0 1 1 0 110 0
- 111 1 0 113 0 114 1 0 104 0 109 1 0
- 24 0 112 2 0 0 0 0 1 1 0 90 0 91 2 0
- 104 0 105 107 3 0 104 0 105 105 106 2
- 0 0 0 0 1 1 0 138 133 1 1 0 18 0 1 0
- 0 22 27 1 0 18 0 1 0 0 0 37 3 0 128 0
- 129 128 1 1 0 24 0 33 1 0 18 0 1 2 0
- 0 0 24 1 1 0 0 0 1 1 0 18 0 86 2 0
- 134 133 0 1 0 0 0 32 2 0 0 0 0 51 0 0
- 0 31 2 0 0 0 0 50 1 0 24 0 25 1 0 0 0
- 28 1 0 0 0 55 1 0 0 0 60 2 0 0 0 0 1
- 1 0 0 133 1 1 0 8 0 1 1 0 0 0 1 1 0
- 88 0 89 2 0 137 137 137 1 1 0 0 133 1
- 2 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 3 0 0
- 24 24 22 99 2 0 0 24 24 1 1 0 130 0 1
- 3 0 132 0 0 0 1 2 0 135 0 0 1 2 0 90
- 0 0 1 2 0 134 133 0 1 1 0 24 0 26 0 0
- 0 36 1 0 0 0 59 1 0 105 0 1 2 0 136 0
- 0 1 0 0 22 1 1 0 0 0 92 2 0 0 0 105 1
- 1 0 0 0 76 1 0 0 0 66 1 0 0 0 77 1 0
- 0 0 64 1 0 0 0 74 1 0 0 0 62 1 0 41 0
- 43 1 0 129 0 1 1 0 101 0 103 1 0 13 0
- 100 1 0 0 104 1 1 0 0 24 58 1 0 0 104
- 1 1 0 0 0 1 1 0 0 24 58 1 0 38 0 40 0
- 0 105 1 1 0 0 0 1 0 0 22 30 0 0 22 23
- 1 0 0 0 81 2 0 0 0 0 108 1 0 0 0 69 2
- 0 18 0 0 1 1 0 0 0 79 1 0 0 0 67 1 0
- 0 0 84 1 0 0 0 72 1 0 0 0 82 1 0 0 0
- 70 1 0 0 0 83 1 0 0 0 71 1 0 0 0 80 1
- 0 0 0 68 1 0 0 0 116 0 0 0 34 0 0 0
- 35 2 0 11 9 0 20 3 0 11 9 0 18 21 1 0
- 8 0 17 2 0 8 0 18 19 1 0 0 0 95 1 0 0
- 0 1 2 0 0 0 105 1 2 0 0 0 0 97 2 0 18
- 0 0 1 2 0 18 0 0 1 2 0 18 0 0 52 2 0
- 18 0 0 1 2 0 18 0 0 44 2 0 0 0 24 53
- 2 0 0 0 0 85 2 0 0 0 0 47 1 0 0 0 45
- 2 0 0 0 0 46 2 0 0 0 0 57 2 0 0 0 104
- 127 2 0 0 0 24 56 2 0 0 0 105 1 2 0 0
- 0 22 1 2 0 0 104 0 1 2 0 0 0 104 1 2
- 0 0 0 0 48 2 0 0 24 0 49 2 0 0 105 0
- 1 2 0 0 22 0 29)))))
+ 1 94 13 13 95 2 94 13 13 13 97 1 102
+ 0 13 103 0 105 0 118 2 105 0 24 24
+ 119 2 24 0 106 0 120 1 105 0 24 121 1
+ 105 18 0 122 1 105 18 0 123 1 105 18
+ 0 124 1 105 24 0 125 1 105 24 0 126 2
+ 0 18 0 0 1 1 0 18 0 87 1 0 24 0 99 1
+ 0 139 0 1 1 0 0 0 1 1 0 18 0 1 1 0 0
+ 0 1 1 0 0 0 75 1 0 0 0 63 2 0 91 0 0
+ 1 1 0 0 0 1 1 0 130 0 1 1 0 0 0 54 2
+ 0 18 0 0 1 1 0 0 0 73 1 0 0 0 61 1 0
+ 24 0 116 1 0 0 0 78 1 0 0 0 65 0 0 0
+ 1 1 0 0 0 1 1 0 111 0 112 1 0 114 0
+ 115 1 0 105 0 110 1 0 24 0 113 2 0 0
+ 0 0 1 1 0 91 0 92 2 0 105 0 106 108 3
+ 0 105 0 106 106 107 2 0 0 0 0 1 1 0
+ 138 133 1 1 0 18 0 1 0 0 22 27 1 0 18
+ 0 1 0 0 0 37 3 0 128 0 129 128 1 1 0
+ 24 0 33 1 0 18 0 88 2 0 0 0 24 1 1 0
+ 0 0 1 1 0 18 0 86 2 0 134 133 0 1 0 0
+ 0 32 2 0 0 0 0 51 0 0 0 31 2 0 0 0 0
+ 50 1 0 24 0 25 1 0 0 0 28 1 0 0 0 55
+ 1 0 0 0 60 2 0 0 0 0 1 1 0 0 133 1 1
+ 0 8 0 1 1 0 0 0 1 1 0 89 0 90 2 0 137
+ 137 137 1 1 0 0 133 1 2 0 0 0 0 1 1 0
+ 0 0 1 1 0 0 0 1 3 0 0 24 24 22 100 2
+ 0 0 24 24 1 1 0 130 0 1 3 0 132 0 0 0
+ 1 2 0 135 0 0 1 2 0 91 0 0 1 2 0 134
+ 133 0 1 1 0 24 0 26 0 0 0 36 1 0 0 0
+ 59 1 0 106 0 1 2 0 136 0 0 1 0 0 22 1
+ 1 0 0 0 93 2 0 0 0 106 1 1 0 0 0 76 1
+ 0 0 0 66 1 0 0 0 77 1 0 0 0 64 1 0 0
+ 0 74 1 0 0 0 62 1 0 41 0 43 1 0 129 0
+ 1 1 0 102 0 104 1 0 13 0 101 1 0 0
+ 105 1 1 0 0 24 58 1 0 0 105 1 1 0 0 0
+ 1 1 0 0 24 58 1 0 38 0 40 0 0 106 1 1
+ 0 0 0 1 0 0 22 30 0 0 22 23 1 0 0 0
+ 81 2 0 0 0 0 109 1 0 0 0 69 2 0 18 0
+ 0 1 1 0 0 0 79 1 0 0 0 67 1 0 0 0 84
+ 1 0 0 0 72 1 0 0 0 82 1 0 0 0 70 1 0
+ 0 0 83 1 0 0 0 71 1 0 0 0 80 1 0 0 0
+ 68 1 0 0 0 117 0 0 0 34 0 0 0 35 2 0
+ 11 9 0 20 3 0 11 9 0 18 21 1 0 8 0 17
+ 2 0 8 0 18 19 1 0 0 0 96 1 0 0 0 1 2
+ 0 0 0 106 1 2 0 0 0 0 98 2 0 18 0 0 1
+ 2 0 18 0 0 1 2 0 18 0 0 52 2 0 18 0 0
+ 1 2 0 18 0 0 44 2 0 0 0 24 53 2 0 0 0
+ 0 85 2 0 0 0 0 47 1 0 0 0 45 2 0 0 0
+ 0 46 2 0 0 0 0 57 2 0 0 0 105 127 2 0
+ 0 0 24 56 2 0 0 0 106 1 2 0 0 0 22 1
+ 2 0 0 105 0 1 2 0 0 0 105 1 2 0 0 0 0
+ 48 2 0 0 24 0 49 2 0 0 106 0 1 2 0 0
+ 22 0 29)))))
'|lookupComplete|))
(MAKEPROP '|DoubleFloat| 'NILADIC T)
diff --git a/src/algebra/strap/EUCDOM-.lsp b/src/algebra/strap/EUCDOM-.lsp
index aada28a4..1cd2b434 100644
--- a/src/algebra/strap/EUCDOM-.lsp
+++ b/src/algebra/strap/EUCDOM-.lsp
@@ -102,14 +102,12 @@
|EUCDOM-;unitNormalizeIdealElt|)
|#G16|)
(EXIT (COND
- ((SPADCALL |a| (|spadConstant| $ 23)
- (|getShellEntry| $ 24))
- |s|)
+ ((SPADCALL |a| (|getShellEntry| $ 23)) |s|)
('T
(VECTOR (SPADCALL |a| (QVELT |s| 0)
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
(SPADCALL |a| (QVELT |s| 1)
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
|c|))))))))
(DEFUN |EUCDOM-;extendedEuclidean;2SR;7| (|x| |y| $)
@@ -117,14 +115,14 @@
(RETURN
(SEQ (LETT |s1|
(|EUCDOM-;unitNormalizeIdealElt|
- (VECTOR (|spadConstant| $ 23)
+ (VECTOR (|spadConstant| $ 25)
(|spadConstant| $ 26) |x|)
$)
|EUCDOM-;extendedEuclidean;2SR;7|)
(LETT |s2|
(|EUCDOM-;unitNormalizeIdealElt|
(VECTOR (|spadConstant| $ 26)
- (|spadConstant| $ 23) |y|)
+ (|spadConstant| $ 25) |y|)
$)
|EUCDOM-;extendedEuclidean;2SR;7|)
(EXIT (COND
@@ -147,12 +145,12 @@
(SPADCALL (QVELT |s1| 0)
(SPADCALL (QCAR |qr|)
(QVELT |s2| 0)
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
(|getShellEntry| $ 27))
(SPADCALL (QVELT |s1| 1)
(SPADCALL (QCAR |qr|)
(QVELT |s2| 1)
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
(|getShellEntry| $ 27))
(QCDR |qr|))
|EUCDOM-;extendedEuclidean;2SR;7|)
@@ -178,7 +176,7 @@
(QSETVELT |s1| 1
(SPADCALL (QVELT |s1| 1)
(SPADCALL (QCAR |qr|) |x|
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
(|getShellEntry| $ 29)))
(EXIT
(LETT |s1|
@@ -207,16 +205,16 @@
(CONS 0
(CONS (SPADCALL (QVELT |s| 0)
(QCDR |w|)
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
(SPADCALL (QVELT |s| 1)
(QCDR |w|)
- (|getShellEntry| $ 25)))))
+ (|getShellEntry| $ 24)))))
('T
(SEQ (LETT |qr|
(SPADCALL
(SPADCALL (QVELT |s| 0)
(QCDR |w|)
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
|y| (|getShellEntry| $ 13))
|EUCDOM-;extendedEuclidean;3SU;8|)
(EXIT (CONS 0
@@ -224,13 +222,13 @@
(SPADCALL
(SPADCALL (QVELT |s| 1)
(QCDR |w|)
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
(SPADCALL (QCAR |qr|) |x|
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
(|getShellEntry| $ 29))))))))))))))))
(DEFUN |EUCDOM-;principalIdeal;LR;9| (|l| $)
- (PROG (|uca| |v| |u| #0=#:G1516 |vv| #1=#:G1517)
+ (PROG (|uca| |v| |u| #0=#:G1517 |vv| #1=#:G1518)
(RETURN
(SEQ (COND
((SPADCALL |l| NIL (|getShellEntry| $ 38))
@@ -280,7 +278,7 @@
(CONS
(SPADCALL (QVELT |u| 1)
|vv|
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
#0#)
|EUCDOM-;principalIdeal;LR;9|)))
(LETT #1# (CDR #1#)
@@ -290,11 +288,11 @@
(QVELT |u| 2))))))))))
(DEFUN |EUCDOM-;expressIdealMember;LSU;10| (|l| |z| $)
- (PROG (#0=#:G1518 #1=#:G1519 |pid| |q| #2=#:G1520 |v| #3=#:G1521)
+ (PROG (#0=#:G1519 #1=#:G1520 |pid| |q| #2=#:G1521 |v| #3=#:G1522)
(RETURN
(SEQ (COND
((SPADCALL |z| (|spadConstant| $ 26)
- (|getShellEntry| $ 24))
+ (|getShellEntry| $ 44))
(CONS 0
(PROGN
(LETT #0# NIL
@@ -349,7 +347,7 @@
(LETT #2#
(CONS
(SPADCALL (QCDR |q|) |v|
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
#2#)
|EUCDOM-;expressIdealMember;LSU;10|)))
(LETT #3# (CDR #3#)
@@ -358,9 +356,9 @@
(EXIT (NREVERSE0 #2#)))))))))))))))
(DEFUN |EUCDOM-;multiEuclidean;LSU;11| (|l| |z| $)
- (PROG (|n| |l1| |l2| #0=#:G1398 #1=#:G1522 #2=#:G1503 #3=#:G1501
- #4=#:G1502 #5=#:G1399 #6=#:G1523 #7=#:G1506 #8=#:G1504
- #9=#:G1505 |u| |v1| |v2|)
+ (PROG (|n| |l1| |l2| #0=#:G1398 #1=#:G1523 #2=#:G1504 #3=#:G1502
+ #4=#:G1503 #5=#:G1399 #6=#:G1524 #7=#:G1507 #8=#:G1505
+ #9=#:G1506 |u| |v1| |v2|)
(RETURN
(SEQ (LETT |n| (LENGTH |l|) |EUCDOM-;multiEuclidean;LSU;11|)
(EXIT (COND
@@ -369,11 +367,11 @@
((EQL |n| 1) (CONS 0 (LIST |z|)))
('T
(SEQ (LETT |l1|
- (SPADCALL |l| (|getShellEntry| $ 46))
+ (SPADCALL |l| (|getShellEntry| $ 47))
|EUCDOM-;multiEuclidean;LSU;11|)
(LETT |l2|
(SPADCALL |l1| (QUOTIENT2 |n| 2)
- (|getShellEntry| $ 48))
+ (|getShellEntry| $ 49))
|EUCDOM-;multiEuclidean;LSU;11|)
(LETT |u|
(SPADCALL
@@ -402,7 +400,7 @@
(#4#
(LETT #3#
(SPADCALL #3# #2#
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
|EUCDOM-;multiEuclidean;LSU;11|))
('T
(PROGN
@@ -415,7 +413,7 @@
(GO G190) G191 (EXIT NIL))
(COND
(#4# #3#)
- ('T (|spadConstant| $ 23))))
+ ('T (|spadConstant| $ 25))))
(PROGN
(LETT #9# NIL
|EUCDOM-;multiEuclidean;LSU;11|)
@@ -441,7 +439,7 @@
(#9#
(LETT #8#
(SPADCALL #8# #7#
- (|getShellEntry| $ 25))
+ (|getShellEntry| $ 24))
|EUCDOM-;multiEuclidean;LSU;11|))
('T
(PROGN
@@ -454,8 +452,8 @@
(GO G190) G191 (EXIT NIL))
(COND
(#9# #8#)
- ('T (|spadConstant| $ 23))))
- |z| (|getShellEntry| $ 49))
+ ('T (|spadConstant| $ 25))))
+ |z| (|getShellEntry| $ 50))
|EUCDOM-;multiEuclidean;LSU;11|)
(EXIT (COND
((QEQCAR |u| 1) (CONS 1 "failed"))
@@ -463,7 +461,7 @@
(SEQ (LETT |v1|
(SPADCALL |l1|
(QCDR (QCDR |u|))
- (|getShellEntry| $ 50))
+ (|getShellEntry| $ 51))
|EUCDOM-;multiEuclidean;LSU;11|)
(EXIT
(COND
@@ -474,7 +472,7 @@
(LETT |v2|
(SPADCALL |l2|
(QCAR (QCDR |u|))
- (|getShellEntry| $ 50))
+ (|getShellEntry| $ 51))
|EUCDOM-;multiEuclidean;LSU;11|)
(EXIT
(COND
@@ -485,7 +483,7 @@
(SPADCALL (QCDR |v1|)
(QCDR |v2|)
(|getShellEntry| $
- 51))))))))))))))))))))))
+ 52))))))))))))))))))))))
(DEFUN |EuclideanDomain&| (|#1|)
(PROG (|dv$1| |dv$| $ |pv$|)
@@ -493,7 +491,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|EuclideanDomain&|))
(LETT |dv$| (LIST '|EuclideanDomain&| |dv$1|) . #0#)
- (LETT $ (|newShell| 53) . #0#)
+ (LETT $ (|newShell| 54) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
@@ -511,39 +509,40 @@
(16 . |unitCanonical|) (21 . |rem|) |EUCDOM-;gcd;3S;5|
(|Record| (|:| |unit| $) (|:| |canonical| $)
(|:| |associate| $))
- (27 . |unitNormal|) (32 . |One|) (36 . =) (42 . *)
- (48 . |Zero|) (52 . -) (58 . |sizeLess?|) (64 . +)
+ (27 . |unitNormal|) (32 . |one?|) (37 . *) (43 . |One|)
+ (47 . |Zero|) (51 . -) (57 . |sizeLess?|) (63 . +)
(|Record| (|:| |coef1| $) (|:| |coef2| $)
(|:| |generator| $))
|EUCDOM-;extendedEuclidean;2SR;7|
- (70 . |extendedEuclidean|) (76 . |exquo|)
+ (69 . |extendedEuclidean|) (75 . |exquo|)
(|Record| (|:| |coef1| $) (|:| |coef2| $))
(|Union| 34 '"failed") |EUCDOM-;extendedEuclidean;3SU;8|
- (|List| 6) (82 . =) (88 . |second|) (|List| $)
+ (|List| 6) (81 . =) (87 . |second|) (|List| $)
(|Record| (|:| |coef| 40) (|:| |generator| $))
- (93 . |principalIdeal|) |EUCDOM-;principalIdeal;LR;9|
- (|Union| 40 '"failed") |EUCDOM-;expressIdealMember;LSU;10|
- (98 . |copy|) (|Integer|) (103 . |split!|)
- (109 . |extendedEuclidean|) (116 . |multiEuclidean|)
- (122 . |concat|) |EUCDOM-;multiEuclidean;LSU;11|)
- '#(|sizeLess?| 128 |rem| 134 |quo| 140 |principalIdeal| 146
- |multiEuclidean| 151 |gcd| 157 |extendedEuclidean| 163
- |exquo| 176 |expressIdealMember| 182)
+ (92 . |principalIdeal|) |EUCDOM-;principalIdeal;LR;9|
+ (97 . =) (|Union| 40 '"failed")
+ |EUCDOM-;expressIdealMember;LSU;10| (103 . |copy|)
+ (|Integer|) (108 . |split!|) (114 . |extendedEuclidean|)
+ (121 . |multiEuclidean|) (127 . |concat|)
+ |EUCDOM-;multiEuclidean;LSU;11|)
+ '#(|sizeLess?| 133 |rem| 139 |quo| 145 |principalIdeal| 151
+ |multiEuclidean| 156 |gcd| 162 |extendedEuclidean| 168
+ |exquo| 181 |expressIdealMember| 187)
'NIL
(CONS (|makeByteWordVec2| 1 'NIL)
(CONS '#()
(CONS '#()
- (|makeByteWordVec2| 52
+ (|makeByteWordVec2| 53
'(1 6 7 0 8 1 6 9 0 10 2 6 12 0 0 13 1
- 6 0 0 18 2 6 0 0 0 19 1 6 21 0 22 0 6
- 0 23 2 6 7 0 0 24 2 6 0 0 0 25 0 6 0
- 26 2 6 0 0 0 27 2 6 7 0 0 28 2 6 0 0
- 0 29 2 6 30 0 0 32 2 6 16 0 0 33 2 37
- 7 0 0 38 1 37 6 0 39 1 6 41 40 42 1
- 37 0 0 46 2 37 0 0 47 48 3 6 35 0 0 0
- 49 2 6 44 40 0 50 2 37 0 0 0 51 2 0 7
- 0 0 11 2 0 0 0 0 15 2 0 0 0 0 14 1 0
- 41 40 43 2 0 44 40 0 52 2 0 0 0 0 20
- 3 0 35 0 0 0 36 2 0 30 0 0 31 2 0 16
- 0 0 17 2 0 44 40 0 45)))))
+ 6 0 0 18 2 6 0 0 0 19 1 6 21 0 22 1 6
+ 7 0 23 2 6 0 0 0 24 0 6 0 25 0 6 0 26
+ 2 6 0 0 0 27 2 6 7 0 0 28 2 6 0 0 0
+ 29 2 6 30 0 0 32 2 6 16 0 0 33 2 37 7
+ 0 0 38 1 37 6 0 39 1 6 41 40 42 2 6 7
+ 0 0 44 1 37 0 0 47 2 37 0 0 48 49 3 6
+ 35 0 0 0 50 2 6 45 40 0 51 2 37 0 0 0
+ 52 2 0 7 0 0 11 2 0 0 0 0 15 2 0 0 0
+ 0 14 1 0 41 40 43 2 0 45 40 0 53 2 0
+ 0 0 0 20 3 0 35 0 0 0 36 2 0 30 0 0
+ 31 2 0 16 0 0 17 2 0 45 40 0 46)))))
'|lookupComplete|))
diff --git a/src/algebra/strap/EUCDOM.lsp b/src/algebra/strap/EUCDOM.lsp
index b4b66503..fae7626f 100644
--- a/src/algebra/strap/EUCDOM.lsp
+++ b/src/algebra/strap/EUCDOM.lsp
@@ -4,7 +4,7 @@
(DEFPARAMETER |EuclideanDomain;AL| 'NIL)
(DEFUN |EuclideanDomain;| ()
- (PROG (#0=#:G1413)
+ (PROG (#0=#:G1414)
(RETURN
(PROG1 (LETT #0#
(|Join| (|PrincipalIdealDomain|)
diff --git a/src/algebra/strap/FFIELDC-.lsp b/src/algebra/strap/FFIELDC-.lsp
index 9e571320..2a3322ff 100644
--- a/src/algebra/strap/FFIELDC-.lsp
+++ b/src/algebra/strap/FFIELDC-.lsp
@@ -149,8 +149,7 @@
(SPADCALL |a|
(QUOTIENT2 |q| (QCAR |exp|))
(|getShellEntry| $ 47))
- (|spadConstant| $ 48)
- (|getShellEntry| $ 49))
+ (|getShellEntry| $ 48))
|FFIELDC-;primitive?;SB;9|)))
(LETT #0# (CDR #0#) |FFIELDC-;primitive?;SB;9|)
(GO G190) G191 (EXIT NIL))
@@ -162,7 +161,7 @@
(RETURN
(SEQ (COND
((SPADCALL |e| (|spadConstant| $ 7)
- (|getShellEntry| $ 49))
+ (|getShellEntry| $ 50))
(|error| "order(0) is not defined "))
('T
(SEQ (LETT |ord| (- 2 1) |FFIELDC-;order;SPi;10|)
@@ -187,8 +186,7 @@
(SPADCALL
(SPADCALL |e| |a|
(|getShellEntry| $ 47))
- (|spadConstant| $ 48)
- (|getShellEntry| $ 49))
+ (|getShellEntry| $ 48))
|FFIELDC-;order;SPi;10|)
(SEQ (LETT |j| 0 |FFIELDC-;order;SPi;10|)
(LETT #1# (- (QCDR |rec|) 2)
@@ -209,8 +207,7 @@
(SPADCALL
(SPADCALL |e| |a|
(|getShellEntry| $ 47))
- (|spadConstant| $ 48)
- (|getShellEntry| $ 49))
+ (|getShellEntry| $ 48))
|FFIELDC-;order;SPi;10|)))
(LETT |j| (QSADD1 |j|)
|FFIELDC-;order;SPi;10|)
@@ -238,7 +235,7 @@
(LETT |gen| (SPADCALL (|getShellEntry| $ 52))
|FFIELDC-;discreteLog;SNni;11|)
(EXIT (COND
- ((SPADCALL |b| |gen| (|getShellEntry| $ 49))
+ ((SPADCALL |b| |gen| (|getShellEntry| $ 50))
1)
('T
(SEQ (LETT |disclog| 0
@@ -389,7 +386,7 @@
"discreteLog: logarithm to base zero"
(|getShellEntry| $ 63))
(EXIT (CONS 1 "failed"))))
- ((SPADCALL |b| |logbase| (|getShellEntry| $ 49))
+ ((SPADCALL |b| |logbase| (|getShellEntry| $ 50))
(CONS 0 1))
('T
(COND
@@ -597,30 +594,30 @@
|FFIELDC-;createPrimitiveElement;S;8|
(|Record| (|:| |factor| 18) (|:| |exponent| 18))
(|List| 44) (71 . |factorsOfCyclicGroupSize|) (75 . **)
- (81 . |One|) (85 . =) |FFIELDC-;primitive?;SB;9|
- |FFIELDC-;order;SPi;10| (91 . |primitiveElement|)
- (|Table| 10 35) (95 . |tableForDiscreteLogarithm|)
- (100 . |#|) (|Union| 35 '"failed") (105 . |search|)
- (111 . *) |FFIELDC-;discreteLog;SNni;11| (|Void|)
- (|String|) (|OutputForm|) (117 . |messagePrint|)
- (|Factored| $) (122 . |factor|) (|Factored| 18)
- (127 . |factors|) (|DiscreteLogarithmPackage| 6)
- (132 . |shanksDiscLogAlgorithm|)
+ (81 . |one?|) |FFIELDC-;primitive?;SB;9| (86 . =)
+ |FFIELDC-;order;SPi;10| (92 . |primitiveElement|)
+ (|Table| 10 35) (96 . |tableForDiscreteLogarithm|)
+ (101 . |#|) (|Union| 35 '"failed") (106 . |search|)
+ (112 . *) |FFIELDC-;discreteLog;SNni;11| (|Void|)
+ (|String|) (|OutputForm|) (118 . |messagePrint|)
+ (|Factored| $) (123 . |factor|) (|Factored| 18)
+ (128 . |factors|) (|DiscreteLogarithmPackage| 6)
+ (133 . |shanksDiscLogAlgorithm|)
|FFIELDC-;discreteLog;2SU;12|
(|SparseUnivariatePolynomial| 6) (|Factored| 71)
(|UnivariatePolynomialSquareFree| 6 71)
- (139 . |squareFree|) (|DistinctDegreeFactorize| 6 71)
- (144 . |factor|) (149 . |Zero|) (153 . =) (159 . |Zero|)
+ (140 . |squareFree|) (|DistinctDegreeFactorize| 6 71)
+ (145 . |factor|) (150 . |Zero|) (154 . =) (160 . |Zero|)
(|Record| (|:| |irr| 71) (|:| |pow| 18)) (|List| 80)
(|Record| (|:| |cont| 6) (|:| |factors| 81))
- (163 . |distdfact|) (169 . |coerce|) (174 . |primeFactor|)
- (180 . *) (186 . |One|) (190 . *) (|EuclideanDomain&| 71)
- (196 . |gcd|) (|SparseUnivariatePolynomial| $)
+ (164 . |distdfact|) (170 . |coerce|) (175 . |primeFactor|)
+ (181 . *) (187 . |One|) (191 . *) (|EuclideanDomain&| 71)
+ (197 . |gcd|) (|SparseUnivariatePolynomial| $)
|FFIELDC-;gcdPolynomial;3Sup;16|)
- '#(|primitive?| 202 |order| 207 |nextItem| 217 |init| 222
- |gcdPolynomial| 226 |discreteLog| 232 |differentiate| 243
- |createPrimitiveElement| 248 |conditionP| 252 |charthRoot|
- 257)
+ '#(|primitive?| 203 |order| 208 |nextItem| 218 |init| 223
+ |gcdPolynomial| 227 |discreteLog| 233 |differentiate| 244
+ |createPrimitiveElement| 249 |conditionP| 253 |charthRoot|
+ 258)
'NIL
(CONS (|makeByteWordVec2| 1 'NIL)
(CONS '#()
@@ -631,17 +628,17 @@
23 0 25 2 22 13 26 0 27 1 6 0 0 28 2
22 0 29 0 30 2 6 0 0 35 36 0 6 35 39
0 6 40 41 2 40 13 0 0 42 0 6 45 46 2
- 6 0 0 18 47 0 6 0 48 2 6 13 0 0 49 0
- 6 0 52 1 6 53 18 54 1 53 35 0 55 2 53
- 56 10 0 57 2 6 0 0 0 58 1 62 60 61 63
- 1 18 64 0 65 1 66 45 0 67 3 68 56 6 6
- 35 69 1 73 72 71 74 1 75 72 71 76 0
- 71 0 77 2 71 13 0 0 78 0 72 0 79 2 75
- 82 71 13 83 1 71 0 6 84 2 72 0 71 18
- 85 2 72 0 0 0 86 0 72 0 87 2 72 0 71
- 0 88 2 89 0 0 0 90 1 0 13 0 50 1 0 10
- 0 51 1 0 19 0 21 1 0 15 0 16 0 0 0 9
- 2 0 91 91 91 92 1 0 35 0 59 2 0 56 0
- 0 70 1 0 0 0 8 0 0 0 43 1 0 32 33 34
- 1 0 0 0 37 1 0 15 0 38)))))
+ 6 0 0 18 47 1 6 13 0 48 2 6 13 0 0 50
+ 0 6 0 52 1 6 53 18 54 1 53 35 0 55 2
+ 53 56 10 0 57 2 6 0 0 0 58 1 62 60 61
+ 63 1 18 64 0 65 1 66 45 0 67 3 68 56
+ 6 6 35 69 1 73 72 71 74 1 75 72 71 76
+ 0 71 0 77 2 71 13 0 0 78 0 72 0 79 2
+ 75 82 71 13 83 1 71 0 6 84 2 72 0 71
+ 18 85 2 72 0 0 0 86 0 72 0 87 2 72 0
+ 71 0 88 2 89 0 0 0 90 1 0 13 0 49 1 0
+ 10 0 51 1 0 19 0 21 1 0 15 0 16 0 0 0
+ 9 2 0 91 91 91 92 1 0 35 0 59 2 0 56
+ 0 0 70 1 0 0 0 8 0 0 0 43 1 0 32 33
+ 34 1 0 0 0 37 1 0 15 0 38)))))
'|lookupComplete|))
diff --git a/src/algebra/strap/INS-.lsp b/src/algebra/strap/INS-.lsp
index d7e2223b..234dfc24 100644
--- a/src/algebra/strap/INS-.lsp
+++ b/src/algebra/strap/INS-.lsp
@@ -120,7 +120,7 @@
(DEFUN |INS-;rational?;SB;8| (|x| $) (DECLARE (IGNORE $)) 'T)
(DEFUN |INS-;euclideanSize;SNni;9| (|x| $)
- (PROG (#0=#:G1425 #1=#:G1426)
+ (PROG (#0=#:G1426 #1=#:G1427)
(RETURN
(COND
((SPADCALL |x| (|spadConstant| $ 9) (|getShellEntry| $ 24))
@@ -271,17 +271,16 @@
(LETT |d| |r| |INS-;invmod;3S;28|)
(EXIT (LETT |d1| |r1| |INS-;invmod;3S;28|)))
NIL (GO G190) G191 (EXIT NIL))
+ (COND
+ ((NULL (SPADCALL |c| (|getShellEntry| $ 83)))
+ (EXIT (|error| "inverse does not exist"))))
(EXIT (COND
- ((SPADCALL |c| (|spadConstant| $ 20)
- (|getShellEntry| $ 24))
- (COND
- ((SPADCALL |c1| (|getShellEntry| $ 79))
- (SPADCALL |c1| |b| (|getShellEntry| $ 77)))
- ('T |c1|)))
- ('T (|error| "inverse does not exist"))))))))
+ ((SPADCALL |c1| (|getShellEntry| $ 79))
+ (SPADCALL |c1| |b| (|getShellEntry| $ 77)))
+ ('T |c1|)))))))
(DEFUN |INS-;powmod;4S;29| (|x| |n| |p| $)
- (PROG (|y| #0=#:G1483 |z|)
+ (PROG (|y| #0=#:G1484 |z|)
(RETURN
(SEQ (EXIT (SEQ (COND
((SPADCALL |x| (|getShellEntry| $ 79))
@@ -306,7 +305,7 @@
(|getShellEntry| $ 12))
(LETT |y|
(SPADCALL |y| |z| |p|
- (|getShellEntry| $ 84))
+ (|getShellEntry| $ 85))
|INS-;powmod;4S;29|)))
(EXIT
(COND
@@ -326,7 +325,7 @@
('T
(LETT |z|
(SPADCALL |z| |z| |p|
- (|getShellEntry| $ 84))
+ (|getShellEntry| $ 85))
|INS-;powmod;4S;29|)))))
NIL (GO G190) G191 (EXIT NIL)))))))))
#0# (EXIT #0#)))))
@@ -337,7 +336,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|IntegerNumberSystem&|))
(LETT |dv$| (LIST '|IntegerNumberSystem&| |dv$1|) . #0#)
- (LETT $ (|newShell| 86) . #0#)
+ (LETT $ (|newShell| 87) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
@@ -378,20 +377,21 @@
(116 . |rem|) (|PositiveInteger|) (122 . *) (128 . +)
|INS-;symmetricRemainder;3S;27| (134 . |negative?|)
(139 . |positiveRemainder|) (145 . |quo|) (151 . *)
- |INS-;invmod;3S;28| (157 . |mulmod|) |INS-;powmod;4S;29|)
- '#(|symmetricRemainder| 164 |squareFree| 170 |retractIfCan|
- 175 |retract| 180 |rationalIfCan| 185 |rational?| 190
- |rational| 195 |prime?| 200 |powmod| 205 |positive?| 212
- |permutation| 217 |patternMatch| 223 |nextItem| 230 |mask|
- 235 |invmod| 240 |init| 246 |factorial| 250 |factor| 255
- |even?| 260 |euclideanSize| 265 |differentiate| 270 |copy|
- 275 |convert| 280 |characteristic| 300 |bit?| 304
- |binomial| 310)
+ (157 . |one?|) |INS-;invmod;3S;28| (162 . |mulmod|)
+ |INS-;powmod;4S;29|)
+ '#(|symmetricRemainder| 169 |squareFree| 175 |retractIfCan|
+ 180 |retract| 185 |rationalIfCan| 190 |rational?| 195
+ |rational| 200 |prime?| 205 |powmod| 210 |positive?| 217
+ |permutation| 222 |patternMatch| 228 |nextItem| 235 |mask|
+ 240 |invmod| 245 |init| 251 |factorial| 255 |factor| 260
+ |even?| 265 |euclideanSize| 270 |differentiate| 275 |copy|
+ 280 |convert| 285 |characteristic| 305 |bit?| 309
+ |binomial| 315)
'NIL
(CONS (|makeByteWordVec2| 1 'NIL)
(CONS '#()
(CONS '#()
- (|makeByteWordVec2| 85
+ (|makeByteWordVec2| 86
'(0 6 0 9 1 6 11 0 12 2 6 11 0 0 14 1 6
0 0 17 2 6 0 0 0 18 0 6 0 20 1 6 0 0
21 2 6 11 0 0 24 1 6 25 0 26 1 28 0
@@ -401,15 +401,16 @@
1 6 11 0 60 2 6 0 0 0 61 3 65 64 6 37
64 66 1 69 0 25 70 2 6 0 0 0 74 2 6 0
75 0 76 2 6 0 0 0 77 1 6 11 0 79 2 6
- 0 0 0 80 2 6 0 0 0 81 2 6 0 0 0 82 3
- 6 0 0 0 0 84 2 0 0 0 0 78 1 0 43 0 46
- 1 0 57 0 58 1 0 25 0 36 1 0 72 0 73 1
- 0 11 0 23 1 0 69 0 71 1 0 11 0 49 3 0
- 0 0 0 0 85 1 0 11 0 15 2 0 0 0 0 56 3
- 0 67 0 37 67 68 1 0 62 0 63 1 0 0 0
- 22 2 0 0 0 0 83 0 0 0 59 1 0 0 0 52 1
- 0 43 0 44 1 0 11 0 13 1 0 7 0 27 1 0
- 0 0 10 1 0 0 0 16 1 0 31 0 32 1 0 28
- 0 30 1 0 37 0 39 1 0 33 0 35 0 0 7 8
- 2 0 11 0 0 19 2 0 0 0 0 54)))))
+ 0 0 0 80 2 6 0 0 0 81 2 6 0 0 0 82 1
+ 6 11 0 83 3 6 0 0 0 0 85 2 0 0 0 0 78
+ 1 0 43 0 46 1 0 57 0 58 1 0 25 0 36 1
+ 0 72 0 73 1 0 11 0 23 1 0 69 0 71 1 0
+ 11 0 49 3 0 0 0 0 0 86 1 0 11 0 15 2
+ 0 0 0 0 56 3 0 67 0 37 67 68 1 0 62 0
+ 63 1 0 0 0 22 2 0 0 0 0 84 0 0 0 59 1
+ 0 0 0 52 1 0 43 0 44 1 0 11 0 13 1 0
+ 7 0 27 1 0 0 0 10 1 0 0 0 16 1 0 31 0
+ 32 1 0 28 0 30 1 0 37 0 39 1 0 33 0
+ 35 0 0 7 8 2 0 11 0 0 19 2 0 0 0 0
+ 54)))))
'|lookupComplete|))
diff --git a/src/algebra/strap/INS.lsp b/src/algebra/strap/INS.lsp
index eb352380..dd9be9b6 100644
--- a/src/algebra/strap/INS.lsp
+++ b/src/algebra/strap/INS.lsp
@@ -4,12 +4,12 @@
(DEFPARAMETER |IntegerNumberSystem;AL| 'NIL)
(DEFUN |IntegerNumberSystem;| ()
- (PROG (#0=#:G1414)
+ (PROG (#0=#:G1415)
(RETURN
(PROG1 (LETT #0#
(|sublisV|
- (PAIR '(#1=#:G1408 #2=#:G1409 #3=#:G1410
- #4=#:G1411 #5=#:G1412 #6=#:G1413)
+ (PAIR '(#1=#:G1409 #2=#:G1410 #3=#:G1411
+ #4=#:G1412 #5=#:G1413 #6=#:G1414)
(LIST '(|Integer|) '(|Integer|)
'(|Integer|) '(|InputForm|)
'(|Pattern| (|Integer|))
diff --git a/src/algebra/strap/INT.lsp b/src/algebra/strap/INT.lsp
index a3bfd830..07f142fa 100644
--- a/src/algebra/strap/INT.lsp
+++ b/src/algebra/strap/INT.lsp
@@ -336,7 +336,7 @@
(INTEGER-LENGTH |a|))
(DEFUN |INT;addmod;4$;20| (|a| |b| |p| $)
- (PROG (|c| #0=#:G1433)
+ (PROG (|c| #0=#:G1434)
(RETURN
(SEQ (EXIT (SEQ (SEQ (LETT |c| (+ |a| |b|) |INT;addmod;4$;20|)
(EXIT (COND
@@ -464,7 +464,7 @@
(SPADCALL |p| (|getShellEntry| $ 98)))
(DEFUN |INT;factorPolynomial| (|p| $)
- (PROG (|pp| #0=#:G1504)
+ (PROG (|pp| #0=#:G1506)
(RETURN
(SEQ (LETT |pp| (SPADCALL |p| (|getShellEntry| $ 99))
|INT;factorPolynomial|)
@@ -507,7 +507,7 @@
(DEFUN |Integer| ()
(PROG ()
(RETURN
- (PROG (#0=#:G1529)
+ (PROG (#0=#:G1531)
(RETURN
(COND
((LETT #0# (HGET |$ConstructorCache| '|Integer|) |Integer|)
diff --git a/src/algebra/strap/ISTRING.lsp b/src/algebra/strap/ISTRING.lsp
index 44bdb482..a7ba5fa0 100644
--- a/src/algebra/strap/ISTRING.lsp
+++ b/src/algebra/strap/ISTRING.lsp
@@ -181,8 +181,8 @@
(STRCONC "\\mbox{``" (STRCONC |s| "''}")))
(DEFUN |ISTRING;replace;$Us2$;15| (|s| |sg| |t| $)
- (PROG (|l| |m| |n| |h| #0=#:G1438 |r| #1=#:G1535 #2=#:G1536 |i|
- #3=#:G1537 |k|)
+ (PROG (|l| |m| |n| |h| #0=#:G1439 |r| #1=#:G1537 #2=#:G1538 |i|
+ #3=#:G1539 |k|)
(RETURN
(SEQ (LETT |l|
(- (SPADCALL |sg| (|getShellEntry| $ 39))
@@ -254,7 +254,7 @@
(EXIT |c|))))))
(DEFUN |ISTRING;substring?;2$IB;17| (|part| |whole| |startpos| $)
- (PROG (|np| |nw| |iw| |ip| #0=#:G1538 #1=#:G1452 #2=#:G1448)
+ (PROG (|np| |nw| |iw| |ip| #0=#:G1540 #1=#:G1453 #2=#:G1449)
(RETURN
(SEQ (EXIT (SEQ (LETT |np| (QCSIZE |part|)
|ISTRING;substring?;2$IB;17|)
@@ -323,7 +323,7 @@
('T (+ |r| (|getShellEntry| $ 6)))))))))))))
(DEFUN |ISTRING;position;C$2I;19| (|c| |t| |startpos| $)
- (PROG (|r| #0=#:G1539 #1=#:G1462)
+ (PROG (|r| #0=#:G1541 #1=#:G1463)
(RETURN
(SEQ (EXIT (SEQ (LETT |startpos|
(- |startpos| (|getShellEntry| $ 6))
@@ -359,7 +359,7 @@
#1# (EXIT #1#)))))
(DEFUN |ISTRING;position;Cc$2I;20| (|cc| |t| |startpos| $)
- (PROG (|r| #0=#:G1540 #1=#:G1468)
+ (PROG (|r| #0=#:G1542 #1=#:G1469)
(RETURN
(SEQ (EXIT (SEQ (LETT |startpos|
(- |startpos| (|getShellEntry| $ 6))
@@ -570,7 +570,7 @@
(SPADCALL |i| |n| (|getShellEntry| $ 20)) $))))))
(DEFUN |ISTRING;rightTrim;$C$;26| (|s| |c| $)
- (PROG (|j| #0=#:G1541)
+ (PROG (|j| #0=#:G1543)
(RETURN
(SEQ (SEQ (LETT |j| (SPADCALL |s| (|getShellEntry| $ 42))
|ISTRING;rightTrim;$C$;26|)
@@ -591,7 +591,7 @@
$))))))
(DEFUN |ISTRING;rightTrim;$Cc$;27| (|s| |cc| $)
- (PROG (|j| #0=#:G1542)
+ (PROG (|j| #0=#:G1544)
(RETURN
(SEQ (SEQ (LETT |j| (SPADCALL |s| (|getShellEntry| $ 42))
|ISTRING;rightTrim;$Cc$;27|)
@@ -612,7 +612,7 @@
$))))))
(DEFUN |ISTRING;concat;L$;28| (|l| $)
- (PROG (#0=#:G1543 #1=#:G1497 #2=#:G1495 #3=#:G1496 |t| |s| #4=#:G1544
+ (PROG (#0=#:G1545 #1=#:G1498 #2=#:G1496 #3=#:G1497 |t| |s| #4=#:G1546
|i|)
(RETURN
(SEQ (LETT |t|
@@ -734,8 +734,8 @@
(|stringMatch| |pattern| |target| (CHARACTER |wildcard|)))
(DEFUN |ISTRING;match?;2$CB;34| (|pattern| |target| |dontcare| $)
- (PROG (|n| |m| #0=#:G1515 #1=#:G1518 |s| #2=#:G1519 #3=#:G1528 |i|
- |p| #4=#:G1520 |q|)
+ (PROG (|n| |m| #0=#:G1517 #1=#:G1520 |s| #2=#:G1521 #3=#:G1530 |i|
+ |p| #4=#:G1522 |q|)
(RETURN
(SEQ (EXIT (SEQ (LETT |n|
(SPADCALL |pattern| (|getShellEntry| $ 42))
@@ -858,10 +858,10 @@
(EXIT 'T)))))))
#3# (EXIT #3#)))))
-(DEFUN |IndexedString| (#0=#:G1545)
+(DEFUN |IndexedString| (#0=#:G1547)
(PROG ()
(RETURN
- (PROG (#1=#:G1546)
+ (PROG (#1=#:G1548)
(RETURN
(COND
((LETT #1#
diff --git a/src/algebra/strap/MONOID-.lsp b/src/algebra/strap/MONOID-.lsp
index b3cf1042..b4c3de53 100644
--- a/src/algebra/strap/MONOID-.lsp
+++ b/src/algebra/strap/MONOID-.lsp
@@ -20,14 +20,13 @@
(DEFUN |MONOID-;recip;SU;3| (|x| $)
(COND
- ((SPADCALL |x| (|spadConstant| $ 7) (|getShellEntry| $ 9))
- (CONS 0 |x|))
+ ((SPADCALL |x| (|getShellEntry| $ 12)) (CONS 0 |x|))
('T (CONS 1 "failed"))))
(DEFUN |MONOID-;**;SNniS;4| (|x| |n| $)
(COND
((ZEROP |n|) (|spadConstant| $ 7))
- ('T (SPADCALL |x| |n| (|getShellEntry| $ 16)))))
+ ('T (SPADCALL |x| |n| (|getShellEntry| $ 17)))))
(DEFUN |Monoid&| (|#1|)
(PROG (|dv$1| |dv$| $ |pv$|)
@@ -35,7 +34,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|Monoid&|))
(LETT |dv$| (LIST '|Monoid&| |dv$1|) . #0#)
- (LETT $ (|newShell| 19) . #0#)
+ (LETT $ (|newShell| 20) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
@@ -46,16 +45,16 @@
(MAKEPROP '|Monoid&| '|infovec|
(LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (0 . |One|)
(|Boolean|) (4 . =) |MONOID-;one?;SB;1|
- |MONOID-;sample;S;2| (|Union| $ '"failed")
+ |MONOID-;sample;S;2| (10 . |one?|) (|Union| $ '"failed")
|MONOID-;recip;SU;3| (|PositiveInteger|)
- (|RepeatedSquaring| 6) (10 . |expt|)
+ (|RepeatedSquaring| 6) (15 . |expt|)
(|NonNegativeInteger|) |MONOID-;**;SNniS;4|)
- '#(|sample| 16 |recip| 20 |one?| 25 ** 30) 'NIL
+ '#(|sample| 21 |recip| 25 |one?| 30 ** 35) 'NIL
(CONS (|makeByteWordVec2| 1 'NIL)
(CONS '#()
(CONS '#()
- (|makeByteWordVec2| 18
- '(0 6 0 7 2 6 8 0 0 9 2 15 6 6 14 16 0
- 0 0 11 1 0 12 0 13 1 0 8 0 10 2 0 0 0
- 17 18)))))
+ (|makeByteWordVec2| 19
+ '(0 6 0 7 2 6 8 0 0 9 1 6 8 0 12 2 16 6
+ 6 15 17 0 0 0 11 1 0 13 0 14 1 0 8 0
+ 10 2 0 0 0 18 19)))))
'|lookupComplete|))
diff --git a/src/algebra/strap/MONOID.lsp b/src/algebra/strap/MONOID.lsp
index 049c98b2..4aead1bb 100644
--- a/src/algebra/strap/MONOID.lsp
+++ b/src/algebra/strap/MONOID.lsp
@@ -4,7 +4,7 @@
(DEFPARAMETER |Monoid;AL| 'NIL)
(DEFUN |Monoid;| ()
- (PROG (#0=#:G1399)
+ (PROG (#0=#:G1400)
(RETURN
(PROG1 (LETT #0#
(|Join| (|SemiGroup|)
diff --git a/src/algebra/strap/POLYCAT-.lsp b/src/algebra/strap/POLYCAT-.lsp
index 9f42bd88..d196bca2 100644
--- a/src/algebra/strap/POLYCAT-.lsp
+++ b/src/algebra/strap/POLYCAT-.lsp
@@ -142,8 +142,8 @@
|POLYCAT-;convert;SIf;43|))
(DEFUN |POLYCAT-;eval;SLS;1| (|p| |l| $)
- (PROG (#0=#:G1689 #1=#:G1427 #2=#:G1690 #3=#:G1691 |lvar| #4=#:G1692
- |e| #5=#:G1693)
+ (PROG (#0=#:G1690 #1=#:G1428 #2=#:G1691 #3=#:G1692 |lvar| #4=#:G1693
+ |e| #5=#:G1694)
(RETURN
(SEQ (COND
((NULL |l|) |p|)
@@ -261,7 +261,7 @@
('T (CONS 0 |l|))))))
(DEFUN |POLYCAT-;isTimes;SU;4| (|p| $)
- (PROG (|lv| #0=#:G1694 |v| #1=#:G1695 |l| |r|)
+ (PROG (|lv| #0=#:G1695 |v| #1=#:G1696 |l| |r|)
(RETURN
(SEQ (COND
((OR (NULL (LETT |lv|
@@ -297,10 +297,12 @@
|POLYCAT-;isTimes;SU;4|)
(GO G190) G191 (EXIT (NREVERSE0 #0#))))
|POLYCAT-;isTimes;SU;4|)
- (LETT |r| (SPADCALL |p| (|getShellEntry| $ 39))
- |POLYCAT-;isTimes;SU;4|)
(EXIT (COND
- ((SPADCALL |r| (|spadConstant| $ 35)
+ ((SPADCALL
+ (LETT |r|
+ (SPADCALL |p|
+ (|getShellEntry| $ 39))
+ |POLYCAT-;isTimes;SU;4|)
(|getShellEntry| $ 40))
(COND
((NULL (CDR |lv|)) (CONS 1 "failed"))
@@ -362,7 +364,7 @@
(CDR |lv|) (CDR |ln|) (|getShellEntry| $ 56)))))
(DEFUN |POLYCAT-;retract;SVarSet;9| (|p| $)
- (PROG (#0=#:G1478 |q|)
+ (PROG (#0=#:G1479 |q|)
(RETURN
(SEQ (LETT |q|
(PROG2 (LETT #0# (SPADCALL |p| (|getShellEntry| $ 43))
@@ -378,7 +380,7 @@
('T (|error| "Polynomial is not a single variable"))))))))
(DEFUN |POLYCAT-;retractIfCan;SU;10| (|p| $)
- (PROG (|q| #0=#:G1486)
+ (PROG (|q| #0=#:G1487)
(RETURN
(SEQ (EXIT (SEQ (SEQ (LETT |q|
(SPADCALL |p| (|getShellEntry| $ 43))
@@ -402,7 +404,7 @@
(|getShellEntry| $ 62)))
(DEFUN |POLYCAT-;primitiveMonomials;SL;12| (|p| $)
- (PROG (#0=#:G1696 |q| #1=#:G1697)
+ (PROG (#0=#:G1697 |q| #1=#:G1698)
(RETURN
(SEQ (PROGN
(LETT #0# NIL |POLYCAT-;primitiveMonomials;SL;12|)
@@ -425,7 +427,7 @@
(GO G190) G191 (EXIT (NREVERSE0 #0#))))))))
(DEFUN |POLYCAT-;totalDegree;SNni;13| (|p| $)
- (PROG (#0=#:G1492 |d| |u|)
+ (PROG (#0=#:G1493 |d| |u|)
(RETURN
(SEQ (COND
((SPADCALL |p| (|getShellEntry| $ 64)) 0)
@@ -465,7 +467,7 @@
(EXIT |d|))))))))
(DEFUN |POLYCAT-;totalDegree;SLNni;14| (|p| |lv| $)
- (PROG (#0=#:G1500 |v| |w| |d| |u|)
+ (PROG (#0=#:G1501 |v| |w| |d| |u|)
(RETURN
(SEQ (COND
((SPADCALL |p| (|getShellEntry| $ 64)) 0)
@@ -522,7 +524,7 @@
(|getShellEntry| $ 77)))
(DEFUN |POLYCAT-;allMonoms| (|l| $)
- (PROG (#0=#:G1698 |p| #1=#:G1699)
+ (PROG (#0=#:G1699 |p| #1=#:G1700)
(RETURN
(SEQ (SPADCALL
(SPADCALL
@@ -549,7 +551,7 @@
(|getShellEntry| $ 82))))))
(DEFUN |POLYCAT-;P2R| (|p| |b| |n| $)
- (PROG (|w| |bj| #0=#:G1701 |i| #1=#:G1700)
+ (PROG (|w| |bj| #0=#:G1702 |i| #1=#:G1701)
(RETURN
(SEQ (LETT |w|
(SPADCALL |n| (|spadConstant| $ 23)
@@ -578,7 +580,7 @@
(EXIT |w|)))))
(DEFUN |POLYCAT-;eq2R| (|l| |b| $)
- (PROG (#0=#:G1702 |bj| #1=#:G1703 #2=#:G1704 |p| #3=#:G1705)
+ (PROG (#0=#:G1703 |bj| #1=#:G1704 #2=#:G1705 |p| #3=#:G1706)
(RETURN
(SEQ (SPADCALL
(PROGN
@@ -628,7 +630,7 @@
(|getShellEntry| $ 92))))))
(DEFUN |POLYCAT-;reducedSystem;MM;20| (|m| $)
- (PROG (#0=#:G1706 |r| #1=#:G1707 |b| #2=#:G1708 |bj| #3=#:G1709 |d|
+ (PROG (#0=#:G1707 |r| #1=#:G1708 |b| #2=#:G1709 |bj| #3=#:G1710 |d|
|mm| |l|)
(RETURN
(SEQ (LETT |l| (SPADCALL |m| (|getShellEntry| $ 95))
@@ -702,7 +704,7 @@
(EXIT |mm|)))))
(DEFUN |POLYCAT-;reducedSystem;MVR;21| (|m| |v| $)
- (PROG (#0=#:G1710 |s| #1=#:G1711 |b| #2=#:G1712 |bj| #3=#:G1713 |d|
+ (PROG (#0=#:G1711 |s| #1=#:G1712 |b| #2=#:G1713 |bj| #3=#:G1714 |d|
|n| |mm| |w| |l| |r|)
(RETURN
(SEQ (LETT |l| (SPADCALL |m| (|getShellEntry| $ 95))
@@ -806,8 +808,8 @@
(SPADCALL |pp| (|getShellEntry| $ 120)))
(DEFUN |POLYCAT-;factor;SF;26| (|p| $)
- (PROG (|v| |ansR| #0=#:G1714 |w| #1=#:G1715 |up| |ansSUP| #2=#:G1716
- |ww| #3=#:G1717)
+ (PROG (|v| |ansR| #0=#:G1715 |w| #1=#:G1716 |up| |ansSUP| #2=#:G1717
+ |ww| #3=#:G1718)
(RETURN
(SEQ (LETT |v| (SPADCALL |p| (|getShellEntry| $ 43))
|POLYCAT-;factor;SF;26|)
@@ -906,13 +908,13 @@
(|getShellEntry| $ 133)))))))))))
(DEFUN |POLYCAT-;conditionP;MU;27| (|mat| $)
- (PROG (|ll| #0=#:G1718 |z| #1=#:G1719 |ch| |l| #2=#:G1720 #3=#:G1721
- #4=#:G1583 #5=#:G1581 #6=#:G1582 #7=#:G1722 |vars| |degs|
- #8=#:G1723 |d| #9=#:G1724 |nd| #10=#:G1610 #11=#:G1590
- |deg1| |redmons| #12=#:G1725 |v| #13=#:G1727 |u|
- #14=#:G1726 |llR| |monslist| |ans| #15=#:G1728
- #16=#:G1729 |mons| #17=#:G1730 |m| #18=#:G1731 |i|
- #19=#:G1606 #20=#:G1604 #21=#:G1605)
+ (PROG (|ll| #0=#:G1719 |z| #1=#:G1720 |ch| |l| #2=#:G1721 #3=#:G1722
+ #4=#:G1584 #5=#:G1582 #6=#:G1583 #7=#:G1723 |vars| |degs|
+ #8=#:G1724 |d| #9=#:G1725 |nd| #10=#:G1611 #11=#:G1591
+ |deg1| |redmons| #12=#:G1726 |v| #13=#:G1728 |u|
+ #14=#:G1727 |llR| |monslist| |ans| #15=#:G1729
+ #16=#:G1730 |mons| #17=#:G1731 |m| #18=#:G1732 |i|
+ #19=#:G1607 #20=#:G1605 #21=#:G1606)
(RETURN
(SEQ (EXIT (SEQ (LETT |ll|
(SPADCALL
@@ -1278,7 +1280,7 @@
$))))))))))
(DEFUN |POLYCAT-;charthRootlv| (|p| |vars| |ch| $)
- (PROG (|v| |dd| |cp| |d| #0=#:G1631 |ans| |ansx| #1=#:G1638)
+ (PROG (|v| |dd| |cp| |d| #0=#:G1632 |ans| |ansx| #1=#:G1639)
(RETURN
(SEQ (EXIT (COND
((NULL |vars|)
@@ -1409,7 +1411,7 @@
(SPADCALL |p| (|getShellEntry| $ 166)))
(DEFUN |POLYCAT-;squareFreePart;2S;34| (|p| $)
- (PROG (|s| |f| #0=#:G1732 #1=#:G1652 #2=#:G1650 #3=#:G1651)
+ (PROG (|s| |f| #0=#:G1733 #1=#:G1653 #2=#:G1651 #3=#:G1652)
(RETURN
(SEQ (SPADCALL
(SPADCALL
@@ -1455,7 +1457,7 @@
(|getShellEntry| $ 173)))
(DEFUN |POLYCAT-;primitivePart;2S;36| (|p| $)
- (PROG (#0=#:G1656)
+ (PROG (#0=#:G1657)
(RETURN
(QVELT (SPADCALL
(PROG2 (LETT #0#
@@ -1471,7 +1473,7 @@
1))))
(DEFUN |POLYCAT-;primitivePart;SVarSetS;37| (|p| |v| $)
- (PROG (#0=#:G1662)
+ (PROG (#0=#:G1663)
(RETURN
(QVELT (SPADCALL
(PROG2 (LETT #0#
@@ -1724,106 +1726,106 @@
|POLYCAT-;isPlus;SU;3| (56 . |variables|)
(61 . |monomial?|) (66 . |One|) (70 . |One|)
(|NonNegativeInteger|) (74 . |degree|) (80 . |monomial|)
- (87 . |leadingCoefficient|) (92 . =) (98 . |coerce|)
- |POLYCAT-;isTimes;SU;4| (103 . |mainVariable|) (108 . =)
+ (87 . |leadingCoefficient|) (92 . |one?|) (97 . |coerce|)
+ |POLYCAT-;isTimes;SU;4| (102 . |mainVariable|) (107 . =)
(|Record| (|:| |var| 9) (|:| |exponent| 36))
(|Union| 45 '"failed") |POLYCAT-;isExpt;SU;5|
- (|SparseUnivariatePolynomial| $) (114 . |univariate|)
- (|SparseUnivariatePolynomial| 6) (120 . |coefficient|)
+ (|SparseUnivariatePolynomial| $) (113 . |univariate|)
+ (|SparseUnivariatePolynomial| 6) (119 . |coefficient|)
|POLYCAT-;coefficient;SVarSetNniS;6| (|List| 36)
- (126 . |coefficient|) |POLYCAT-;coefficient;SLLS;7|
- (133 . |monomial|) |POLYCAT-;monomial;SLLS;8|
- (140 . |coerce|) |POLYCAT-;retract;SVarSet;9|
- |POLYCAT-;retractIfCan;SU;10| (145 . |degree|)
- (150 . |monomial|) |POLYCAT-;primitiveMonomials;SL;12|
- (156 . |ground?|) (161 . |Zero|) (165 . ~=)
- (171 . |degree|) (176 . |leadingCoefficient|)
- (181 . |totalDegree|) (186 . |reductum|)
- |POLYCAT-;totalDegree;SNni;13| (191 . |member?|)
- (197 . |totalDegree|) |POLYCAT-;totalDegree;SLNni;14|
- (203 . |resultant|) (209 . |resultant|)
- (216 . |discriminant|) (221 . |discriminant|)
- (227 . |primitiveMonomials|) (|List| 6) (232 . |concat|)
- (237 . |removeDuplicates!|) (|Vector| 7) (242 . |new|)
- (|Integer|) (248 . |minIndex|) (253 . |coefficient|)
- (259 . |qsetelt!|) (|List| 7) (|List| 89) (|Matrix| 7)
- (266 . |matrix|) (|List| 80) (|Matrix| 6)
- (271 . |listOfLists|) (276 . |vertConcat|) (|Matrix| $)
- (282 . |reducedSystem|) (|Vector| 6) (287 . |entries|)
- (292 . |concat|) (298 . |concat|)
+ (125 . |coefficient|) |POLYCAT-;coefficient;SLLS;7|
+ (132 . |monomial|) |POLYCAT-;monomial;SLLS;8|
+ (139 . |coerce|) |POLYCAT-;retract;SVarSet;9|
+ |POLYCAT-;retractIfCan;SU;10| (144 . |degree|)
+ (149 . |monomial|) |POLYCAT-;primitiveMonomials;SL;12|
+ (155 . |ground?|) (160 . |Zero|) (164 . ~=)
+ (170 . |degree|) (175 . |leadingCoefficient|)
+ (180 . |totalDegree|) (185 . |reductum|)
+ |POLYCAT-;totalDegree;SNni;13| (190 . |member?|)
+ (196 . |totalDegree|) |POLYCAT-;totalDegree;SLNni;14|
+ (202 . |resultant|) (208 . |resultant|)
+ (215 . |discriminant|) (220 . |discriminant|)
+ (226 . |primitiveMonomials|) (|List| 6) (231 . |concat|)
+ (236 . |removeDuplicates!|) (|Vector| 7) (241 . |new|)
+ (|Integer|) (247 . |minIndex|) (252 . |coefficient|)
+ (258 . |qsetelt!|) (|List| 7) (|List| 89) (|Matrix| 7)
+ (265 . |matrix|) (|List| 80) (|Matrix| 6)
+ (270 . |listOfLists|) (275 . |vertConcat|) (|Matrix| $)
+ (281 . |reducedSystem|) (|Vector| 6) (286 . |entries|)
+ (291 . |concat|) (297 . |concat|)
(|Record| (|:| |mat| 91) (|:| |vec| 83)) (|Vector| $)
- (304 . |reducedSystem|)
+ (303 . |reducedSystem|)
(|GeneralPolynomialGcdPackage| 8 9 7 6)
- (310 . |gcdPolynomial|) (316 . |gcdPolynomial|)
+ (309 . |gcdPolynomial|) (315 . |gcdPolynomial|)
(|List| 50) (|Union| 109 '"failed")
(|PolynomialFactorizationByRecursion| 7 8 9 6)
- (322 . |solveLinearPolynomialEquationByRecursion|)
+ (321 . |solveLinearPolynomialEquationByRecursion|)
(|List| 48) (|Union| 113 '"failed")
- (328 . |solveLinearPolynomialEquation|) (|Factored| 50)
- (334 . |factorByRecursion|) (|Factored| 48)
- (339 . |factorPolynomial|)
- (344 . |factorSquareFreeByRecursion|)
- (349 . |factorSquareFreePolynomial|) (|Factored| $)
- (354 . |factor|) (|Factored| 7) (359 . |unit|)
+ (327 . |solveLinearPolynomialEquation|) (|Factored| 50)
+ (333 . |factorByRecursion|) (|Factored| 48)
+ (338 . |factorPolynomial|)
+ (343 . |factorSquareFreeByRecursion|)
+ (348 . |factorSquareFreePolynomial|) (|Factored| $)
+ (353 . |factor|) (|Factored| 7) (358 . |unit|)
(|Union| '"nil" '"sqfr" '"irred" '"prime")
(|Record| (|:| |flg| 126) (|:| |fctr| 7) (|:| |xpnt| 85))
- (|List| 127) (364 . |factorList|)
+ (|List| 127) (363 . |factorList|)
(|Record| (|:| |flg| 126) (|:| |fctr| 6) (|:| |xpnt| 85))
- (|List| 130) (|Factored| 6) (369 . |makeFR|)
- (375 . |unit|) (380 . |multivariate|)
+ (|List| 130) (|Factored| 6) (368 . |makeFR|)
+ (374 . |unit|) (379 . |multivariate|)
(|Record| (|:| |flg| 126) (|:| |fctr| 50) (|:| |xpnt| 85))
- (|List| 136) (386 . |factorList|) (391 . |factor|)
- (396 . |transpose|) (401 . |characteristic|)
- (405 . |setUnion|) (411 . |degree|) (|Union| $ '"failed")
- (417 . |exquo|) (423 . |ground|) (428 . |transpose|)
- (|Union| 104 '"failed") (433 . |conditionP|) (438 . |elt|)
- (444 . *) (450 . +) (456 . |conditionP|)
- (461 . |charthRoot|) (466 . |charthRoot|) (471 . |Zero|)
- (475 . |coefficient|) (482 . -)
+ (|List| 136) (385 . |factorList|) (390 . |factor|)
+ (395 . |transpose|) (400 . |characteristic|)
+ (404 . |setUnion|) (410 . |degree|) (|Union| $ '"failed")
+ (416 . |exquo|) (422 . |ground|) (427 . |transpose|)
+ (|Union| 104 '"failed") (432 . |conditionP|) (437 . |elt|)
+ (443 . *) (449 . +) (455 . |conditionP|)
+ (460 . |charthRoot|) (465 . |charthRoot|) (470 . |Zero|)
+ (474 . |coefficient|) (481 . -)
(|Record| (|:| |quotient| $) (|:| |remainder| $))
- (488 . |monicDivide|) |POLYCAT-;monicDivide;2SVarSetR;30|
- (|MultivariateSquareFree| 8 9 7 6) (494 . |squareFree|)
- (499 . |squareFree|) (|PolynomialSquareFree| 9 8 7 6)
- (504 . |squareFree|) (509 . |squareFree|) (514 . |unit|)
+ (487 . |monicDivide|) |POLYCAT-;monicDivide;2SVarSetR;30|
+ (|MultivariateSquareFree| 8 9 7 6) (493 . |squareFree|)
+ (498 . |squareFree|) (|PolynomialSquareFree| 9 8 7 6)
+ (503 . |squareFree|) (508 . |squareFree|) (513 . |unit|)
(|Record| (|:| |factor| 6) (|:| |exponent| 85))
- (|List| 169) (519 . |factors|) (524 . |squareFreePart|)
- (529 . |content|) (534 . |content|) (540 . |content|)
- (545 . |exquo|)
+ (|List| 169) (518 . |factors|) (523 . |squareFreePart|)
+ (528 . |content|) (533 . |content|) (539 . |content|)
+ (544 . |exquo|)
(|Record| (|:| |unit| $) (|:| |canonical| $)
(|:| |associate| $))
- (551 . |unitNormal|) (556 . |primitivePart|)
- (561 . |content|) (567 . |exquo|) (573 . |primitivePart|)
- (579 . <) (585 . <) (591 . <) (|PatternMatchResult| 85 6)
+ (550 . |unitNormal|) (555 . |primitivePart|)
+ (560 . |content|) (566 . |exquo|) (572 . |primitivePart|)
+ (578 . <) (584 . <) (590 . <) (|PatternMatchResult| 85 6)
(|Pattern| 85)
(|PatternMatchPolynomialCategory| 85 8 9 7 6)
- (597 . |patternMatch|) (|PatternMatchResult| 85 $)
- (604 . |patternMatch|) (|Float|)
+ (596 . |patternMatch|) (|PatternMatchResult| 85 $)
+ (603 . |patternMatch|) (|Float|)
(|PatternMatchResult| 192 6) (|Pattern| 192)
(|PatternMatchPolynomialCategory| 192 8 9 7 6)
- (611 . |patternMatch|) (|PatternMatchResult| 192 $)
- (618 . |patternMatch|) (625 . |convert|) (630 . |convert|)
+ (610 . |patternMatch|) (|PatternMatchResult| 192 $)
+ (617 . |patternMatch|) (624 . |convert|) (629 . |convert|)
(|Mapping| 187 9) (|Mapping| 187 7)
- (|PolynomialCategoryLifting| 8 9 7 6 187) (635 . |map|)
- (642 . |convert|) (647 . |convert|) (652 . |convert|)
+ (|PolynomialCategoryLifting| 8 9 7 6 187) (634 . |map|)
+ (641 . |convert|) (646 . |convert|) (651 . |convert|)
(|Mapping| 194 9) (|Mapping| 194 7)
- (|PolynomialCategoryLifting| 8 9 7 6 194) (657 . |map|)
- (664 . |convert|) (|InputForm|) (669 . |convert|)
- (674 . |convert|) (|Mapping| 213 9) (|Mapping| 213 7)
- (|PolynomialCategoryLifting| 8 9 7 6 213) (679 . |map|)
- (686 . |convert|) (|Matrix| 85) (|Vector| 85)
+ (|PolynomialCategoryLifting| 8 9 7 6 194) (656 . |map|)
+ (663 . |convert|) (|InputForm|) (668 . |convert|)
+ (673 . |convert|) (|Mapping| 213 9) (|Mapping| 213 7)
+ (|PolynomialCategoryLifting| 8 9 7 6 213) (678 . |map|)
+ (685 . |convert|) (|Matrix| 85) (|Vector| 85)
(|Record| (|:| |mat| 221) (|:| |vec| 222))
(|Union| 85 '"failed") (|Fraction| 85)
(|Union| 225 '"failed") (|Union| 7 '"failed"))
- '#(|totalDegree| 691 |squareFreePart| 702 |squareFree| 707
- |solveLinearPolynomialEquation| 712 |retractIfCan| 718
- |retract| 723 |resultant| 728 |reducedSystem| 735
- |primitivePart| 746 |primitiveMonomials| 757
- |patternMatch| 762 |monomials| 776 |monomial| 781
- |monicDivide| 788 |isTimes| 795 |isPlus| 800 |isExpt| 805
- |gcdPolynomial| 810 |factorSquareFreePolynomial| 816
- |factorPolynomial| 821 |factor| 826 |eval| 831
- |discriminant| 837 |convert| 843 |content| 858
- |conditionP| 864 |coefficient| 869 |charthRoot| 883 < 888)
+ '#(|totalDegree| 690 |squareFreePart| 701 |squareFree| 706
+ |solveLinearPolynomialEquation| 711 |retractIfCan| 717
+ |retract| 722 |resultant| 727 |reducedSystem| 734
+ |primitivePart| 745 |primitiveMonomials| 756
+ |patternMatch| 761 |monomials| 775 |monomial| 780
+ |monicDivide| 787 |isTimes| 794 |isPlus| 799 |isExpt| 804
+ |gcdPolynomial| 809 |factorSquareFreePolynomial| 815
+ |factorPolynomial| 820 |factor| 825 |eval| 830
+ |discriminant| 836 |convert| 842 |content| 857
+ |conditionP| 863 |coefficient| 868 |charthRoot| 882 < 887)
'NIL
(CONS (|makeByteWordVec2| 1 'NIL)
(CONS '#()
@@ -1834,24 +1836,24 @@
7 0 23 2 6 24 0 0 25 1 6 0 0 26 1 6 0
0 27 1 6 17 0 29 1 6 16 0 32 1 6 24 0
33 0 6 0 34 0 7 0 35 2 6 36 0 9 37 3
- 6 0 0 9 36 38 1 6 7 0 39 2 7 24 0 0
- 40 1 6 0 7 41 1 6 12 0 43 2 6 24 0 0
- 44 2 6 48 0 9 49 2 50 6 0 36 51 3 6 0
- 0 16 53 54 3 6 0 0 16 53 56 1 6 0 9
- 58 1 6 8 0 61 2 6 0 7 8 62 1 6 24 0
- 64 0 50 0 65 2 50 24 0 0 66 1 50 36 0
- 67 1 50 6 0 68 1 6 36 0 69 1 50 0 0
- 70 2 16 24 9 0 72 2 6 36 0 16 73 2 50
- 6 0 0 75 3 0 0 0 0 9 76 1 50 6 0 77 2
- 0 0 0 9 78 1 6 17 0 79 1 80 0 17 81 1
- 80 0 0 82 2 83 0 36 7 84 1 83 85 0 86
- 2 6 7 0 8 87 3 83 7 0 85 7 88 1 91 0
- 90 92 1 94 93 0 95 2 91 0 0 0 96 1 0
- 91 97 98 1 99 80 0 100 2 80 0 0 0 101
- 2 83 0 0 0 102 2 0 103 97 104 105 2
- 106 50 50 50 107 2 0 48 48 48 108 2
- 111 110 109 50 112 2 0 114 113 48 115
- 1 111 116 50 117 1 0 118 48 119 1 111
+ 6 0 0 9 36 38 1 6 7 0 39 1 7 24 0 40
+ 1 6 0 7 41 1 6 12 0 43 2 6 24 0 0 44
+ 2 6 48 0 9 49 2 50 6 0 36 51 3 6 0 0
+ 16 53 54 3 6 0 0 16 53 56 1 6 0 9 58
+ 1 6 8 0 61 2 6 0 7 8 62 1 6 24 0 64 0
+ 50 0 65 2 50 24 0 0 66 1 50 36 0 67 1
+ 50 6 0 68 1 6 36 0 69 1 50 0 0 70 2
+ 16 24 9 0 72 2 6 36 0 16 73 2 50 6 0
+ 0 75 3 0 0 0 0 9 76 1 50 6 0 77 2 0 0
+ 0 9 78 1 6 17 0 79 1 80 0 17 81 1 80
+ 0 0 82 2 83 0 36 7 84 1 83 85 0 86 2
+ 6 7 0 8 87 3 83 7 0 85 7 88 1 91 0 90
+ 92 1 94 93 0 95 2 91 0 0 0 96 1 0 91
+ 97 98 1 99 80 0 100 2 80 0 0 0 101 2
+ 83 0 0 0 102 2 0 103 97 104 105 2 106
+ 50 50 50 107 2 0 48 48 48 108 2 111
+ 110 109 50 112 2 0 114 113 48 115 1
+ 111 116 50 117 1 0 118 48 119 1 111
116 50 120 1 0 118 48 121 1 7 122 0
123 1 124 7 0 125 1 124 128 0 129 2
132 0 6 131 133 1 116 50 0 134 2 6 0
diff --git a/src/algebra/strap/POLYCAT.lsp b/src/algebra/strap/POLYCAT.lsp
index 6e47a7ab..db85c3c6 100644
--- a/src/algebra/strap/POLYCAT.lsp
+++ b/src/algebra/strap/POLYCAT.lsp
@@ -6,7 +6,7 @@
(DEFPARAMETER |PolynomialCategory;AL| 'NIL)
(DEFUN |PolynomialCategory;| (|t#1| |t#2| |t#3|)
- (PROG (#0=#:G1416)
+ (PROG (#0=#:G1417)
(RETURN
(PROG1 (LETT #0#
(|sublisV|
@@ -223,9 +223,9 @@
(LIST '|PolynomialCategory| (|devaluate| |t#1|)
(|devaluate| |t#2|) (|devaluate| |t#3|)))))))
-(DEFUN |PolynomialCategory| (&REST #0=#:G1419 &AUX #1=#:G1417)
+(DEFUN |PolynomialCategory| (&REST #0=#:G1420 &AUX #1=#:G1418)
(DSETQ #1# #0#)
- (LET (#2=#:G1418)
+ (LET (#2=#:G1419)
(COND
((SETQ #2#
(|assoc| (|devaluateList| #1#) |PolynomialCategory;AL|))
diff --git a/src/algebra/strap/PSETCAT-.lsp b/src/algebra/strap/PSETCAT-.lsp
index 596c5712..63efb140 100644
--- a/src/algebra/strap/PSETCAT-.lsp
+++ b/src/algebra/strap/PSETCAT-.lsp
@@ -86,7 +86,7 @@
|PSETCAT-;elements|))))
(DEFUN |PSETCAT-;variables1| (|lp| $)
- (PROG (#0=#:G1559 |p| #1=#:G1560 |lvars|)
+ (PROG (#0=#:G1560 |p| #1=#:G1561 |lvars|)
(RETURN
(SEQ (LETT |lvars|
(PROGN
@@ -119,7 +119,7 @@
(SPADCALL |#2| |#1| (|getShellEntry| $ 16)))
(DEFUN |PSETCAT-;variables2| (|lp| $)
- (PROG (#0=#:G1561 |p| #1=#:G1562 |lvars|)
+ (PROG (#0=#:G1562 |p| #1=#:G1563 |lvars|)
(RETURN
(SEQ (LETT |lvars|
(PROGN
@@ -284,7 +284,7 @@
(SPADCALL |ws| (|getShellEntry| $ 30))))))))
(DEFUN |PSETCAT-;=;2SB;11| (|ps1| |ps2| $)
- (PROG (#0=#:G1563 #1=#:G1564 #2=#:G1565 |p| #3=#:G1566)
+ (PROG (#0=#:G1564 #1=#:G1565 #2=#:G1566 |p| #3=#:G1567)
(RETURN
(SEQ (SPADCALL
(SPADCALL
@@ -463,7 +463,7 @@
('T 'NIL)))
(DEFUN |PSETCAT-;exactQuo| (|r| |s| $)
- (PROG (#0=#:G1508)
+ (PROG (#0=#:G1509)
(RETURN
(COND
((|HasCategory| (|getShellEntry| $ 7) '(|EuclideanDomain|))
@@ -582,14 +582,12 @@
(|getShellEntry| $ 73))
|PSETCAT-;makeIrreducible!|)
(EXIT (COND
- ((SPADCALL |g| (|spadConstant| $ 61)
- (|getShellEntry| $ 75))
- |frac|)
+ ((SPADCALL |g| (|getShellEntry| $ 74)) |frac|)
('T
(SEQ (PROGN
(RPLACA |frac|
(SPADCALL (QCAR |frac|) |g|
- (|getShellEntry| $ 76)))
+ (|getShellEntry| $ 75)))
(QCAR |frac|))
(PROGN
(RPLACD |frac|
@@ -603,7 +601,7 @@
(RETURN
(SEQ (LETT |hRa|
(|PSETCAT-;makeIrreducible!|
- (SPADCALL |a| |ps| (|getShellEntry| $ 77)) $)
+ (SPADCALL |a| |ps| (|getShellEntry| $ 76)) $)
|PSETCAT-;remainder;PSR;24|)
(LETT |a| (QCAR |hRa|) |PSETCAT-;remainder;PSR;24|)
(LETT |r| (QCDR |hRa|) |PSETCAT-;remainder;PSR;24|)
@@ -633,7 +631,7 @@
(SEQ (LETT |hRa|
(|PSETCAT-;makeIrreducible!|
(SPADCALL |a| |ps|
- (|getShellEntry| $ 77))
+ (|getShellEntry| $ 76))
$)
|PSETCAT-;remainder;PSR;24|)
(LETT |a| (QCAR |hRa|)
@@ -662,7 +660,7 @@
(SPADCALL |a|
(|getShellEntry| $ 40))
(|getShellEntry| $ 67))
- (|getShellEntry| $ 78))
+ (|getShellEntry| $ 77))
|PSETCAT-;remainder;PSR;24|)
(EXIT
(LETT |c| |g|
@@ -674,9 +672,9 @@
(PROG (|p| |rs|)
(RETURN
(SEQ (COND
- ((SPADCALL |cs| (|getShellEntry| $ 81)) |ps|)
- ((SPADCALL |cs| (|getShellEntry| $ 82))
- (LIST (|spadConstant| $ 83)))
+ ((SPADCALL |cs| (|getShellEntry| $ 80)) |ps|)
+ ((SPADCALL |cs| (|getShellEntry| $ 81))
+ (LIST (|spadConstant| $ 82)))
('T
(SEQ (LETT |ps|
(SPADCALL (ELT $ 42) |ps|
@@ -686,7 +684,7 @@
((NULL |ps|) |ps|)
((SPADCALL (ELT $ 24) |ps|
(|getShellEntry| $ 43))
- (LIST (|spadConstant| $ 74)))
+ (LIST (|spadConstant| $ 83)))
('T
(SEQ (LETT |rs| NIL
|PSETCAT-;rewriteIdealWithHeadRemainder;LSL;25|)
@@ -702,7 +700,7 @@
(LETT |p|
(QCAR
(SPADCALL |p| |cs|
- (|getShellEntry| $ 77)))
+ (|getShellEntry| $ 76)))
|PSETCAT-;rewriteIdealWithHeadRemainder;LSL;25|)
(EXIT
(COND
@@ -718,7 +716,7 @@
(EXIT
(LETT |rs|
(LIST
- (|spadConstant| $ 74))
+ (|spadConstant| $ 83))
|PSETCAT-;rewriteIdealWithHeadRemainder;LSL;25|))))
('T
(SEQ
@@ -736,9 +734,9 @@
(PROG (|p| |rs|)
(RETURN
(SEQ (COND
- ((SPADCALL |cs| (|getShellEntry| $ 81)) |ps|)
- ((SPADCALL |cs| (|getShellEntry| $ 82))
- (LIST (|spadConstant| $ 83)))
+ ((SPADCALL |cs| (|getShellEntry| $ 80)) |ps|)
+ ((SPADCALL |cs| (|getShellEntry| $ 81))
+ (LIST (|spadConstant| $ 82)))
('T
(SEQ (LETT |ps|
(SPADCALL (ELT $ 42) |ps|
@@ -748,7 +746,7 @@
((NULL |ps|) |ps|)
((SPADCALL (ELT $ 24) |ps|
(|getShellEntry| $ 43))
- (LIST (|spadConstant| $ 74)))
+ (LIST (|spadConstant| $ 83)))
('T
(SEQ (LETT |rs| NIL
|PSETCAT-;rewriteIdealWithRemainder;LSL;26|)
@@ -781,7 +779,7 @@
(EXIT
(LETT |rs|
(LIST
- (|spadConstant| $ 74))
+ (|spadConstant| $ 83))
|PSETCAT-;rewriteIdealWithRemainder;LSL;26|))))
('T
(LETT |rs|
@@ -846,7 +844,7 @@
(CONS (|dispatchFunction|
|PSETCAT-;headRemainder;PSR;22|)
$))
- (|setShellEntry| $ 80
+ (|setShellEntry| $ 79
(CONS (|dispatchFunction|
|PSETCAT-;remainder;PSR;24|)
$))
@@ -888,24 +886,23 @@
(183 . |leadingCoefficient|) (188 . |gcd|) (194 . *)
(200 . |monomial|) (206 . *) (212 . -) (218 . *)
(|Record| (|:| |num| 10) (|:| |den| 7))
- (224 . |headRemainder|) (230 . |gcd|) (236 . |One|)
- (240 . =) (246 . |exactQuotient!|) (252 . |headRemainder|)
- (258 . +)
+ (224 . |headRemainder|) (230 . |gcd|) (236 . |one?|)
+ (241 . |exactQuotient!|) (247 . |headRemainder|) (253 . +)
(|Record| (|:| |rnum| 7) (|:| |polnum| 10) (|:| |den| 7))
- (264 . |remainder|) (270 . |trivialIdeal?|)
- (275 . |roughUnitIdeal?|) (280 . |Zero|)
- (284 . |primitivePart!|) (289 . |removeDuplicates|)
- (294 . |rewriteIdealWithHeadRemainder|)
- (300 . |remainder|) (306 . |unitCanonical|)
- (311 . |rewriteIdealWithRemainder|))
- '#(|variables| 317 |trivialIdeal?| 322 |triangular?| 327
- |sort| 332 |roughUnitIdeal?| 338 |roughSubIdeal?| 343
- |roughEqualIdeals?| 349 |roughBase?| 355
- |rewriteIdealWithRemainder| 360
- |rewriteIdealWithHeadRemainder| 366 |remainder| 372
- |mainVariables| 378 |mainVariable?| 383 |headRemainder|
- 389 |collectUpper| 395 |collectUnder| 401 |collect| 407 =
- 413)
+ (259 . |remainder|) (265 . |trivialIdeal?|)
+ (270 . |roughUnitIdeal?|) (275 . |Zero|) (279 . |One|)
+ (283 . |primitivePart!|) (288 . |removeDuplicates|)
+ (293 . |rewriteIdealWithHeadRemainder|)
+ (299 . |remainder|) (305 . |unitCanonical|)
+ (310 . |rewriteIdealWithRemainder|))
+ '#(|variables| 316 |trivialIdeal?| 321 |triangular?| 326
+ |sort| 331 |roughUnitIdeal?| 337 |roughSubIdeal?| 342
+ |roughEqualIdeals?| 348 |roughBase?| 354
+ |rewriteIdealWithRemainder| 359
+ |rewriteIdealWithHeadRemainder| 365 |remainder| 371
+ |mainVariables| 377 |mainVariable?| 382 |headRemainder|
+ 388 |collectUpper| 394 |collectUnder| 400 |collect| 406 =
+ 412)
'NIL
(CONS (|makeByteWordVec2| 1 'NIL)
(CONS '#()
@@ -926,16 +923,16 @@
64 2 7 0 0 0 65 2 10 0 7 0 66 2 10 0
7 8 67 2 10 0 0 0 68 2 10 0 0 0 69 2
7 0 0 0 70 2 0 71 10 0 72 2 10 7 7 0
- 73 0 10 0 74 2 7 15 0 0 75 2 10 0 0 7
- 76 2 6 71 10 0 77 2 10 0 0 0 78 2 0
- 79 10 0 80 1 6 15 0 81 1 6 15 0 82 0
+ 73 1 7 15 0 74 2 10 0 0 7 75 2 6 71
+ 10 0 76 2 10 0 0 0 77 2 0 78 10 0 79
+ 1 6 15 0 80 1 6 15 0 81 0 10 0 82 0
10 0 83 1 10 0 0 84 1 11 0 0 85 2 0
- 11 11 0 86 2 6 79 10 0 87 1 10 0 0 88
+ 11 11 0 86 2 6 78 10 0 87 1 10 0 0 88
2 0 11 11 0 89 1 0 13 0 23 1 0 15 0
47 1 0 15 0 46 2 0 34 0 9 35 1 0 15 0
48 2 0 15 0 0 54 2 0 15 0 0 57 1 0 15
0 52 2 0 11 11 0 89 2 0 11 11 0 86 2
- 0 79 10 0 80 1 0 13 0 27 2 0 15 9 0
+ 0 78 10 0 79 1 0 13 0 27 2 0 15 9 0
29 2 0 71 10 0 72 2 0 0 0 9 32 2 0 0
0 9 31 2 0 0 0 9 33 2 0 15 0 0 39)))))
'|lookupComplete|))
diff --git a/src/algebra/strap/PSETCAT.lsp b/src/algebra/strap/PSETCAT.lsp
index 84ee249a..dd7de5be 100644
--- a/src/algebra/strap/PSETCAT.lsp
+++ b/src/algebra/strap/PSETCAT.lsp
@@ -6,7 +6,7 @@
(DEFPARAMETER |PolynomialSetCategory;AL| 'NIL)
(DEFUN |PolynomialSetCategory;| (|t#1| |t#2| |t#3| |t#4|)
- (PROG (#0=#:G1432)
+ (PROG (#0=#:G1433)
(RETURN
(PROG1 (LETT #0#
(|sublisV|
@@ -16,7 +16,7 @@
(|devaluate| |t#3|)
(|devaluate| |t#4|)))
(|sublisV|
- (PAIR '(#1=#:G1431) (LIST '(|List| |t#4|)))
+ (PAIR '(#1=#:G1432) (LIST '(|List| |t#4|)))
(COND
(|PolynomialSetCategory;CAT|)
('T
@@ -107,9 +107,9 @@
(|devaluate| |t#2|) (|devaluate| |t#3|)
(|devaluate| |t#4|)))))))
-(DEFUN |PolynomialSetCategory| (&REST #0=#:G1435 &AUX #1=#:G1433)
+(DEFUN |PolynomialSetCategory| (&REST #0=#:G1436 &AUX #1=#:G1434)
(DSETQ #1# #0#)
- (LET (#2=#:G1434)
+ (LET (#2=#:G1435)
(COND
((SETQ #2#
(|assoc| (|devaluateList| #1#) |PolynomialSetCategory;AL|))
diff --git a/src/algebra/strap/REF.lsp b/src/algebra/strap/REF.lsp
index 2cdb9536..46acc333 100644
--- a/src/algebra/strap/REF.lsp
+++ b/src/algebra/strap/REF.lsp
@@ -43,7 +43,7 @@
(PROGN (RPLACA |p| |v|) (QCAR |p|)))
(DEFUN |REF;coerce;$Of;7| (|p| $)
- (SPADCALL (SPADCALL "ref" (|getShellEntry| $ 17))
+ (SPADCALL (SPADCALL '|ref| (|getShellEntry| $ 17))
(LIST (SPADCALL (QCAR |p|) (|getShellEntry| $ 18)))
(|getShellEntry| $ 20)))
@@ -71,7 +71,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|Reference|))
(LETT |dv$| (LIST '|Reference| |dv$1|) . #0#)
- (LETT $ (|newShell| 23) . #0#)
+ (LETT $ (|newShell| 24) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$|
@@ -92,20 +92,20 @@
(LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) '|Rep| (|Boolean|)
|REF;=;2$B;1| |REF;ref;S$;2| |REF;elt;$S;3|
|REF;setelt;$2S;4| |REF;deref;$S;5| |REF;setref;$2S;6|
- (|String|) (|OutputForm|) (0 . |message|) (5 . |coerce|)
+ (|OutputForm|) (|Symbol|) (0 . |coerce|) (5 . |coerce|)
(|List| $) (10 . |prefix|) (16 . |coerce|)
- (|SingleInteger|))
+ (|SingleInteger|) (|String|))
'#(~= 21 |setref| 27 |setelt| 33 |ref| 39 |latex| 44 |hash|
49 |elt| 54 |deref| 59 |coerce| 64 = 69)
'NIL
(CONS (|makeByteWordVec2| 1 '(1 0 1 1))
(CONS '#(|SetCategory&| NIL |BasicType&| NIL)
(CONS '#((|SetCategory|) (|Type|) (|BasicType|)
- (|CoercibleTo| 16))
- (|makeByteWordVec2| 22
- '(1 16 0 15 17 1 6 16 0 18 2 16 0 0 19
- 20 1 0 16 0 21 2 1 8 0 0 1 2 0 6 0 6
- 14 2 0 6 0 6 12 1 0 0 6 10 1 1 15 0 1
+ (|CoercibleTo| 15))
+ (|makeByteWordVec2| 23
+ '(1 16 15 0 17 1 6 15 0 18 2 15 0 0 19
+ 20 1 0 15 0 21 2 1 8 0 0 1 2 0 6 0 6
+ 14 2 0 6 0 6 12 1 0 0 6 10 1 1 23 0 1
1 1 22 0 1 1 0 6 0 11 1 0 6 0 13 1 1
- 16 0 21 2 0 8 0 0 9)))))
+ 15 0 21 2 0 8 0 0 9)))))
'|lookupComplete|))
diff --git a/src/algebra/string.spad.pamphlet b/src/algebra/string.spad.pamphlet
index 7a370732..48a09e30 100644
--- a/src/algebra/string.spad.pamphlet
+++ b/src/algebra/string.spad.pamphlet
@@ -103,8 +103,7 @@ Character: OrderedFinite() with
concat("\mbox{`", concat(new(1,c)$String, "'}")$String)$String
char(s:String) ==
--- one?(#s) => s(minIndex s)
- (#s) = 1 => s(minIndex s)
+ one?(#s) => s(minIndex s)
userError "String is not a single character"
upperCase c ==
@@ -410,8 +409,7 @@ IndexedString(mn:Integer): Export == Implementation where
hash(s:$):Integer ==
n:I := Qsize s
zero? n => 0
--- one? n => ord(s.mn)
- (n = 1) => ord(s.mn)
+ one? n => ord(s.mn)
ord(s.mn) * ord s(mn+n-1) * ord s(mn + n quo 2)
match(pattern,target,wildcard) == stringMatch(pattern,target,CHARACTER(wildcard)$Lisp)$Lisp
diff --git a/src/algebra/sttaylor.spad.pamphlet b/src/algebra/sttaylor.spad.pamphlet
index 6d2a2afd..42def454 100644
--- a/src/algebra/sttaylor.spad.pamphlet
+++ b/src/algebra/sttaylor.spad.pamphlet
@@ -313,8 +313,7 @@ StreamTaylorSeriesOperations(A): Exports == Implementation where
empty? x => error "revert should start 0,1,..."
zero? frst x =>
empty? rst x => error "revert: should start 0,1,..."
--- one? frst rst x => lagrange(recip(rst x) :: (ST A))
- (frst rst x) = 1 => lagrange(recip(rst x) :: (ST A))
+ one? frst rst x => lagrange(recip(rst x) :: (ST A))
error "revert:should start 0,1,..."
--% lambert functions
diff --git a/src/algebra/sups.spad.pamphlet b/src/algebra/sups.spad.pamphlet
index 6ab0b1f3..100d251e 100644
--- a/src/algebra/sups.spad.pamphlet
+++ b/src/algebra/sups.spad.pamphlet
@@ -692,8 +692,7 @@ InnerSparseUnivariatePowerSeries(Coef): Exports == Implementation where
iSincos(f,sinc,cosc,sign) ==
fp := differentiate f
fpRef := getRef fp; fpStr := getStream fp
--- fp2 := (one? sign => fp; -fp)
- fp2 := ((sign = 1) => fp; -fp)
+ fp2 := (one? sign => fp; -fp)
fpRef2 := getRef fp2; fpStr2 := getStream fp2
sinRef := ref(0 :: COM); cosRef := ref(0 :: COM)
sincos :=
@@ -709,8 +708,7 @@ InnerSparseUnivariatePowerSeries(Coef): Exports == Implementation where
one : % := 1; oneStr := getStream one; oneRef := getRef one
yRef := ref((-1) :: COM)
yStr : ST :=
--- one? sign => iPlus1(#1 + #2,oneStr,oneRef,sqStr,sqRef,yRef,0)
- (sign = 1) => iPlus1(#1 + #2,oneStr,oneRef,sqStr,sqRef,yRef,0)
+ one? sign => iPlus1(#1 + #2,oneStr,oneRef,sqStr,sqRef,yRef,0)
iPlus1(#1 - #2,oneStr,oneRef,sqStr,sqRef,yRef,0)
intRef := ref((-1) :: COM)
lazyInteg(cc,iTimes(yStr,yRef,fpStr,fpRef,intRef,0),intRef,ansRef)
@@ -760,10 +758,8 @@ InnerSparseUnivariatePowerSeries(Coef): Exports == Implementation where
cc := coefficient(uts,order)
(ccInv := recip cc) case "failed" => error concat("**: ",NOTINV)
ccPow :=
--- one? cc => cc
- (cc = 1) => cc
--- one? denom r =>
- (denom r) = 1 =>
+ one? cc => cc
+ one? denom r =>
not negative?(num := numer r) => cc ** (num :: NNI)
(ccInv :: Coef) ** ((-num) :: NNI)
RATPOWERS => cc ** r
@@ -780,8 +776,7 @@ InnerSparseUnivariatePowerSeries(Coef): Exports == Implementation where
cLog uts ==
zero?(cc := coefficient(uts,0)) =>
error "log: constant coefficient should not be 0"
--- one? cc => integrate(differentiate(uts) * (iExquo(1,uts,true) :: %))
- (cc = 1) => integrate(differentiate(uts) * (iExquo(1,uts,true) :: %))
+ one? cc => integrate(differentiate(uts) * (iExquo(1,uts,true) :: %))
TRANSFCN =>
y := iExquo(1,uts,true) :: %
(log(cc) :: %) + integrate(y * differentiate(uts))
diff --git a/src/algebra/suts.spad.pamphlet b/src/algebra/suts.spad.pamphlet
index 131d99b4..b0b70950 100644
--- a/src/algebra/suts.spad.pamphlet
+++ b/src/algebra/suts.spad.pamphlet
@@ -255,8 +255,7 @@ SparseUnivariateTaylorSeries(Coef,var,cen): Exports == Implementation where
NPOWERS : SG := "series expansion has terms of negative degree"
(uts:%) ** (r:RN) ==
--- not one? coefficient(uts,0) =>
- not (coefficient(uts,0) = 1) =>
+ not one? coefficient(uts,0) =>
error "**: constant coefficient must be one"
onePlusX : % := monomial(1,0) + monomial(1,1)
ratPow := cPower(uts,r :: Coef)
@@ -269,8 +268,7 @@ SparseUnivariateTaylorSeries(Coef,var,cen): Exports == Implementation where
error concat("exp: ",ZERO)
log uts ==
--- one? coefficient(uts,0) =>
- (coefficient(uts,0) = 1) =>
+ one? coefficient(uts,0) =>
log1PlusX := cLog(monomial(1,0) + monomial(1,1))
iCompose(log1PlusX,uts - 1)
error concat("log: ",ONE)
@@ -381,8 +379,7 @@ SparseUnivariateTaylorSeries(Coef,var,cen): Exports == Implementation where
if Coef has Algebra Fraction Integer then
(uts:%) ** (r:Coef) ==
--- not one? coefficient(uts,1) =>
- not (coefficient(uts,1) = 1) =>
+ not one? coefficient(uts,1) =>
error "**: constant coefficient should be 1"
cPower(uts,r)
diff --git a/src/algebra/tools.spad.pamphlet b/src/algebra/tools.spad.pamphlet
index fb0ed1fe..dc8135e9 100644
--- a/src/algebra/tools.spad.pamphlet
+++ b/src/algebra/tools.spad.pamphlet
@@ -263,8 +263,7 @@ ExpertSystemToolsPackage():E == I where
isQuotient(expr:EDF):Union(EDF,"failed") ==
(k := mainKernel expr) case KEDF =>
(expr = inv(f := k :: KEDF :: EDF)$EDF)$EDF => f
--- one?(numerator expr) => denominator expr
- (numerator expr) = 1 => denominator expr
+ one?(numerator expr) => denominator expr
"failed"
"failed"
diff --git a/src/algebra/triset.spad.pamphlet b/src/algebra/triset.spad.pamphlet
index 71281026..cdc53b28 100644
--- a/src/algebra/triset.spad.pamphlet
+++ b/src/algebra/triset.spad.pamphlet
@@ -893,8 +893,7 @@ PolynomialSetUtilitiesPackage (R,E,V,P) : Exports == Implementation where
linear? p ==
ground? p => false
--- one?(mdeg(p))
- (mdeg(p) = 1)
+ one?(mdeg(p))
linearPolynomials ps ==
selectPolynomials(linear?,ps)
@@ -1032,8 +1031,7 @@ PolynomialSetUtilitiesPackage (R,E,V,P) : Exports == Implementation where
bs := (rec::RBT).bas
rs := (rec::RBT).top
rs := rewriteIdealWithRemainder(rs,bs)$T
--- contradiction := ((not empty? rs) and (one? first(rs)))
- contradiction := ((not empty? rs) and (first(rs) = 1))
+ contradiction := ((not empty? rs) and (one? first(rs)))
if not contradiction
then
rs := concat(rs,autoRemainder(bs))
@@ -1531,19 +1529,16 @@ WuWenTsunTriangularSet(R,E,V,P) : Exports == Implementation where
bs := (rec::RBT).bas
rs := (rec::RBT).top
rs := rewriteIdealWithRemainder(rs,bs)
--- contradiction := ((not empty? rs) and (one? first(rs)))
- contradiction := ((not empty? rs) and (first(rs) = 1))
+ contradiction := ((not empty? rs) and (one? first(rs)))
if (not empty? rs) and (not contradiction)
then
rs := rewriteSetWithReduction(rs,bs,redOp,redOp?)
--- contradiction := ((not empty? rs) and (one? first(rs)))
- contradiction := ((not empty? rs) and (first(rs) = 1))
+ contradiction := ((not empty? rs) and (one? first(rs)))
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 (one? first(rs)))
- contradiction := ((not empty? rs) and (first(rs) = 1))
+ contradiction := ((not empty? rs) and (one? first(rs)))
contradiction => "failed"::Union(RBT,"failed")
([bs,qs]$RBT)::Union(RBT,"failed")
@@ -1570,13 +1565,11 @@ WuWenTsunTriangularSet(R,E,V,P) : Exports == Implementation where
ms := (rec::RBT).bas
qs := (rec::RBT).top
qs := rewriteIdealWithRemainder(qs,ms)
--- contradiction := ((not empty? qs) and (one? first(qs)))
- contradiction := ((not empty? qs) and (first(qs) = 1))
+ contradiction := ((not empty? qs) and (one? first(qs)))
if not contradiction
then
rs := rewriteSetWithReduction(qs,ms,lazyPrem,reduced?)
--- contradiction := ((not empty? rs) and (one? first(rs)))
- contradiction := ((not empty? rs) and (first(rs) = 1))
+ contradiction := ((not empty? rs) and (one? first(rs)))
if (not contradiction) and (not empty? rs)
then
qs := removeDuplicates(concat(rs,concat(members(ms),qs)))
diff --git a/src/algebra/unifact.spad.pamphlet b/src/algebra/unifact.spad.pamphlet
index 1e9f19d8..a6ed0198 100644
--- a/src/algebra/unifact.spad.pamphlet
+++ b/src/algebra/unifact.spad.pamphlet
@@ -190,8 +190,7 @@ UnivariateFactorize(ZP) : public == private where
-- and mindeg m = 0
henselfact1(m: ZP):List(ZP) ==
zero? degree m =>
--- one? m => []
- (m = 1) => []
+ one? m => []
[m]
selected := choose(m)
(numFactors(selected.factors) = 1$Z) => [m]
diff --git a/src/algebra/updivp.spad.pamphlet b/src/algebra/updivp.spad.pamphlet
index 67934a57..01ffe8ca 100644
--- a/src/algebra/updivp.spad.pamphlet
+++ b/src/algebra/updivp.spad.pamphlet
@@ -41,8 +41,7 @@ UnivariatePolynomialDivisionPackage(R,UP): Exports == Implementation where
divideIfCan(p1:UP,p2:UP):Union(QR,"failed") ==
zero? p2 => error "divideIfCan: division by zero"
--- one? (lc := leadingCoefficient p2) => monicDivide(p1,p2)
- ((lc := leadingCoefficient p2) = 1) => monicDivide(p1,p2)
+ one? (lc := leadingCoefficient p2) => monicDivide(p1,p2)
q: UP := 0
while not ((e := subtractIfCan(degree(p1),degree(p2))) case "failed")
repeat
diff --git a/src/algebra/zerodim.spad.pamphlet b/src/algebra/zerodim.spad.pamphlet
index 00520a95..ca1f4409 100644
--- a/src/algebra/zerodim.spad.pamphlet
+++ b/src/algebra/zerodim.spad.pamphlet
@@ -463,8 +463,7 @@ InternalRationalUnivariateRepresentationPackage(R,E,V,P,TS): Exports == Implemen
empty? lp =>
error "rur$IRURPK: #1 is empty"
f0 := first lp; lp := rest lp
--- not (one?(init(f0)) and one?(mdeg(f0)) and zero?(tail(f0))) =>
- not ((init(f0) = 1) and (mdeg(f0) = 1) and zero?(tail(f0))) =>
+ not (one?(init(f0)) and one?(mdeg(f0)) and zero?(tail(f0))) =>
error "rur$IRURPK: #1 has no generating root."
empty? lp =>
error "rur$IRURPK: #1 has a generating root but no indeterminates"
@@ -527,8 +526,7 @@ InternalRationalUnivariateRepresentationPackage(R,E,V,P,TS): Exports == Implemen
check? and (zero? degree(s,xi)) and (empty? prs) =>
error "rur$IRURPK: should never happen !!"
if zero? degree(s,xi) then s := first prs
--- not one? degree(s,xi) =>
- not (degree(s,xi) = 1) =>
+ not one? degree(s,xi) =>
toSee := cons([f0,next(lambda),ts]$WIP,toSee)
h := init(s)
r := squareFreePart(r)
@@ -560,8 +558,7 @@ InternalRationalUnivariateRepresentationPackage(R,E,V,P,TS): Exports == Implemen
p := primitivePart stronglyReduce(p,ts)
ground?(p) or (mvar(p) < xi) =>
error "rur$IRUROK: should never happen"
--- (one? mdeg(p)) and (ground? init(p)) =>
- (mdeg(p) = 1) and (ground? init(p)) =>
+ (one? mdeg(p)) and (ground? init(p)) =>
ts := internalAugment(p,ts)
wip := [lp,ts]
toSee := cons(wip,toSee)