aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/acplot.spad.pamphlet2
-rw-r--r--src/algebra/aggcat.spad.pamphlet22
-rw-r--r--src/algebra/algcat.spad.pamphlet2
-rw-r--r--src/algebra/algext.spad.pamphlet4
-rw-r--r--src/algebra/algfunc.spad.pamphlet6
-rw-r--r--src/algebra/allfact.spad.pamphlet2
-rw-r--r--src/algebra/array1.spad.pamphlet4
-rw-r--r--src/algebra/array2.spad.pamphlet4
-rw-r--r--src/algebra/asp.spad.pamphlet4
-rw-r--r--src/algebra/card.spad.pamphlet4
-rw-r--r--src/algebra/carten.spad.pamphlet46
-rw-r--r--src/algebra/clifford.spad.pamphlet12
-rw-r--r--src/algebra/combinat.spad.pamphlet2
-rw-r--r--src/algebra/contfrac.spad.pamphlet8
-rw-r--r--src/algebra/cra.spad.pamphlet2
-rw-r--r--src/algebra/crfp.spad.pamphlet4
-rw-r--r--src/algebra/curve.spad.pamphlet20
-rw-r--r--src/algebra/ddfact.spad.pamphlet8
-rw-r--r--src/algebra/defintef.spad.pamphlet2
-rw-r--r--src/algebra/defintrf.spad.pamphlet12
-rw-r--r--src/algebra/degred.spad.pamphlet2
-rw-r--r--src/algebra/derham.spad.pamphlet10
-rw-r--r--src/algebra/divisor.spad.pamphlet22
-rw-r--r--src/algebra/efstruc.spad.pamphlet24
-rw-r--r--src/algebra/eigen.spad.pamphlet6
-rw-r--r--src/algebra/elemntry.spad.pamphlet4
-rw-r--r--src/algebra/expr.spad.pamphlet4
-rw-r--r--src/algebra/ffcat.spad.pamphlet6
-rw-r--r--src/algebra/ffcg.spad.pamphlet2
-rw-r--r--src/algebra/fff.spad.pamphlet12
-rw-r--r--src/algebra/ffhom.spad.pamphlet6
-rw-r--r--src/algebra/ffnb.spad.pamphlet6
-rw-r--r--src/algebra/ffp.spad.pamphlet2
-rw-r--r--src/algebra/ffpoly.spad.pamphlet34
-rw-r--r--src/algebra/ffpoly2.spad.pamphlet2
-rw-r--r--src/algebra/files.spad.pamphlet34
-rw-r--r--src/algebra/float.spad.pamphlet26
-rw-r--r--src/algebra/formula.spad.pamphlet16
-rw-r--r--src/algebra/fortran.spad.pamphlet14
-rw-r--r--src/algebra/fr.spad.pamphlet2
-rw-r--r--src/algebra/free.spad.pamphlet10
-rw-r--r--src/algebra/fspace.spad.pamphlet14
-rw-r--r--src/algebra/funcpkgs.spad.pamphlet4
-rw-r--r--src/algebra/gaussfac.spad.pamphlet12
-rw-r--r--src/algebra/gaussian.spad.pamphlet8
-rw-r--r--src/algebra/gb.spad.pamphlet6
-rw-r--r--src/algebra/gbeuclid.spad.pamphlet6
-rw-r--r--src/algebra/gbintern.spad.pamphlet8
-rw-r--r--src/algebra/gdirprod.spad.pamphlet2
-rw-r--r--src/algebra/gdpoly.spad.pamphlet8
-rw-r--r--src/algebra/geneez.spad.pamphlet12
-rw-r--r--src/algebra/ghensel.spad.pamphlet10
-rw-r--r--src/algebra/gpgcd.spad.pamphlet24
-rw-r--r--src/algebra/gpol.spad.pamphlet4
-rw-r--r--src/algebra/groebf.spad.pamphlet10
-rw-r--r--src/algebra/groebsol.spad.pamphlet6
-rw-r--r--src/algebra/ideal.spad.pamphlet12
-rw-r--r--src/algebra/idecomp.spad.pamphlet22
-rw-r--r--src/algebra/indexedp.spad.pamphlet10
-rw-r--r--src/algebra/intaf.spad.pamphlet6
-rw-r--r--src/algebra/intalg.spad.pamphlet4
-rw-r--r--src/algebra/intaux.spad.pamphlet8
-rw-r--r--src/algebra/intclos.spad.pamphlet8
-rw-r--r--src/algebra/intef.spad.pamphlet10
-rw-r--r--src/algebra/integer.spad.pamphlet2
-rw-r--r--src/algebra/intfact.spad.pamphlet2
-rw-r--r--src/algebra/intpm.spad.pamphlet10
-rw-r--r--src/algebra/intrf.spad.pamphlet34
-rw-r--r--src/algebra/irexpand.spad.pamphlet2
-rw-r--r--src/algebra/kl.spad.pamphlet10
-rw-r--r--src/algebra/laplace.spad.pamphlet4
-rw-r--r--src/algebra/laurent.spad.pamphlet4
-rw-r--r--src/algebra/leadcdet.spad.pamphlet8
-rw-r--r--src/algebra/limitps.spad.pamphlet16
-rw-r--r--src/algebra/lingrob.spad.pamphlet10
-rw-r--r--src/algebra/list.spad.pamphlet4
-rw-r--r--src/algebra/listgcd.spad.pamphlet4
-rw-r--r--src/algebra/lmdict.spad.pamphlet2
-rw-r--r--src/algebra/lodo.spad.pamphlet6
-rw-r--r--src/algebra/lodof.spad.pamphlet10
-rw-r--r--src/algebra/lodop.spad.pamphlet8
-rw-r--r--src/algebra/manip.spad.pamphlet10
-rw-r--r--src/algebra/matcat.spad.pamphlet42
-rw-r--r--src/algebra/matfuns.spad.pamphlet48
-rw-r--r--src/algebra/mathml.spad.pamphlet26
-rw-r--r--src/algebra/matrix.spad.pamphlet16
-rw-r--r--src/algebra/mfinfact.spad.pamphlet22
-rw-r--r--src/algebra/mlift.spad.jhd.pamphlet8
-rw-r--r--src/algebra/mlift.spad.pamphlet6
-rw-r--r--src/algebra/moddfact.spad.pamphlet8
-rw-r--r--src/algebra/modgcd.spad.pamphlet2
-rw-r--r--src/algebra/modmon.spad.pamphlet4
-rw-r--r--src/algebra/modmonom.spad.pamphlet2
-rw-r--r--src/algebra/modring.spad.pamphlet2
-rw-r--r--src/algebra/mring.spad.pamphlet18
-rw-r--r--src/algebra/mset.spad.pamphlet6
-rw-r--r--src/algebra/mts.spad.pamphlet6
-rw-r--r--src/algebra/multfact.spad.pamphlet16
-rw-r--r--src/algebra/multpoly.spad.pamphlet8
-rw-r--r--src/algebra/multsqfr.spad.pamphlet20
-rw-r--r--src/algebra/naalg.spad.pamphlet10
-rw-r--r--src/algebra/naalgc.spad.pamphlet4
-rw-r--r--src/algebra/newpoint.spad.pamphlet4
-rw-r--r--src/algebra/nlinsol.spad.pamphlet2
-rw-r--r--src/algebra/nlode.spad.pamphlet2
-rw-r--r--src/algebra/npcoef.spad.pamphlet6
-rw-r--r--src/algebra/numeigen.spad.pamphlet2
-rw-r--r--src/algebra/numsolve.spad.pamphlet30
-rw-r--r--src/algebra/numtheor.spad.pamphlet8
-rw-r--r--src/algebra/odealg.spad.pamphlet12
-rw-r--r--src/algebra/odeef.spad.pamphlet16
-rw-r--r--src/algebra/oderf.spad.pamphlet18
-rw-r--r--src/algebra/op.spad.pamphlet16
-rw-r--r--src/algebra/openmath.spad.pamphlet8
-rw-r--r--src/algebra/ore.spad.pamphlet18
-rw-r--r--src/algebra/outform.spad.pamphlet134
-rw-r--r--src/algebra/pade.spad.pamphlet2
-rw-r--r--src/algebra/padic.spad.pamphlet14
-rw-r--r--src/algebra/patmatch1.spad.pamphlet4
-rw-r--r--src/algebra/pattern.spad.pamphlet2
-rw-r--r--src/algebra/pdecomp.spad.pamphlet6
-rw-r--r--src/algebra/perm.spad.pamphlet22
-rw-r--r--src/algebra/perman.spad.pamphlet8
-rw-r--r--src/algebra/permgrps.spad.pamphlet28
-rw-r--r--src/algebra/pfr.spad.pamphlet8
-rw-r--r--src/algebra/pgcd.spad.pamphlet14
-rw-r--r--src/algebra/pinterp.spad.pamphlet4
-rw-r--r--src/algebra/pleqn.spad.pamphlet8
-rw-r--r--src/algebra/plot.spad.pamphlet2
-rw-r--r--src/algebra/plot3d.spad.pamphlet2
-rw-r--r--src/algebra/poltopol.spad.pamphlet2
-rw-r--r--src/algebra/poly.spad.pamphlet28
-rw-r--r--src/algebra/polycat.spad.pamphlet14
-rw-r--r--src/algebra/primelt.spad.pamphlet2
-rw-r--r--src/algebra/prtition.spad.pamphlet2
-rw-r--r--src/algebra/pscat.spad.pamphlet4
-rw-r--r--src/algebra/pseudolin.spad.pamphlet6
-rw-r--r--src/algebra/puiseux.spad.pamphlet4
-rw-r--r--src/algebra/qalgset.spad.pamphlet4
-rw-r--r--src/algebra/radix.spad.pamphlet4
-rw-r--r--src/algebra/rdeef.spad.pamphlet6
-rw-r--r--src/algebra/rderf.spad.pamphlet8
-rw-r--r--src/algebra/realzero.spad.pamphlet6
-rw-r--r--src/algebra/reclos.spad.pamphlet8
-rw-r--r--src/algebra/rep1.spad.pamphlet4
-rw-r--r--src/algebra/rep2.spad.pamphlet18
-rw-r--r--src/algebra/rf.spad.pamphlet6
-rw-r--r--src/algebra/riccati.spad.pamphlet22
-rw-r--r--src/algebra/rinterp.spad.pamphlet4
-rw-r--r--src/algebra/rule.spad.pamphlet2
-rw-r--r--src/algebra/setorder.spad.pamphlet4
-rw-r--r--src/algebra/sgcf.spad.pamphlet6
-rw-r--r--src/algebra/sign.spad.pamphlet2
-rw-r--r--src/algebra/smith.spad.pamphlet8
-rw-r--r--src/algebra/solvefor.spad.pamphlet4
-rw-r--r--src/algebra/solvelin.spad.pamphlet2
-rw-r--r--src/algebra/solverad.spad.pamphlet4
-rw-r--r--src/algebra/space.spad.pamphlet2
-rw-r--r--src/algebra/special.spad.pamphlet6
-rw-r--r--src/algebra/stream.spad.pamphlet2
-rw-r--r--src/algebra/string.spad.pamphlet6
-rw-r--r--src/algebra/sttaylor.spad.pamphlet2
-rw-r--r--src/algebra/sum.spad.pamphlet12
-rw-r--r--src/algebra/symbol.spad.pamphlet2
-rw-r--r--src/algebra/syssolp.spad.pamphlet8
-rw-r--r--src/algebra/taylor.spad.pamphlet4
-rw-r--r--src/algebra/tex.spad.pamphlet16
-rw-r--r--src/algebra/transsolve.spad.pamphlet2
-rw-r--r--src/algebra/tree.spad.pamphlet4
-rw-r--r--src/algebra/twofact.spad.pamphlet16
-rw-r--r--src/algebra/unifact.spad.pamphlet14
-rw-r--r--src/algebra/vector.spad.pamphlet6
-rw-r--r--src/algebra/view2D.spad.pamphlet40
-rw-r--r--src/algebra/view3D.spad.pamphlet56
-rw-r--r--src/algebra/wtpol.spad.pamphlet4
-rw-r--r--src/algebra/xlpoly.spad.pamphlet8
-rw-r--r--src/algebra/xpoly.spad.pamphlet22
177 files changed, 932 insertions, 932 deletions
diff --git a/src/algebra/acplot.spad.pamphlet b/src/algebra/acplot.spad.pamphlet
index fa57e414..383f7e9c 100644
--- a/src/algebra/acplot.spad.pamphlet
+++ b/src/algebra/acplot.spad.pamphlet
@@ -405,7 +405,7 @@ PlaneAlgebraicCurvePlot():Exports == Implementation where
[p,x,y,xMin,xMax,yMin,yMax,[lf,rt,bt,tp],htans,vtans,bran]
makeLineSketch(p,x,y,xMin,xMax,yMin,yMax) ==
- -- the case where p(x,y) = a x + b y + c with a ^= 0, b ^= 0
+ -- the case where p(x,y) = a x + b y + c with a ~= 0, b ~= 0
-- this is a line which is neither vertical nor horizontal
xMinSF := RNtoSF xMin; xMaxSF := RNtoSF xMax
yMinSF := RNtoSF yMin; yMaxSF := RNtoSF yMax
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet
index 86f3ca7e..e36fc72f 100644
--- a/src/algebra/aggcat.spad.pamphlet
+++ b/src/algebra/aggcat.spad.pamphlet
@@ -625,7 +625,7 @@ Collection(S:Type): Category == HomogeneousAggregate(S) with
remove: (S,%) -> %
++ remove(x,u) returns a copy of u with all
++ elements \axiom{y = x} removed.
- ++ Note: \axiom{remove(y,c) == [x for x in c | x ^= y]}.
+ ++ Note: \axiom{remove(y,c) == [x for x in c | x ~= y]}.
removeDuplicates: % -> %
++ removeDuplicates(u) returns a copy of u with all duplicates removed.
if S has ConvertibleTo InputForm then ConvertibleTo InputForm
@@ -1268,7 +1268,7 @@ Dictionary(S:SetCategory): Category ==
s = t ==
eq?(s,t) => true
- #s ^= #t => false
+ #s ~= #t => false
_and/[member?(x, t) for x in parts s]
remove_!(f:S->Boolean, t:%) ==
@@ -1925,9 +1925,9 @@ TableAggregate(Key:SetCategory, Entry:SetCategory): Category ==
s:% = t:% ==
eq?(s,t) => true
- #s ^= #t => false
+ #s ~= #t => false
for k in keys s repeat
- (e := search(k, t)) case "failed" or (e::Entry) ^= s.k => false
+ (e := search(k, t)) case "failed" or (e::Entry) ~= s.k => false
true
map(f: Record(key:Key,entry:Entry)->Record(key:Key,entry:Entry), t: %): % ==
@@ -2570,7 +2570,7 @@ UnaryRecursiveAggregate(S:Type): Category == RecursiveAggregate S with
eq?(x, y) => true
for k in 0.. while not empty? x and not empty? y repeat
k = cycleMax and cyclic? x => error "cyclic list"
- first x ^= first y => return false
+ first x ~= first y => return false
x := rest x
y := rest y
empty? x and empty? y
@@ -4245,7 +4245,7 @@ OneDimensionalArrayAggregate(S:Type): Category ==
if S has SetCategory then
reduce(f, a, identity,absorber) ==
- for k in minIndex a .. maxIndex a while identity ^= absorber
+ for k in minIndex a .. maxIndex a while identity ~= absorber
repeat identity := f(identity, qelt(a, k))
identity
@@ -4391,7 +4391,7 @@ OneDimensionalArrayAggregate(S:Type): Category ==
if S has SetCategory then
x = y ==
- #x ^= #y => false
+ #x ~= #y => false
for i in minIndex x .. maxIndex x repeat
not(qelt(x, i) = qelt(y, i)) => return false
true
@@ -4407,7 +4407,7 @@ OneDimensionalArrayAggregate(S:Type): Category ==
a < b ==
for i in minIndex a .. maxIndex a
for j in minIndex b .. maxIndex b repeat
- qelt(a, i) ^= qelt(b, j) => return a.i < b.j
+ qelt(a, i) ~= qelt(b, j) => return a.i < b.j
#a < #b
@@ -4616,7 +4616,7 @@ ListAggregate(S:Type): Category == Join(StreamAggregate S,
if S has SetCategory then
reduce(f, x, i,a) ==
r := i
- while not empty? x and r ^= a repeat
+ while not empty? x and r ~= a repeat
r := f(r, first x)
x := rest x
r
@@ -4679,7 +4679,7 @@ ListAggregate(S:Type): Category == Join(StreamAggregate S,
position(w, x, s) ==
s < (m := minIndex x) => error "index out of range"
x := rest(x, (s - m)::NonNegativeInteger)
- for k in s.. while not empty? x and w ^= first x repeat
+ for k in s.. while not empty? x and w ~= first x repeat
x := rest x
empty? x => minIndex x - 1
k
@@ -4693,7 +4693,7 @@ ListAggregate(S:Type): Category == Join(StreamAggregate S,
if S has OrderedSet then
x < y ==
while not empty? x and not empty? y repeat
- first x ^= first y => return(first x < first y)
+ first x ~= first y => return(first x < first y)
x := rest x
y := rest y
empty? x => not empty? y
diff --git a/src/algebra/algcat.spad.pamphlet b/src/algebra/algcat.spad.pamphlet
index 5c028319..f2131d58 100644
--- a/src/algebra/algcat.spad.pamphlet
+++ b/src/algebra/algcat.spad.pamphlet
@@ -135,7 +135,7 @@ FramedAlgebra(R:CommutativeRing, UP:UnivariatePolynomialCategory R):
++ map defined by left multiplication by \spad{a} with respect
++ to the fixed basis.
--attributes
- --separable <=> discriminant() ^= 0
+ --separable <=> discriminant() ~= 0
add
convert(x:%):Vector(R) == coordinates(x)
convert(v:Vector R):% == represents(v)
diff --git a/src/algebra/algext.spad.pamphlet b/src/algebra/algext.spad.pamphlet
index 30e51529..7bc5057b 100644
--- a/src/algebra/algext.spad.pamphlet
+++ b/src/algebra/algext.spad.pamphlet
@@ -147,7 +147,7 @@ SimpleAlgebraicExtension(R:CommutativeRing,
for j in 0.. while i > 0 repeat
h := i rem p
-- index(p) = 0$R
- if h ^= 0 then
+ if h ~= 0 then
-- here was a bug: "index" instead of
-- "coerce", otherwise it wouldn't work for
-- Rings R where "coerce: I-> R" is not surjective
@@ -179,7 +179,7 @@ SimpleAlgebraicExtension(R:CommutativeRing,
-- xi:=L.1; setelt(mat,1,1,K.1); setelt(mat,1,(deg+1),K.1)
-- for i in 1..mdeg repeat
-- xi:= x * xi; xp:= lift(xi)
--- while xp ^= KA.0 repeat
+-- while xp ~= KA.0 repeat
-- setelt(mat,(mdeg+1),(degree(xp)+1),LeadingCoef(xp))
-- xp:=reductum(xp)
-- setelt(mat,(mdeg+1),(deg+i+1),K.1)
diff --git a/src/algebra/algfunc.spad.pamphlet b/src/algebra/algfunc.spad.pamphlet
index 163734e3..3bd69cdc 100644
--- a/src/algebra/algfunc.spad.pamphlet
+++ b/src/algebra/algfunc.spad.pamphlet
@@ -264,7 +264,7 @@ This used to read:
\begin{verbatim}
hackroot(x, n) ==
(n = 1) or (x = 1) => x
- (x ^= -1) and (((num := numer x) = 1) or (num = -1)) =>
+ (x ~= -1) and (((num := numer x) = 1) or (num = -1)) =>
inv hackroot((num * denom x)::F, n)
(x = -1) and n = 4 =>
((-1::F) ** (1::Q / 2::Q) + 1) / ((2::F) ** (1::Q / 2::Q))
@@ -278,7 +278,7 @@ test and give $$1/(-2)^(1/n) \ne (-1/2)^(1/n)$$
<<hackroot(x, n)>>=
hackroot(x, n) ==
(n = 1) or (x = 1) => x
- (((dx := denom x) ^= 1) and
+ (((dx := denom x) ~= 1) and
((rx := retractIfCan(dx)@Union(Integer,"failed")) case Integer) and
positive?(rx))
=> hackroot((numer x)::F, n)/hackroot(rx::Integer::F, n)
@@ -392,7 +392,7 @@ AlgebraicFunction(R, F): Exports == Implementation where
UP2R p ==
ans:UPR := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
(r := retractIfCan(leadingCoefficient p)@Union(R, "failed"))
case "failed" => return "failed"
ans := ans + monomial(r::R, degree p)
diff --git a/src/algebra/allfact.spad.pamphlet b/src/algebra/allfact.spad.pamphlet
index ccc9497d..3289cbc6 100644
--- a/src/algebra/allfact.spad.pamphlet
+++ b/src/algebra/allfact.spad.pamphlet
@@ -171,7 +171,7 @@ MPolyCatRationalFunctionFactorizer(E,OV,R,PRF) : C == T
ground? g => g
rf:PRF:=0$PRF
ug:=univariate(g,x)
- while ug^=0 repeat
+ while ug~=0 repeat
rf:=rf+pushdterm(ug,x)
ug := reductum ug
rf
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index 9b05dab0..a304c91a 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -362,12 +362,12 @@ IndexedFlexibleArray(S:Type, mn: Integer): Exports == Implementation where
nlim0 := nlim
while i < nlim repeat
j := i+1
- for k in j..nlim-1 | a.k ^= a.i repeat
+ for k in j..nlim-1 | a.k ~= a.i repeat
a.j := a.k
j := j+1
nlim := j
i := i+1
- nlim ^= nlim0 => delete_!(a, i..)
+ nlim ~= nlim0 => delete_!(a, i..)
a
@
diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet
index ef540c42..f6a89047 100644
--- a/src/algebra/array2.spad.pamphlet
+++ b/src/algebra/array2.spad.pamphlet
@@ -192,7 +192,7 @@ TwoDimensionalArrayCategory(R,Row,Col): Category == Definition where
m
map(f,m,n) ==
- (nrows(m) ^= nrows(n)) or (ncols(m) ^= ncols(n)) =>
+ (nrows(m) ~= nrows(n)) or (ncols(m) ~= ncols(n)) =>
error "map: arguments must have same dimensions"
ans := new(nrows m,ncols m,NIL$Lisp)
for i in minRowIndex(m)..maxRowIndex(m) repeat
@@ -229,7 +229,7 @@ TwoDimensionalArrayCategory(R,Row,Col): Category == Definition where
m = n ==
eq?(m,n) => true
- (nrows(m) ^= nrows(n)) or (ncols(m) ^= ncols(n)) => false
+ (nrows(m) ~= nrows(n)) or (ncols(m) ~= ncols(n)) => false
for i in minRowIndex(m)..maxRowIndex(m) repeat
for j in minColIndex(m)..maxColIndex(m) repeat
not (qelt(m,i,j) = qelt(n,i,j)) => return false
diff --git a/src/algebra/asp.spad.pamphlet b/src/algebra/asp.spad.pamphlet
index 7899fb39..7eb29854 100644
--- a/src/algebra/asp.spad.pamphlet
+++ b/src/algebra/asp.spad.pamphlet
@@ -3279,7 +3279,7 @@ Asp73(name): Exports == Implementation where
assign(u,(v::EXPR MachineFloat)$FEXPR)$FortranCode
coerce(u:VEC FEXPR):$ ==
- maxIndex(u) ^= 7 => error "Vector is not of dimension 7"
+ maxIndex(u) ~= 7 => error "Vector is not of dimension 7"
[localAssign(ALPHA@Symbol,elt(u,1)),_
localAssign(BETA@Symbol,elt(u,2)),_
localAssign(GAMMA@Symbol,elt(u,3)),_
@@ -3447,7 +3447,7 @@ Asp74(name): Exports == Implementation where
localAssign(u:Symbol,v:FEXPR):FC == assign(u,(v::EXPR MFLOAT)$FEXPR)$FC
coerce(u:MAT FEXPR):$ ==
- (nrows(u) ^= 4 or ncols(u) ^= 3) => error "Not a 4X3 matrix"
+ (nrows(u) ~= 4 or ncols(u) ~= 3) => error "Not a 4X3 matrix"
flag:U := [IBND@Symbol::EXPR INT]$U
pt0:U := [0::EXPR INT]$U
pt1:U := [1::EXPR INT]$U
diff --git a/src/algebra/card.spad.pamphlet b/src/algebra/card.spad.pamphlet
index a1585083..ce908e9c 100644
--- a/src/algebra/card.spad.pamphlet
+++ b/src/algebra/card.spad.pamphlet
@@ -109,7 +109,7 @@ CardinalNumber: Join(OrderedSet, AbelianMonoid, Monoid,
-- Manipulation
x = y ==
- x.order ^= y.order => false
+ x.order ~= y.order => false
finite? x => x.ival = y.ival
true -- equal transfinites
x < y ==
@@ -135,7 +135,7 @@ CardinalNumber: Join(OrderedSet, AbelianMonoid, Monoid,
x
x**y ==
y = 0 =>
- x ^= 0 => 1
+ x ~= 0 => 1
error "0**0 not defined for cardinal numbers."
finite? y =>
not finite? x => x
diff --git a/src/algebra/carten.spad.pamphlet b/src/algebra/carten.spad.pamphlet
index 0f1d2952..064b0865 100644
--- a/src/algebra/carten.spad.pamphlet
+++ b/src/algebra/carten.spad.pamphlet
@@ -219,7 +219,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
++ kroneckerDelta() is the rank 2 tensor defined by
++ \spad{kroneckerDelta()(i,j)}
++ \spad{= 1 if i = j}
- ++ \spad{= 0 if i \^= j}
+ ++ \spad{= 0 if i \~= j}
leviCivitaSymbol: () -> %
++ leviCivitaSymbol() is the rank \spad{dim} tensor defined by
@@ -269,7 +269,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
qr := divide(n, dim)
n := qr.quotient
indv.((rnk-i+1) pretend NNI) := qr.remainder + minix
- n ^= 0 => error "Index error (too big)"
+ n ~= 0 => error "Index error (too big)"
indv
index2int(indv: INDEX): Integer ==
@@ -287,17 +287,17 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
v = dim3 => 3
v = dim4 => 4
rx := 0
- while v ^= 0 repeat
+ while v ~= 0 repeat
qr := divide(v, dim)
v := qr.quotient
- if v ^= 0 then
- qr.remainder ^= 0 => error "Rank is not a whole number"
+ if v ~= 0 then
+ qr.remainder ~= 0 => error "Rank is not a whole number"
rx := rx + 1
rx
-- l must be a list of the numbers 1..#l
mkPerm(n: NNI, l: List Integer): PERM ==
- #l ^= n =>
+ #l ~= n =>
error "The list is not a permutation."
p: PERM := new(n, 0)
seen: Vector Boolean := new(n, false)
@@ -320,14 +320,14 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
-- sum minix..minix+#v-1.
maxix := minix+#v-1
psum := (((maxix+1)*maxix - minix*(minix-1)) exquo 2)::Integer
- -- +/v ^= psum => 0
+ -- +/v ~= psum => 0
n := 0
for i in 1..#v repeat n := n + v.i
- n ^= psum => 0
+ n ~= psum => 0
-- Bubble sort! This is pretty grotesque.
totTrans: Integer := 0
nTrans: Integer := 1
- while nTrans ^= 0 repeat
+ while nTrans ~= 0 repeat
nTrans := 0
for i in 1..#v-1 for j in 2..#v repeat
if v.i > v.j then
@@ -335,7 +335,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
e := v.i; v.i := v.j; v.j := e
totTrans := totTrans + nTrans
for i in 1..dim repeat
- if v.i ^= minix+i-1 then return 0
+ if v.i ~= minix+i-1 then return 0
odd? totTrans => -1
1
@@ -373,23 +373,23 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
lengthRankOrElse n
elt(x) ==
- #x ^= 1 => error "Index error (the rank is not 0)"
+ #x ~= 1 => error "Index error (the rank is not 0)"
get(x,0)
elt(x, i: I) ==
- #x ^= dim => error "Index error (the rank is not 1)"
+ #x ~= dim => error "Index error (the rank is not 1)"
get(x,(i-minix))
elt(x, i: I, j: I) ==
- #x ^= dim2 => error "Index error (the rank is not 2)"
+ #x ~= dim2 => error "Index error (the rank is not 2)"
get(x,(dim*(i-minix) + (j-minix)))
elt(x, i: I, j: I, k: I) ==
- #x ^= dim3 => error "Index error (the rank is not 3)"
+ #x ~= dim3 => error "Index error (the rank is not 3)"
get(x,(dim2*(i-minix) + dim*(j-minix) + (k-minix)))
elt(x, i: I, j: I, k: I, l: I) ==
- #x ^= dim4 => error "Index error (the rank is not 4)"
+ #x ~= dim4 => error "Index error (the rank is not 4)"
get(x,(dim3*(i-minix) + dim2*(j-minix) + dim*(k-minix) + (l-minix)))
elt(x, i: List I) ==
- #i ^= rank x => error "Index error (wrong rank)"
+ #i ~= rank x => error "Index error (wrong rank)"
n: I := 0
for ii in i repeat
ix := ii - minix
@@ -398,15 +398,15 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
get(x,n)
coerce(lr: List R): % ==
- #lr ^= dim => error "Incorrect number of components"
+ #lr ~= dim => error "Incorrect number of components"
z := new(dim, 0)
for r in lr for i in 0..dim-1 repeat set_!(z, i, r)
z
coerce(lx: List %): % ==
- #lx ^= dim => error "Incorrect number of slices"
+ #lx ~= dim => error "Incorrect number of slices"
rx := rank first lx
for x in lx repeat
- rank x ^= rx => error "Inhomogeneous slice ranks"
+ rank x ~= rx => error "Inhomogeneous slice ranks"
nx := # first lx
z := new(dim * nx, 0)
for x in lx for offz in 0.. by nx repeat
@@ -453,18 +453,18 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
z
x = y ==
- #x ^= #y => false
+ #x ~= #y => false
for i in 0..#x-1 repeat
- if get(x,i) ^= get(y,i) then return false
+ if get(x,i) ~= get(y,i) then return false
true
x + y ==
- #x ^= #y => error "Rank mismatch"
+ #x ~= #y => error "Rank mismatch"
-- z := [xi + yi for xi in x for yi in y]
z := new(#x, 0)
for i in 0..#x-1 repeat set_!(z, i, get(x,i) + get(y,i))
z
x - y ==
- #x ^= #y => error "Rank mismatch"
+ #x ~= #y => error "Rank mismatch"
-- [xi - yi for xi in x for yi in y]
z := new(#x, 0)
for i in 0..#x-1 repeat set_!(z, i, get(x,i) - get(y,i))
diff --git a/src/algebra/clifford.spad.pamphlet b/src/algebra/clifford.spad.pamphlet
index eeec3b36..ecedf9ac 100644
--- a/src/algebra/clifford.spad.pamphlet
+++ b/src/algebra/clifford.spad.pamphlet
@@ -297,7 +297,7 @@ CliffordAlgebra(n, K, Q): T == Impl where
x = y ==
for i in 0..dim-1 repeat
- if x.i ^= y.i then return false
+ if x.i ~= y.i then return false
true
x + y == (z := New; for i in 0..dim-1 repeat z.i := x.i + y.i; z)
@@ -322,7 +322,7 @@ CliffordAlgebra(n, K, Q): T == Impl where
c := c1 * c2
bz := b2
for i in 0..n-1 | bit?(b1,i) repeat
- -- Apply rule ei*ej = -ej*ei for i^=j
+ -- Apply rule ei*ej = -ej*ei for i~=j
k := 0
for j in i+1..n-1 | bit?(b1, j) repeat k := k+1
for j in 0..i-1 | bit?(bz, j) repeat k := k+1
@@ -339,15 +339,15 @@ CliffordAlgebra(n, K, Q): T == Impl where
x * y ==
z := New
for ix in 0..dim-1 repeat
- if x.ix ^= 0 then for iy in 0..dim-1 repeat
- if y.iy ^= 0 then addMonomProd(x.ix,ix,y.iy,iy,z)
+ if x.ix ~= 0 then for iy in 0..dim-1 repeat
+ if y.iy ~= 0 then addMonomProd(x.ix,ix,y.iy,iy,z)
z
canonMonom(c: K, lb: List PI): Record(coef: K, basel: NNI) ==
-- 0. Check input
for b in lb repeat b > n => error "No such basis element"
- -- 1. Apply identity ei*ej = -ej*ei, i^=j.
+ -- 1. Apply identity ei*ej = -ej*ei, i~=j.
-- The Rep assumes n is small so bubble sort is ok.
-- Using bubble sort keeps the exchange info obvious.
wasordered := false
@@ -392,7 +392,7 @@ CliffordAlgebra(n, K, Q): T == Impl where
c = 1 => be
c::Ex * be
coerce(x): Ex ==
- tl := [coerceMonom(x.i,i) for i in 0..dim-1 | x.i^=0]
+ tl := [coerceMonom(x.i,i) for i in 0..dim-1 | x.i~=0]
null tl => "0"::Ex
reduce("+", tl)
diff --git a/src/algebra/combinat.spad.pamphlet b/src/algebra/combinat.spad.pamphlet
index 55765dc4..a70619fa 100644
--- a/src/algebra/combinat.spad.pamphlet
+++ b/src/algebra/combinat.spad.pamphlet
@@ -66,7 +66,7 @@ IntegerCombinatoricFunctions(I:IntegerNumberSystem): with
-- since 5 = 1+1+1+1+1 = 1+1+1+2 = 1+2+2 = 1+1+3 = 1+4 = 2+3 = 5 .
-- Uses O(sqrt n) term recurrence from Abramowitz & Stegun pp. 825
-- p(n) = sum (-1)**k p(n-j) where 0 < j := (3*k**2+-k) quo 2 <= n
- minIndex(P) ^= 0 => error "Partition: must have minIndex of 0"
+ minIndex(P) ~= 0 => error "Partition: must have minIndex of 0"
m := #P
n < 0 => error "partition is not defined for negative integers"
n < m::I => P(convert(n)@Z)
diff --git a/src/algebra/contfrac.spad.pamphlet b/src/algebra/contfrac.spad.pamphlet
index 2261d76c..e24d5825 100644
--- a/src/algebra/contfrac.spad.pamphlet
+++ b/src/algebra/contfrac.spad.pamphlet
@@ -169,12 +169,12 @@ ContinuedFraction(R): Exports == Implementation where
x := reducedForm x
y := reducedForm y
- x.value.whole ^= y.value.whole => false
+ x.value.whole ~= y.value.whole => false
xl := x.value.fract; yl := y.value.fract
while not empty? xl and not empty? yl repeat
- frst.xl.den ^= frst.yl.den => return false
+ frst.xl.den ~= frst.yl.den => return false
xl := rst xl; yl := rst yl
empty? xl and empty? yl
@@ -226,7 +226,7 @@ ContinuedFraction(R): Exports == Implementation where
genFromSequence apps ==
lo := first apps; apps := rst apps
hi := first apps; apps := rst apps
- while eucWhole0 lo ^= eucWhole0 hi repeat
+ while eucWhole0 lo ~= eucWhole0 hi repeat
lo := first apps; apps := rst apps
hi := first apps; apps := rst apps
wh := eucWhole0 lo
@@ -239,7 +239,7 @@ ContinuedFraction(R): Exports == Implementation where
mt := recip mt
wlo := eucWhole eval(mt, lo)
whi := eucWhole eval(mt, hi)
- while wlo ^= whi repeat
+ while wlo ~= whi repeat
wlo := eucWhole eval(mt, first apps - wh0); apps := rst apps
whi := eucWhole eval(mt, first apps - wh0); apps := rst apps
concat([1,wlo], delay genReducedForm(wh0, apps, shift(mt, -wlo::Q)))
diff --git a/src/algebra/cra.spad.pamphlet b/src/algebra/cra.spad.pamphlet
index 640170d9..b5bb6378 100644
--- a/src/algebra/cra.spad.pamphlet
+++ b/src/algebra/cra.spad.pamphlet
@@ -42,7 +42,7 @@ CRApackage(R:EuclideanDomain): Exports == Implementation where
leaves mapDown_!(t, a, "rem")
chineseRemainder(lv:List(R), lm:List(R)):R ==
- #lm ^= #lv => error "lists of moduli and values not of same length"
+ #lm ~= #lv => error "lists of moduli and values not of same length"
x := balancedBinaryTree(#lm, 0$R)
x := setleaves_!(x, lm)
mapUp_!(x,"*")
diff --git a/src/algebra/crfp.spad.pamphlet b/src/algebra/crfp.spad.pamphlet
index d3bb5b83..b2291289 100644
--- a/src/algebra/crfp.spad.pamphlet
+++ b/src/algebra/crfp.spad.pamphlet
@@ -406,7 +406,7 @@ ComplexRootFindingPackage(R, UP): public == private where
zero? (d := degree p) => error _
"schwerpunkt: non-zero const. polynomial has no roots and no schwerpunkt"
-- coeffient of x**d and x**(d-1)
- lC : C := coefficient(p,d) -- ^= 0
+ lC : C := coefficient(p,d) -- ~= 0
nC : C := coefficient(p,(d-1) pretend NNI)
(denom := recip ((d::I::C)*lC)) case "failed" => error "schwerpunkt: _
degree * leadingCoefficient not invertible in ring of coefficients"
@@ -561,7 +561,7 @@ ComplexRootFindingPackage(R, UP): public == private where
eq : Equation UP := equation(monomial(1,1), monomial(-1$C,1))
pp : UP := p*eval(p,eq)
gp : UP := 0$UP
- while pp ^= 0 repeat
+ while pp ~= 0 repeat
i:NNI := (degree pp) quo (2::NNI)
coef:C:=
even? i => leadingCoefficient pp
diff --git a/src/algebra/curve.spad.pamphlet b/src/algebra/curve.spad.pamphlet
index 5ca9495b..d216b16d 100644
--- a/src/algebra/curve.spad.pamphlet
+++ b/src/algebra/curve.spad.pamphlet
@@ -168,13 +168,13 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
Q2RF q == numer(q)::UP / denom(q)::UP
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
+ integral?(f:$, a:F) == (integralCoordinates(f).den)(a) ~= 0
-- absolutelyIrreducible? == one? numberOfComponents()
absolutelyIrreducible? == numberOfComponents() = 1
yCoordinates f == splitDenominator coordinates f
hyperelliptic() ==
- degree(f := definingPolynomial()) ^= 2 => "failed"
+ degree(f := definingPolynomial()) ~= 2 => "failed"
(u:=retractIfCan(reductum f)@Union(RF,"failed")) case "failed" => "failed"
(v := retractIfCan(-(u::RF) / leadingCoefficient f)@Union(UP, "failed"))
case "failed" => "failed"
@@ -299,7 +299,7 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
nostart:Boolean := true
ans:Z := 0
r := row(m, i)
- for j in minIndex r .. maxIndex r | qelt(r, j) ^= 0 repeat
+ for j in minIndex r .. maxIndex r | qelt(r, j) ~= 0 repeat
ans :=
nostart => (nostart := false; infOrder qelt(r, j))
min(ans, infOrder qelt(r,j))
@@ -321,7 +321,7 @@ FunctionFieldCategory(F, UP, UPUP): Category == Definition where
nostart:Boolean := true
k:Z := 0
ii := minRowIndex m - (i0 := minIndex v)
- for i in minIndex v .. maxIndex v | qelt(v, i) ^= 0 repeat
+ for i in minIndex v .. maxIndex v | qelt(v, i) ~= 0 repeat
nk := repOrder(m, i + ii)
if nostart then (nostart := false; k := nk; i0 := i)
else
@@ -476,7 +476,7 @@ ChangeOfVariable(F, UP, UPUP): Exports == Implementation where
infIntegral?: (UPUP, UPUP) -> Boolean
eval(p, x, y) == map(#1 x, p) monomial(y, 1)
- good?(a, p, q) == p(a) ^= 0 and q(a) ^= 0
+ good?(a, p, q) == p(a) ~= 0 and q(a) ~= 0
algPoly p ==
ground?(a:= retract(leadingCoefficient(q:=clearDenominator p))@UP)
@@ -514,7 +514,7 @@ ChangeOfVariable(F, UP, UPUP): Exports == Implementation where
ninv := inv(r.deg::Q)
degy:Q := degree(retract(r.radicand)@UP) * ninv
degp:Q := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
c := leadingCoefficient p
degp := max(degp,
(2 + degree(numer c)::Z - degree(denom c)::Z)::Q + degree(p) * degy)
@@ -666,7 +666,7 @@ RadicalFunctionField(F, UP, UPUP, radicnd, n): Exports == Impl where
-- is a local integral basis at infinity for the curve y**d = p
inftyBasis(p, m) ==
rt := rootPoly(p(x := inv(monomial(1, 1)$UP :: RF)), m)
- m ^= rt.exponent =>
+ m ~= rt.exponent =>
error "Curve not irreducible after change of variable 0 -> infinity"
a := (rt.coef) x
b:RF := 1
@@ -678,7 +678,7 @@ RadicalFunctionField(F, UP, UPUP, radicnd, n): Exports == Impl where
w
charPintbas(p, c, v, w) ==
- degree(p) ^= n => error "charPintbas: should not happen"
+ degree(p) ~= n => error "charPintbas: should not happen"
q:UP2 := map(retract(#1)@UP, p)
ib := integralBasis()$FunctionFieldIntegralBasis(UP, UP2,
SimpleAlgebraicExtension(UP, UP2, q))
@@ -712,7 +712,7 @@ RadicalFunctionField(F, UP, UPUP, radicnd, n): Exports == Impl where
char0StartUp() ==
rp := rootPoly(radicnd, n)
- rp.exponent ^= n => error "RadicalFunctionField: curve is not irreducible"
+ rp.exponent ~= n => error "RadicalFunctionField: curve is not irreducible"
newrad() := rp.radicand
ib := iBasis(newrad(), n)
infb := inftyBasis(radicnd, n)
@@ -831,7 +831,7 @@ AlgebraicFunctionField(F, UP, UPUP, modulus): Exports == Impl where
x := inv(monomial(1, 1)$UP :: RF)
invmod := map(#1 x, modulus)
r := mkIntegral invmod
- degree(r.poly) ^= n => error "Should not happen"
+ degree(r.poly) ~= n => error "Should not happen"
ninvmod:UP2 := map(retract(#1)@UP, r.poly)
alpha := [(r.coef ** i) x for i in 0..n1]$Vector(RF)
invalpha := [inv qelt(alpha, i)
diff --git a/src/algebra/ddfact.spad.pamphlet b/src/algebra/ddfact.spad.pamphlet
index 3871a8b8..97b8f811 100644
--- a/src/algebra/ddfact.spad.pamphlet
+++ b/src/algebra/ddfact.spad.pamphlet
@@ -101,12 +101,12 @@ DistinctDegreeFactorize(F,FP): C == T
factlist : List(ParFact) :=empty()
llf : List FFE
fln :List(FP) := empty()
- if (lcm:=leadingCoefficient m)^=1 then m:=(inv lcm)*m
+ if (lcm:=leadingCoefficient m)~=1 then m:=(inv lcm)*m
llf:= factorList(squareFree(m))
for lf in llf repeat
d1:= lf.xpnt
pol := lf.fctr
- if (lcp:=leadingCoefficient pol)^=1 then pol := (inv lcp)*pol
+ if (lcp:=leadingCoefficient pol)~=1 then pol := (inv lcp)*pol
degree pol=1 => factlist:=cons([pol,d1]$ParFact,factlist)
fln := appl(pol)
factlist :=append([[pf,d1]$ParFact for pf in fln],factlist)
@@ -159,7 +159,7 @@ DistinctDegreeFactorize(F,FP): C == T
g := gcd(v-mon,u)
dg := degree g
dg =0 => "next k1"
- if leadingCoefficient g ^=1 then g := (inv leadingCoefficient g)*g
+ if leadingCoefficient g ~=1 then g := (inv leadingCoefficient g)*g
ddfact := cons([k1,g]$fact,ddfact)
testirr => return ddfact
u := u quo g
@@ -222,7 +222,7 @@ DistinctDegreeFactorize(F,FP): C == T
fln : List(FP) :=empty()
--make m monic
- if (lcm := leadingCoefficient m) ^=1 then m := (inv lcm)*m
+ if (lcm := leadingCoefficient m) ~=1 then m := (inv lcm)*m
--is x**d factor of m?
if (d := minimumDegree m)>0 then
diff --git a/src/algebra/defintef.spad.pamphlet b/src/algebra/defintef.spad.pamphlet
index d76f8a01..b8f542cb 100644
--- a/src/algebra/defintef.spad.pamphlet
+++ b/src/algebra/defintef.spad.pamphlet
@@ -204,7 +204,7 @@ ElementaryFunctionDefiniteIntegration(R, F): Exports == Implementation where
polyIfCan(p, x) ==
q := univariate(p, x)
ans:UP := 0
- while q ^= 0 repeat
+ while q ~= 0 repeat
member?(x, tower(c := leadingCoefficient(q)::F)) => return "failed"
ans := ans + monomial(c, degree q)
q := reductum q
diff --git a/src/algebra/defintrf.spad.pamphlet b/src/algebra/defintrf.spad.pamphlet
index 097192a5..fc89b11f 100644
--- a/src/algebra/defintrf.spad.pamphlet
+++ b/src/algebra/defintrf.spad.pamphlet
@@ -148,7 +148,7 @@ DefiniteIntegrationTools(R, F): Exports == Implementation where
maprat p ==
ans:UPQ := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
(r := retractIfCan(c := leadingCoefficient p)@Union(Q,"failed"))
case "failed" => return "failed"
ans := ans + monomial(r::Q, degree p)
@@ -157,14 +157,14 @@ DefiniteIntegrationTools(R, F): Exports == Implementation where
)$SparseUnivariatePolynomialFunctions2(Q, Z)
intrat(a, b) ==
- (n := whatInfinity a) ^= 0 =>
+ (n := whatInfinity a) ~= 0 =>
(r := retractIfCan(b)@Union(F,"failed")) case "failed" => ["all"]
(q := retractIfCan(r::F)@Union(Q, "failed")) case "failed" =>
["failed"]
[[q::Q, n]]
(q := retractIfCan(retract(a)@F)@Union(Q,"failed")) case "failed"
=> ["failed"]
- (n := whatInfinity b) ^= 0 => [[q::Q, n]]
+ (n := whatInfinity b) ~= 0 => [[q::Q, n]]
(t := retractIfCan(retract(b)@F)@Union(Q,"failed")) case "failed"
=> ["failed"]
[[q::Q, t::Q]]
@@ -187,11 +187,11 @@ DefiniteIntegrationTools(R, F): Exports == Implementation where
checkBudan(p, a, b, incl?) ==
r := retractIfCan(b)@Union(F, "failed")
- (n := whatInfinity a) ^= 0 =>
+ (n := whatInfinity a) ~= 0 =>
r case "failed" => realRoot p
checkHalfAx(p, r::F, n, incl?)
(za? := zero? p(aa := retract(a)@F)) and incl? => true
- (n := whatInfinity b) ^= 0 => checkHalfAx(p, aa, n, incl?)
+ (n := whatInfinity b) ~= 0 => checkHalfAx(p, aa, n, incl?)
(zb? := zero? p(bb := r::F)) and incl? => true
(va := variation(p, aa)) case "failed" or
(vb := variation(p, bb)) case "failed" => "failed"
@@ -250,7 +250,7 @@ DefiniteIntegrationTools(R, F): Exports == Implementation where
i:Z := 0
(lastCoef := negative leadingCoefficient q) case "failed" =>
"failed"
- while ((q := reductum q) ^= 0) repeat
+ while ((q := reductum q) ~= 0) repeat
(next := negative leadingCoefficient q) case "failed" =>
return "failed"
if ((not(lastCoef::B)) and next::B) or
diff --git a/src/algebra/degred.spad.pamphlet b/src/algebra/degred.spad.pamphlet
index dd903291..59a6f220 100644
--- a/src/algebra/degred.spad.pamphlet
+++ b/src/algebra/degred.spad.pamphlet
@@ -33,7 +33,7 @@ DegreeReductionPackage(R1, R2): Cat == Capsule where
degrees(u: UP R1): List Integer ==
l: List Integer := []
- while u ^= 0 repeat
+ while u ~= 0 repeat
l := concat(degree u,l)
u := reductum u
l
diff --git a/src/algebra/derham.spad.pamphlet b/src/algebra/derham.spad.pamphlet
index eb06ae86..06bb096c 100644
--- a/src/algebra/derham.spad.pamphlet
+++ b/src/algebra/derham.spad.pamphlet
@@ -87,7 +87,7 @@ ExtAlgBasis(): Export == Implement where
coerce(li:(L I)) ==
for x in li repeat
- if x ^= 1 and x ^= 0 then error "coerce: values can only be 0 and 1"
+ if x ~= 1 and x ~= 0 then error "coerce: values can only be 0 and 1"
li
degree x == (_+/x)::NNI
@@ -209,7 +209,7 @@ AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where
null a => true
siz := _+/exponents(a.first.base)
for ta in reductum a repeat
- _+/exponents(ta.base) ^= siz => return false
+ _+/exponents(ta.base) ~= siz => return false
true
degree a ==
@@ -255,7 +255,7 @@ AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where
for ta in a repeat
stuff:=Nalpha(ta.base,tb.base)
r:=first(stuff)*ta.coef*tb.coef
- if r ^= 0 then z := z + [[rest(stuff)::EAB, r]]
+ if r ~= 0 then z := z + [[rest(stuff)::EAB, r]]
z
coerce(r):% ==
@@ -289,7 +289,7 @@ AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where
makeTerm:(R,EAB) -> O
makeTerm(r,x) ==
- -- we know that r ^= 0
+ -- we know that r ~= 0
x = Nul(dim)$EAB => r::O
-- one? r => displayList(x)
(r = 1) => displayList(x)
@@ -400,7 +400,7 @@ DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where
makeTerm:(R,EAB) -> O
makeTerm(r,x) ==
- -- we know that r ^= 0
+ -- we know that r ~= 0
x = Nul(dim)$EAB => r::O
-- one? r => displayList(x)
(r = 1) => displayList(x)
diff --git a/src/algebra/divisor.spad.pamphlet b/src/algebra/divisor.spad.pamphlet
index 1d402c7b..05a201cc 100644
--- a/src/algebra/divisor.spad.pamphlet
+++ b/src/algebra/divisor.spad.pamphlet
@@ -121,7 +121,7 @@ FractionalIdeal(R, F, UP, A): Exports == Implementation where
g := agcd nr
a := (r quo (b := gcd(gcd(d, r), g)))::F::A
d := d quo b
- r ^= 0 and ((g exquo r) case R) => mkIdeal([a], d)
+ r ~= 0 and ((g exquo r) case R) => mkIdeal([a], d)
invb := inv(b::F)
va:VA := [invb * m for m in nr]
zero? a => mkIdeal(va, d)
@@ -268,7 +268,7 @@ ModularHermitianRowReduction(R): Exports == Implementation where
determinantOfMinor: M -> R
enumerateBinomial: (List Z, Z, Z) -> List Z
- nonzero? v == any?(#1 ^= 0, v)
+ nonzero? v == any?(#1 ~= 0, v)
-- returns [a, i, rown] if v = [0,...,0,a,0,...,0]
-- where a <> 0 and i is the index of a, "failed" otherwise.
@@ -276,7 +276,7 @@ ModularHermitianRowReduction(R): Exports == Implementation where
ans:REC
allZero:Boolean := true
for i in minIndex v .. maxIndex v repeat
- if qelt(v, i) ^= 0 then
+ if qelt(v, i) ~= 0 then
if allZero then
allZero := false
ans := [qelt(v, i), i, rown]
@@ -314,7 +314,7 @@ ModularHermitianRowReduction(R): Exports == Implementation where
lc := [i for i in minColIndex x .. maxColIndex x]$List(Integer)
lr := [i for i in minRowIndex x .. maxRowIndex x]$List(Integer)
for i in 1..(n := binomial(nr, nc)) repeat
- (d := determinant x(enumerateBinomial(lr, nc, i), lc)) ^= 0 =>
+ (d := determinant x(enumerateBinomial(lr, nc, i), lc)) ~= 0 =>
j := i + 1 + (random()$Z rem (n - i))
return gcd(d, determinant x(enumerateBinomial(lr, nc, j), lc))
0
@@ -423,7 +423,7 @@ ModularHermitianRowReduction(R): Exports == Implementation where
if i > nrows then leave
rown := minr - 1
for k in i .. nrows repeat
- if (qelt(x,k,j) ^= 0) and ((rown = minr - 1) or
+ if (qelt(x,k,j) ~= 0) and ((rown = minr - 1) or
sizeLess?(qelt(x,k,j), qelt(x,rown,j))) then rown := k
rown = minr - 1 => "next j"
x := swapRows_!(x, i, rown)
@@ -442,7 +442,7 @@ ModularHermitianRowReduction(R): Exports == Implementation where
qsetelt_!(x, k, j, 0)
un := unitNormal qelt(x,i,j)
qsetelt_!(x,i,j,un.canonical)
- if un.associate ^= 1 then for jj in (j+1)..ncols repeat
+ if un.associate ~= 1 then for jj in (j+1)..ncols repeat
qsetelt_!(x,i,jj,un.associate * qelt(x,i,jj))
xij := qelt(x,i,j)
@@ -549,14 +549,14 @@ FramedModule(R, F, UP, A, ibasis): Exports == Implementation where
v pretend VA
norm m ==
- #(basis m) ^= #ibasis => error "Module not of rank n"
+ #(basis m) ~= #ibasis => error "Module not of rank n"
determinant(coordinates(basis m) * invintmat())
m1 * m2 ==
m := rowEch((cd := splitDenominator wmatrix(
vectProd(basis m1, basis m2))).num)
module [u for i in minRowIndex m .. maxRowIndex m |
- (u := W2A rowdiv(row(m, i), cd.den)) ^= 0]$VA
+ (u := W2A rowdiv(row(m, i), cd.den)) ~= 0]$VA
if A has RetractableTo F then
module(i:FractionalIdeal(R, F, UP, A)) ==
@@ -707,7 +707,7 @@ HyperellipticFiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
divisor(i:ID) ==
-- one?(n := #(v := basis minimize i)) => divisor v minIndex v
(n := #(v := basis minimize i)) = 1 => divisor v minIndex v
- n ^= 2 => ERR
+ n ~= 2 => ERR
a := v minIndex v
h := v maxIndex v
(u := polyIfCan a) case UP =>
@@ -724,7 +724,7 @@ HyperellipticFiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
v::UP
redpolyIfCan(h, a) ==
- degree(p := lift h) ^= 1 => "failed"
+ degree(p := lift h) ~= 1 => "failed"
q := - coefficient(p, 0) / coefficient(p, 1)
rec := extendedEuclidean(denom q, a)
not ground?(rec.generator) => "failed"
@@ -886,7 +886,7 @@ FiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
reduce d ==
(i := minimize(j := ideal d)) = j => d
- #(n := numer i) ^= 2 => divisor i
+ #(n := numer i) ~= 2 => divisor i
cd := splitDenominator lift n(1 + minIndex n)
b := gcd(cd.den * retract(retract(n minIndex n)@RF)@UP,
retract(norm reduce(cd.num))@UP)
diff --git a/src/algebra/efstruc.spad.pamphlet b/src/algebra/efstruc.spad.pamphlet
index 6ac57be1..9a015122 100644
--- a/src/algebra/efstruc.spad.pamphlet
+++ b/src/algebra/efstruc.spad.pamphlet
@@ -205,10 +205,10 @@ ElementaryFunctionStructurePackage(R,F): Exports == Implementation where
realElem(f, l) == smpElem(numer f, l) / smpElem(denom f, l)
realElementary(f, x) == realElem(f, [x])
realElementary f == realElem(f, variables f)
- toY ker == [func for k in ker | (func := ktoY k) ^= 0]
- toZ ker == [func for k in ker | (func := ktoZ k) ^= 0]
- toU ker == [func for k in ker | (func := ktoU k) ^= 0]
- toV ker == [func for k in ker | (func := ktoV k) ^= 0]
+ toY ker == [func for k in ker | (func := ktoY k) ~= 0]
+ toZ ker == [func for k in ker | (func := ktoZ k) ~= 0]
+ toU ker == [func for k in ker | (func := ktoU k) ~= 0]
+ toV ker == [func for k in ker | (func := ktoV k) ~= 0]
rtNormalize f == rootNormalize0(f).func
toR(ker, x) == select(is?(#1, NTHR) and first argument(#1) = x, ker)
@@ -250,7 +250,7 @@ ElementaryFunctionStructurePackage(R,F): Exports == Implementation where
differentiate(ktoU k, x))
is?(k, NTHR) => rootDep(ker, k)
comb? and is?(k, "factorial"::SY) =>
- factdeprel([x for x in ker | is?(x,"factorial"::SY) and x^=k],k)
+ factdeprel([x for x in ker | is?(x,"factorial"::SY) and x~=k],k)
[true]
ktoY k ==
@@ -325,7 +325,7 @@ ElementaryFunctionStructurePackage(R,F): Exports == Implementation where
rooteval(f, lk, k, n) ==
nv := nthRoot(x := first argument k, m := retract(n)@Z)
l := [r for r in concat(k, toR(lk, x)) |
- retract(second argument r)@Z ^= m]
+ retract(second argument r)@Z ~= m]
lv := [nv ** (n / (retract(second argument r)@Z::Q)) for r in l]
[eval(f, l, lv), l, lv]
@@ -362,8 +362,8 @@ ElementaryFunctionStructurePackage(R,F): Exports == Implementation where
tannosimp(f, lk, k, v, fns, c)
v0 := retract(inv qelt(v, rec.index))@Z
lv := [qelt(v, i) for i in minIndex v .. maxIndex v |
- i ^= rec.index]$List(Q)
- l := [kk for kk in lk | kk ^= rec.ker]
+ i ~= rec.index]$List(Q)
+ l := [kk for kk in lk | kk ~= rec.ker]
g := tanSum(-v0 * c, concat(tanNa(k::F, v0),
[tanNa(x, - retract(a * v0)@Z) for a in lv for x in toV l]))
[eval(f, [rec.ker], [g]), [rec.ker], [g]]
@@ -407,7 +407,7 @@ ElementaryFunctionStructurePackage(R,F): Exports == Implementation where
rischNormalize(f, v) ==
empty?(ker := varselect(tower f, v)) => [f, empty(), empty()]
- first(ker) ^= kernel(v)@K => error "Cannot happen"
+ first(ker) ~= kernel(v)@K => error "Cannot happen"
ker := rest ker
(n := (#ker)::Z - 1) < 1 => [f, empty(), empty()]
for i in 1..n for kk in rest ker repeat
@@ -466,8 +466,8 @@ ElementaryFunctionStructurePackage(R,F): Exports == Implementation where
expnosimp(f, lk, k, v, fns, exp g)
v0 := retract(inv qelt(v, rec.index))@Z
lv := [qelt(v, i) for i in minIndex v .. maxIndex v |
- i ^= rec.index]$List(Q)
- l := [kk for kk in lk | kk ^= rec.ker]
+ i ~= rec.index]$List(Q)
+ l := [kk for kk in lk | kk ~= rec.ker]
h :F := */[exp(z) ** (- retract(a * v0)@Z) for a in lv for z in toY l]
h := h * exp(-v0 * g) * (k::F) ** v0
[eval(f, [rec.ker], [h]), [rec.ker], [h]]
@@ -641,7 +641,7 @@ InnerTrigonometricManipulations(R,F,FG): Exports == Implementation where
supexp(p, f1, f2, bse) ==
ans:GF := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
g := explogs2trigs(leadingCoefficient(p)::FG)
if ((d := degree(p)::Z - bse) >= 0) then
ans := ans + g * f1 ** d
diff --git a/src/algebra/eigen.spad.pamphlet b/src/algebra/eigen.spad.pamphlet
index 193b58f9..e9ab3b7a 100644
--- a/src/algebra/eigen.spad.pamphlet
+++ b/src/algebra/eigen.spad.pamphlet
@@ -137,7 +137,7 @@ EigenPackage(R) : C == T
tff(p:SUF,x:SE) : F ==
degree p=0 => leadingCoefficient p
r:F:=0$F
- while p^=0 repeat
+ while p~=0 repeat
r:=r+fft(p,x)
p := reductum p
r
@@ -153,7 +153,7 @@ EigenPackage(R) : C == T
---- characteristic polynomial ----
charpol(A:M,x:SE) : F ==
dimA :PI := (nrows A):PI
- dimA ^= ncols A => error " The matrix is not square"
+ dimA ~= ncols A => error " The matrix is not square"
B:M:=zero(dimA,dimA)
for i in 1..dimA repeat
for j in 1..dimA repeat B(i,j):=A(i,j)
@@ -286,7 +286,7 @@ CharacteristicPolynomialPackage(R:CommutativeRing):C == T where
---- characteristic polynomial ----
characteristicPolynomial(A:M,v:R) : R ==
dimA :PI := (nrows A):PI
- dimA ^= ncols A => error " The matrix is not square"
+ dimA ~= ncols A => error " The matrix is not square"
B:M:=zero(dimA,dimA)
for i in 1..dimA repeat
for j in 1..dimA repeat B(i,j):=A(i,j)
diff --git a/src/algebra/elemntry.spad.pamphlet b/src/algebra/elemntry.spad.pamphlet
index 8ddc8e52..52da98a3 100644
--- a/src/algebra/elemntry.spad.pamphlet
+++ b/src/algebra/elemntry.spad.pamphlet
@@ -660,8 +660,8 @@ 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
+ ((num1 := ((num := numer x) = 1)) 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/expr.spad.pamphlet b/src/algebra/expr.spad.pamphlet
index 93324931..b781f423 100644
--- a/src/algebra/expr.spad.pamphlet
+++ b/src/algebra/expr.spad.pamphlet
@@ -257,7 +257,7 @@ Expression(R:OrderedSet): Exports == Implementation where
noalg?: SUP % -> Boolean
noalg? p ==
- while p ^= 0 repeat
+ while p ~= 0 repeat
not empty? algkernels kernels leadingCoefficient p => return false
p := reductum p
true
@@ -810,7 +810,7 @@ Pi(): Exports == Implementation where
p2p p ==
ans:PZ := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
ans := ans + monomial(leadingCoefficient(p)::PZ, sympi, degree p)
p := reductum p
ans
diff --git a/src/algebra/ffcat.spad.pamphlet b/src/algebra/ffcat.spad.pamphlet
index f8047d80..3821e9a5 100644
--- a/src/algebra/ffcat.spad.pamphlet
+++ b/src/algebra/ffcat.spad.pamphlet
@@ -344,7 +344,7 @@ FiniteAlgebraicExtensionField(F : Field) : Category == _
-- norm(e) == norm(e,1) pretend F
-- trace(e) == trace(e,1) pretend F
minimalPolynomial(a,n) ==
- extensionDegree()@PI rem n ^= 0 =>
+ extensionDegree()@PI rem n ~= 0 =>
error "minimalPolynomial: 2. argument must divide extension degree"
f:SUP $:=monomial(1,1)$(SUP $) - monomial(a,0)$(SUP $)
u:$:=Frobenius(a,n)
@@ -387,7 +387,7 @@ FiniteAlgebraicExtensionField(F : Field) : Category == _
degree a ==
y:$:=Frobenius a
deg:PI:=1
- while y^=a repeat
+ while y~=a repeat
y := Frobenius(y)
deg:=deg+1
deg
@@ -1409,7 +1409,7 @@ FiniteFieldSolveLinearPolynomialEquation(F:FiniteFieldCategory,
p: FPP
import DistinctDegreeFactorize(F,FP)
solveLinearPolynomialEquation(lp,p) ==
- if (oldlp ^= lp) then
+ if (oldlp ~= lp) then
-- we have to generate a new table
deg:= +/[degree u for u in lp]
ans:Union(Vector List FPP,"failed"):="failed"
diff --git a/src/algebra/ffcg.spad.pamphlet b/src/algebra/ffcg.spad.pamphlet
index a2667c0f..212bc91b 100644
--- a/src/algebra/ffcg.spad.pamphlet
+++ b/src/algebra/ffcg.spad.pamphlet
@@ -185,7 +185,7 @@ FiniteFieldCyclicGroupExtensionByPolynomial(GF,defpol):_
void()$Void
basis(n:PI) ==
- extensionDegree() rem n ^= 0 =>
+ extensionDegree() rem n ~= 0 =>
error("argument must divide extension degree")
m:=sizeCG quo (size()$GF**n-1)
[index((1+i*m) ::PI) for i in 0..(n-1)]::Vector $
diff --git a/src/algebra/fff.spad.pamphlet b/src/algebra/fff.spad.pamphlet
index 858b9505..0cfca8d4 100644
--- a/src/algebra/fff.spad.pamphlet
+++ b/src/algebra/fff.spad.pamphlet
@@ -145,18 +145,18 @@ FiniteFieldFunctions(GF): Exports == Implementation where
lvj:M I:=zero(k::NNI,n)
for v in 1..k repeat
for j in 1..n repeat
- if (j^=jt) or (v^=vt) then
+ if (j~=jt) or (v~=vt) then
help:PF(p1):=t**(v-1)*pkn**(j-1)+1@PF(p1)
setelt(lvj,v,j,vec.(help pretend I +1))
for j in 1..n repeat
- if j^=jt then
+ if j~=jt then
for v in 1..k repeat
lvjh:=elt(lvj,v,j)
setelt(multmat,j,lvjh,elt(multmat,j,lvjh)+1)
for i in 1..n repeat
setelt(multmat,jt,i,positiveRemainder(-k,p)::PF(p))
for v in 1..k repeat
- if v^=vt then
+ if v~=vt then
lvjh:=elt(lvj,v,jt)
setelt(multmat,jt,lvjh,elt(multmat,jt,lvjh)+1)
-- multmat
@@ -166,7 +166,7 @@ FiniteFieldFunctions(GF): Exports == Implementation where
l:L TERM:=nil()$(L TERM)
v:V PF(p):=row(multmat,i)
for j in (1::I)..(m::I) repeat
- if (v.j ^= 0) then
+ if (v.j ~= 0) then
-- take -v.j to get trace 1 instead of -1
term:TERM:=[(convert(-v.j)@I)::GF,(j-2) pretend SI]$TERM
l:=cons(term,l)$(L TERM)
@@ -203,7 +203,7 @@ FiniteFieldFunctions(GF): Exports == Implementation where
setColumn_!(mat,2,Vectorise(h)$MM)$(M GF)
for i in 2..m1 repeat
g:=0$MM
- while h ^= 0 repeat
+ while h ~= 0 repeat
g:=g + leadingCoefficient(h) * qpow.degree(h)$MM
h:=reductum(h)$MM
qexp.i:=g
@@ -219,7 +219,7 @@ FiniteFieldFunctions(GF): Exports == Implementation where
l:L TERM:=nil()$(L TERM)
v:V GF:=mat *$(M GF) Vectorise(qexp.(i-1) *$MM qexp.0)$MM
for j in (1::SI)..(m::SI) repeat
- if (v.j ^= 0$GF) then
+ if (v.j ~= 0$GF) then
term:TERM:=[(v.j),j-(2::SI)]$TERM
l:=cons(term,l)$(L TERM)
qsetelt_!(multtable,i,copy l)$(V L TERM)
diff --git a/src/algebra/ffhom.spad.pamphlet b/src/algebra/ffhom.spad.pamphlet
index 50bf7ef1..6195d5b6 100644
--- a/src/algebra/ffhom.spad.pamphlet
+++ b/src/algebra/ffhom.spad.pamphlet
@@ -98,7 +98,7 @@ FiniteFieldHomomorphisms(F1,GF,F2): Exports == Implementation where
-- a necessary condition for the one field being an subfield of
-- the other one is, that the respective extension degrees are
-- multiples
- if max(degree1,degree2) rem min(degree1,degree2) ^= 0 then
+ if max(degree1,degree2) rem min(degree1,degree2) ~= 0 then
error "FFHOM: one extension degree must divide the other one"
conMat1to2:M:= zero(degree2,degree1)$M
@@ -349,7 +349,7 @@ FiniteFieldHomomorphisms(F1,GF,F2): Exports == Implementation where
-- whether the element is in the subfield of the 'bigger' field, which
-- corresponds to the 'smaller' field
if degree1 > degree2 then
- if positiveRemainder(degree2,degree(x)$F1)^= 0 then
+ if positiveRemainder(degree2,degree(x)$F1)~= 0 then
error "coerce: element doesn't belong to smaller field"
represents(conMat1to2 *$(Matrix GF) coordinates(x)$F1)$F2
@@ -381,7 +381,7 @@ FiniteFieldHomomorphisms(F1,GF,F2): Exports == Implementation where
convertWRTdifferentDefPol21(x:F2) ==
if init? then initialize()
if degree2 > degree1 then
- if positiveRemainder(degree1,degree(x)$F2)^= 0 then
+ if positiveRemainder(degree1,degree(x)$F2)~= 0 then
error "coerce: element doesn't belong to smaller field"
represents(conMat2to1 *$(Matrix GF) coordinates(x)$F2)$F1
diff --git a/src/algebra/ffnb.spad.pamphlet b/src/algebra/ffnb.spad.pamphlet
index 032c3501..b342f19e 100644
--- a/src/algebra/ffnb.spad.pamphlet
+++ b/src/algebra/ffnb.spad.pamphlet
@@ -238,7 +238,7 @@ InnerNormalBasisFieldFunctions(GF): Exports == Implementation where
else erg:VGF:=plist.(first(l))
i:SI:=k
for j in rest(l) repeat
- if j^=0 then erg:=erg *$$ qPot(plist.j,i)$$
+ if j~=0 then erg:=erg *$$ qPot(plist.j,i)$$
i:=i+k
erg
@@ -517,7 +517,7 @@ FiniteFieldNormalBasisExtensionByPolynomial(GF,uni): Exports == _
degree(a) ==
d:PI:=1
b:= qPot(a::Rep,1)$INBFF
- while (b^=a) repeat
+ while (b~=a) repeat
b:= qPot(b::Rep,1)$INBFF
d:=d+1
d
@@ -552,7 +552,7 @@ FiniteFieldNormalBasisExtensionByPolynomial(GF,uni): Exports == _
norm(a:$) == retract norm(a,1)
generator() == normalElement(extdeg)$INBFF
basis(n:PI) ==
- (extdeg rem n) ^= 0 => error "argument must divide extension degree"
+ (extdeg rem n) ~= 0 => error "argument must divide extension degree"
[Frobenius(trace(normalElement,n),i) for i in 0..(n-1)]::(Vector $)
a:GF * x:$ == a *$Rep x
diff --git a/src/algebra/ffp.spad.pamphlet b/src/algebra/ffp.spad.pamphlet
index 2d97d795..9b38f959 100644
--- a/src/algebra/ffp.spad.pamphlet
+++ b/src/algebra/ffp.spad.pamphlet
@@ -126,7 +126,7 @@ FiniteFieldExtensionByPolynomial(GF:FiniteFieldCategory,_
initializeElt: () -> Void
initializeLog: () -> Void
basis(n:PI) ==
- (extdeg rem n) ^= 0 => error "argument must divide extension degree"
+ (extdeg rem n) ~= 0 => error "argument must divide extension degree"
a:$:=norm(primitiveElement(),n)
vector [a**i for i in 0..n-1]
diff --git a/src/algebra/ffpoly.spad.pamphlet b/src/algebra/ffpoly.spad.pamphlet
index eba95386..acebb710 100644
--- a/src/algebra/ffpoly.spad.pamphlet
+++ b/src/algebra/ffpoly.spad.pamphlet
@@ -240,7 +240,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
qexp.1:=h
for i in 2..m1 repeat
g:=0$SUP
- while h ^= 0 repeat
+ while h ~= 0 repeat
g:=g + leadingCoefficient(h) * qpow.degree(h)
h:=reductum(h)
qexp.i:=(h:=g)
@@ -282,7 +282,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- -- determine the multiplicative order of q modulo n
-- e : PI := 1
-- qe : PI := q
--- while (qe rem n) ^= 1 repeat
+-- while (qe rem n) ~= 1 repeat
-- e := e + 1
-- qe := qe * q
-- ((qe - 1) ** ((eulerPhi(n) quo e) pretend PI) ) pretend PI
@@ -345,7 +345,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- determine the multiplicative order of q modulo d
e : PI := 1
qe : PI := q
- while (qe rem d) ^= 1 repeat
+ while (qe rem d) ~= 1 repeat
e := e + 1
qe := qe * q
prod := prod * _
@@ -361,7 +361,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- (cf. [LN] p.89, Th. 3.16, and p.87, following Th. 3.11)
n : NNI := degree f
n = 0 => false
- leadingCoefficient f ^= 1 => false
+ leadingCoefficient f ~= 1 => false
coefficient(f, 0) = 0 => false
q : PI := sizeGF
qn1: PI := (q**n - 1) :: NNI :: PI
@@ -371,7 +371,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- may be improved by tabulating the residues x**(i*q)
-- for i = 0,...,n-1 :
--
- lift(x ** qn1)$MM ^= 1 => false -- X**(q**n - 1) rem f in GF[X]
+ lift(x ** qn1)$MM ~= 1 => false -- X**(q**n - 1) rem f in GF[X]
lrec : L Record(factor:I, exponent:I) := factors(factor qn1)
lfact : L PI := [] -- collect the prime factors
for rec in lrec repeat -- of q**n - 1
@@ -387,7 +387,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- x, x**q, ... , x**(q**(n-1)) are linearly independent over GF
n : NNI := degree f
n = 0 => false
- leadingCoefficient f ^= 1 => false
+ leadingCoefficient f ~= 1 => false
coefficient(f, 0) = 0 => false
n = 1 => true
not irreducible? f => false
@@ -428,7 +428,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
n : NNI := degree f
n = 0 => error "polynomial must have positive degree"
-- make f monic
- if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f
+ if (lcf := leadingCoefficient f) ~= 1 then f := (inv lcf) * f
-- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero
-- then fRepr := [[n,fn], ... , [i0,f{i0}]]
fRepr : Repr := f pretend Repr
@@ -438,7 +438,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- a new value to one of its records
for term in fRepr repeat
fcopy := cons(copy term, fcopy)
- if term.expnt ^= 0 then
+ if term.expnt ~= 0 then
fcopy := cons([0,0]$Rec, fcopy)
tailpol : Repr := []
headpol : Repr := fcopy -- [[0,f0], ... , [n,fn]] where
@@ -505,7 +505,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
n : NNI := degree f
n = 0 => error "polynomial must have positive degree"
-- make f monic
- if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f
+ if (lcf := leadingCoefficient f) ~= 1 then f := (inv lcf) * f
-- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero
-- then fRepr := [[n,fn], ... , [i0,f{i0}]]
fRepr : Repr := f pretend Repr
@@ -515,7 +515,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- a new value to one of its records
for term in fRepr repeat
fcopy := cons(copy term, fcopy)
- if term.expnt ^= 0 then
+ if term.expnt ~= 0 then
term := [0,0]$Rec
fcopy := cons(term, fcopy)
fcopy := reverse fcopy
@@ -624,7 +624,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
n : NNI := degree f
n = 0 => error "polynomial must have positive degree"
-- make f monic
- if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f
+ if (lcf := leadingCoefficient f) ~= 1 then f := (inv lcf) * f
-- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero
-- then fRepr := [[n,fn], ... , [i0,f{i0}]]
fRepr : Repr := f pretend Repr
@@ -634,7 +634,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- a new value to one of its records
for term in fRepr repeat
fcopy := cons(copy term, fcopy)
- if term.expnt ^= 0 then
+ if term.expnt ~= 0 then
term := [0,0]$Rec
fcopy := cons(term, fcopy)
fcopy := reverse fcopy -- [[n,1], [r,fr], ... , [0,f0]]
@@ -737,7 +737,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
n : NNI := degree f
n = 0 => error "polynomial must have positive degree"
-- make f monic
- if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f
+ if (lcf := leadingCoefficient f) ~= 1 then f := (inv lcf) * f
-- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero
-- then fRepr := [[n,fn], ... , [i0,f{i0}]]
fRepr : Repr := f pretend Repr
@@ -747,7 +747,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- a new value to one of its records
for term in fRepr repeat
fcopy := cons(copy term, fcopy)
- if term.expnt ^= 0 then
+ if term.expnt ~= 0 then
term := [0,0]$Rec
fcopy := cons(term, fcopy)
fcopy := reverse fcopy -- [[n,1], [r,fr], ... , [0,f0]]
@@ -958,7 +958,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- expt : NNI := #ragits
-- for i in ragits repeat
-- expt := (expt - 1) :: NNI
--- if i ^= 0 then pol := pol + monomial(index(i::PI)$GF, expt)
+-- if i ~= 0 then pol := pol + monomial(index(i::PI)$GF, expt)
-- pol
-- random == qAdicExpansion(random()$I)
@@ -967,7 +967,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
-- pol := monomial(1,n)$SUP
-- n1 : NNI := (n - 1) :: NNI
-- for i in 0..n1 repeat
--- if (c := random()$GF) ^= 0 then
+-- if (c := random()$GF) ~= 0 then
-- pol := pol + monomial(c, i)$SUP
-- pol
@@ -975,7 +975,7 @@ FiniteFieldPolynomialPackage GF : Exports == Implementation where
polRepr : Repr := []
n1 : NNI := (n - 1) :: NNI
for i in 0..n1 repeat
- if (c := random()$GF) ^= 0 then
+ if (c := random()$GF) ~= 0 then
polRepr := cons([i, c]$Rec, polRepr)
cons([n, 1$GF]$Rec, polRepr) pretend SUP
diff --git a/src/algebra/ffpoly2.spad.pamphlet b/src/algebra/ffpoly2.spad.pamphlet
index 1271362a..0c76a98c 100644
--- a/src/algebra/ffpoly2.spad.pamphlet
+++ b/src/algebra/ffpoly2.spad.pamphlet
@@ -108,7 +108,7 @@ FiniteFieldPolynomialPackage2(F,GF):Exports == Implementation where
h:=gcd(stillToFactor,trModp +$(SUP F) _
(index(j pretend PI)$GF::F::(SUP F)))$(SUP F)
-- make the gcd polynomial monic
- if leadingCoefficient(h)$(SUP F) ^= 1$F then
+ if leadingCoefficient(h)$(SUP F) ~= 1$F then
h:= (inv leadingCoefficient(h)) * h
degh:=degree(h)$(SUP F)
degSTF:=degree(stillToFactor)$(SUP F)
diff --git a/src/algebra/files.spad.pamphlet b/src/algebra/files.spad.pamphlet
index 591bb1a0..f331e958 100644
--- a/src/algebra/files.spad.pamphlet
+++ b/src/algebra/files.spad.pamphlet
@@ -130,20 +130,20 @@ File(S:SetCategory): FileCategory(FileName, S) with
iomode f ==
f.fileIOmode
read_! f ==
- f.fileIOmode ^= "input" =>
+ f.fileIOmode ~= "input" =>
error "File not in read state"
x := VMREAD(f.fileState)$Lisp
PLACEP(x)$Lisp =>
error "End of file"
x
readIfCan_! f ==
- f.fileIOmode ^= "input" =>
+ f.fileIOmode ~= "input" =>
error "File not in read state"
x: S := VMREAD(f.fileState)$Lisp
PLACEP(x)$Lisp => "failed"
x
write_!(f, x) ==
- f.fileIOmode ^= "output" =>
+ f.fileIOmode ~= "output" =>
error "File not in write state"
z := PRINT_-FULL(x, f.fileState)$Lisp
TERPRI(f.fileState)$Lisp
@@ -210,25 +210,25 @@ TextFile: Cat == Def where
readIfCan_! f == readLineIfCan_! f
readLine_! f ==
- f.fileIOmode ^= "input" => error "File not in read state"
+ f.fileIOmode ~= "input" => error "File not in read state"
s: String := read_-line(f.fileState)$Lisp
PLACEP(s)$Lisp => error "End of file"
s
readLineIfCan_! f ==
- f.fileIOmode ^= "input" => error "File not in read state"
+ f.fileIOmode ~= "input" => error "File not in read state"
s: String := read_-line(f.fileState)$Lisp
PLACEP(s)$Lisp => "failed"
s
write_!(f, x) ==
- f.fileIOmode ^= "output" => error "File not in write state"
+ f.fileIOmode ~= "output" => error "File not in write state"
PRINTEXP(x, f.fileState)$Lisp
x
writeLine_! f ==
- f.fileIOmode ^= "output" => error "File not in write state"
+ f.fileIOmode ~= "output" => error "File not in write state"
TERPRI(f.fileState)$Lisp
""
writeLine_!(f, x) ==
- f.fileIOmode ^= "output" => error "File not in write state"
+ f.fileIOmode ~= "output" => error "File not in write state"
PRINTEXP(x, f.fileState)$Lisp
TERPRI(f.fileState)$Lisp
x
@@ -316,12 +316,12 @@ BinaryFile: Cat == Def where
error "file must be in read or write state"
read! f ==
- f.fileIOmode ^= "input" => error "File not in read state"
+ f.fileIOmode ~= "input" => error "File not in read state"
BINARY__SELECT__INPUT(f.fileState)$Lisp
BINARY__READBYTE()$Lisp
-- READ_-BYTE(f.fileState)$Lisp
readIfCan_! f ==
- f.fileIOmode ^= "input" => error "File not in read state"
+ f.fileIOmode ~= "input" => error "File not in read state"
BINARY__SELECT__INPUT(f.fileState)$Lisp
n:SingleInteger:=BINARY__READBYTE()$Lisp
n = -1 => "failed"
@@ -329,7 +329,7 @@ BinaryFile: Cat == Def where
-- READ_-BYTE(f.fileState,NIL$Lisp,
-- "failed"::Union(SingleInteger,"failed"))$Lisp
write_!(f, x) ==
- f.fileIOmode ^= "output" => error "File not in write state"
+ f.fileIOmode ~= "output" => error "File not in write state"
x < 0 or x>255 => error "integer cannot be represented as a byte"
BINARY__PRINBYTE(x)$Lisp
-- WRITE_-BYTE(x, f.fileState)$Lisp
@@ -337,10 +337,10 @@ BinaryFile: Cat == Def where
-- # f == FILE_-LENGTH(f.fileState)$Lisp
position f ==
- f.fileIOmode ^= "input" => error "file must be in read state"
+ f.fileIOmode ~= "input" => error "file must be in read state"
FILE_-POSITION(f.fileState)$Lisp
position_!(f,i) ==
- f.fileIOmode ^= "input" => error "file must be in read state"
+ f.fileIOmode ~= "input" => error "file must be in read state"
(FILE_-POSITION(f.fileState,i)$Lisp ; i)
@
@@ -415,24 +415,24 @@ KeyedAccessFile(Entry): KAFcategory == KAFcapsule where
[fname, defstream(fname, mode), mode]
reopen_!(f, mode) ==
close_! f
- if mode ^= "closed" then
+ if mode ~= "closed" then
f.fileState := defstream(f.fileName, mode)
f.fileIOmode := mode
f
close_! f ==
- if f.fileIOmode ^= "closed" then
+ if f.fileIOmode ~= "closed" then
RSHUT(f.fileState)$Lisp
f.fileIOmode := "closed"
f
read_! f ==
- f.fileIOmode ^= "input" => error ["File not in read state",f]
+ f.fileIOmode ~= "input" => error ["File not in read state",f]
ks: List Symbol := RKEYIDS(f.fileName)$Lisp
null ks => error ["Attempt to read empty file", f]
ix := random()$Integer rem #ks
k: String := PNAME(ks.ix)$Lisp
[k, SPADRREAD(k, f.fileState)$Lisp]
write_!(f, pr) ==
- f.fileIOmode ^= "output" => error ["File not in write state",f]
+ f.fileIOmode ~= "output" => error ["File not in write state",f]
SPADRWRITE(pr.key, pr.entry, f.fileState)$Lisp
pr
name f ==
diff --git a/src/algebra/float.spad.pamphlet b/src/algebra/float.spad.pamphlet
index 3f5753f7..58606834 100644
--- a/src/algebra/float.spad.pamphlet
+++ b/src/algebra/float.spad.pamphlet
@@ -129,7 +129,7 @@ Float():
++ normalize(x) normalizes x at current precision.
relerror : (%, %) -> I
++ relerror(x,y) computes the absolute value of \spad{x - y} divided by
- ++ y, when \spad{y \^= 0}.
+ ++ y, when \spad{y \~= 0}.
shift: (%, I) -> %
++ shift(x,n) adds n to the exponent of float x.
rationalApproximation: (%, N) -> RN
@@ -313,7 +313,7 @@ Float():
s:I := d:I := shift(1,p)
y := times(x,x)
t := m := - shift2(y.mantissa,y.exponent+p)
- for i in 3.. by 2 while t ^= 0 repeat
+ for i in 3.. by 2 while t ~= 0 repeat
s := s + t quo i
t := (m * t) quo d
x * [s,-p]
@@ -326,7 +326,7 @@ Float():
e:I := bits() + LENGTH bits() + LENGTH n + 1
s:I := shift(1,e) quo n
t:I := s quo n2
- for k in 3.. by 2 while t ^= 0 repeat
+ for k in 3.. by 2 while t ~= 0 repeat
s := s + t quo k
t := t quo n2
normalize [s,-e]
@@ -354,7 +354,7 @@ Float():
s:I := d:I := shift(1,p)
m:I := - shift2(y.mantissa,y.exponent+p)
t:I := m quo 6
- for i in 4.. by 2 while t ^= 0 repeat
+ for i in 4.. by 2 while t ~= 0 repeat
s := s + t
t := (m * t) quo (i*(i+1))
t := t quo d
@@ -391,7 +391,7 @@ Float():
s:I := d:I := shift(1,p)
m:I := - shift2(y.mantissa,y.exponent+p)
t:I := m quo 2
- for i in 3.. by 2 while t ^= 0 repeat
+ for i in 3.. by 2 while t ~= 0 repeat
s := s + t
t := (m * t) quo (i*(i+1))
t := t quo d
@@ -423,7 +423,7 @@ Float():
t:I := shift(1,n) quo 882
d:I := 4*882**2
s:I := 0
- for i in 2.. by 2 for j in 1123.. by 21460 while t ^= 0 repeat
+ for i in 2.. by 2 for j in 1123.. by 21460 while t ~= 0 repeat
s := s + j*t
m := -(i-1)*(2*i-1)*(2*i-3)
t := (m*t) quo (d*i**3)
@@ -495,7 +495,7 @@ Float():
s:I := d:I := shift(1,p)
z := times(y,y)
t := m := shift2(z.mantissa,z.exponent+p)
- for i in 3.. by 2 while t ^= 0 repeat
+ for i in 3.. by 2 while t ~= 0 repeat
s := s + t quo i
t := m * t quo d
y * [s,1-p]
@@ -509,7 +509,7 @@ Float():
n := n + LENGTH n + 3 -- guard bits
s:I := shift(1,n+1) quo 3
t:I := s quo 9
- for k in 3.. by 2 while t ^= 0 repeat
+ for k in 3.. by 2 while t ~= 0 repeat
s := s + t quo k
t := t quo 9
L2 := [bits(),[s,-n]]
@@ -524,7 +524,7 @@ Float():
n := n + LENGTH n + 5 -- guard bits
s:I := shift(1,n+1) quo 9
t:I := s quo 81
- for k in 3.. by 2 while t ^= 0 repeat
+ for k in 3.. by 2 while t ~= 0 repeat
s := s + t quo k
t := t quo 81
-- We have log 10 = log 5 + log 2 and log 5/4 = log 5 - 2 log 2
@@ -537,7 +537,7 @@ Float():
exp(x) ==
-- exp(n+x) = exp(1)**n exp(x) for n such that |x| < 1
p := bits(); inc 5; e1:% := 1
- if (n := wholePart x) ^= 0 then
+ if (n := wholePart x) ~= 0 then
inc LENGTH n; e1 := exp1 ** n; dec LENGTH n
x := fractionPart x
if zero? x then (bits p; return normalize e1)
@@ -557,7 +557,7 @@ Float():
p := bits() + LENGTH bits() + 1
s:I := d:I := shift(1,p)
t:I := n:I := shift2(x.mantissa,x.exponent+p)
- for i in 2.. while t ^= 0 repeat
+ for i in 2.. while t ~= 0 repeat
s := s + t
t := (n * t) quo i
t := t quo d
@@ -871,7 +871,7 @@ Float():
d := if OUTPREC() = -1 then digits::I else OUTPREC()
-- g := convert10(abs f,digits); m := g.mantissa; e := g.exponent
g := convert10(abs f,d); m := g.mantissa; e := g.exponent
- if OUTPREC() ^= -1 then
+ if OUTPREC() ~= -1 then
-- round g to OUTPREC digits after the decimal point
l := length10 m
if -e > OUTPREC() and -e < 2*digits::I then
@@ -919,7 +919,7 @@ Float():
zero? exponent f =>
d := d + 1
s := convert(mantissa f)@S
- OUTPREC() ^= -1 and (e := #s) > d =>
+ OUTPREC() ~= -1 and (e := #s) > d =>
t:S := if zero? SPACING() then "E" else " E "
concat ["0.", padFromLeft s, t, convert(e)@S]
padFromRight concat(s, ".0")
diff --git a/src/algebra/formula.spad.pamphlet b/src/algebra/formula.spad.pamphlet
index b5668638..51506fc6 100644
--- a/src/algebra/formula.spad.pamphlet
+++ b/src/algebra/formula.spad.pamphlet
@@ -289,22 +289,22 @@ ScriptFormulaFormat(): public == private where
args := rest args
null args => concat form
tmp : S := formatFormula(first args, minPrec)
- if tmp ^= "" then form := append(form,[" sub ",tmp])$(List S)
+ if tmp ~= "" then form := append(form,[" sub ",tmp])$(List S)
-- superscripts
args := rest args
null args => group concat form
tmp : S := formatFormula(first args, minPrec)
- if tmp ^= "" then form := append(form,[" sup ",tmp])$(List S)
+ if tmp ~= "" then form := append(form,[" sup ",tmp])$(List S)
-- presuperscripts
args := rest args
null args => group concat form
tmp : S := formatFormula(first args, minPrec)
- if tmp ^= "" then form := append(form,[" presup ",tmp])$(List S)
+ if tmp ~= "" then form := append(form,[" presup ",tmp])$(List S)
-- presubscripts
args := rest args
null args => group concat form
tmp : S := formatFormula(first args, minPrec)
- if tmp ^= "" then form := append(form,[" presub ",tmp])$(List S)
+ if tmp ~= "" then form := append(form,[" presub ",tmp])$(List S)
group concat form
op = "MATRIX" => formatMatrix rest args
-- op = "ZAG" =>
@@ -318,7 +318,7 @@ ScriptFormulaFormat(): public == private where
p < 1 => error "unknown Script Formula Formatter unary op"
opPrec := plexPrecs.p
n : I := #args
- (n ^= 2) and (n ^= 3) => error "wrong number of arguments for plex"
+ (n ~= 2) and (n ~= 3) => error "wrong number of arguments for plex"
s : S :=
op = "SIGMA" => "sum"
op = "PI" => "product"
@@ -327,12 +327,12 @@ ScriptFormulaFormat(): public == private where
"????"
hold := formatFormula(first args,minPrec)
args := rest args
- if op ^= "INDEFINTEGRAL" then
- if hold ^= "" then
+ if op ~= "INDEFINTEGRAL" then
+ if hold ~= "" then
s := concat [s," from",group concat ["\displaystyle ",hold]]
if not null rest args then
hold := formatFormula(first args,minPrec)
- if hold ^= "" then
+ if hold ~= "" then
s := concat [s," to",group concat ["\displaystyle ",hold]]
args := rest args
s := concat [s," ",formatFormula(first args,minPrec)]
diff --git a/src/algebra/fortran.spad.pamphlet b/src/algebra/fortran.spad.pamphlet
index c8d73e94..cf46d763 100644
--- a/src/algebra/fortran.spad.pamphlet
+++ b/src/algebra/fortran.spad.pamphlet
@@ -773,7 +773,7 @@ FortranProgram(name,returnType,arguments,symbols): Exports == Implement where
checkVariables(user:List Symbol,target:List Symbol):Void ==
-- We don't worry about whether the user has subscripted the
-- variables or not.
- setDifference(map(name$Symbol,user),target) ^= empty()$List(Symbol) =>
+ setDifference(map(name$Symbol,user),target) ~= empty()$List(Symbol) =>
s1 : String := mkString(user)
s2 : String := mkString(target)
error ["Incompatible variable lists:", s1, s2]
@@ -788,7 +788,7 @@ FortranProgram(name,returnType,arguments,symbols): Exports == Implement where
retractIfCan(lhs u)@Union(Kernel(EXPR MINT),"failed") case "failed" =>
error "left hand side is not a kernel"
vList : List Symbol := variables lhs u
- #vList ^= #arguments =>
+ #vList ~= #arguments =>
error "Incorrect number of arguments"
veList : List EXPR MINT := [w::EXPR(MINT) for w in vList]
aeList : List EXPR MINT := [w::EXPR(MINT) for w in arguments]
@@ -805,7 +805,7 @@ FortranProgram(name,returnType,arguments,symbols): Exports == Implement where
retractIfCan(lhs u)@Union(Kernel(EXPR MFLOAT),"failed") case "failed" =>
error "left hand side is not a kernel"
vList : List Symbol := variables lhs u
- #vList ^= #arguments =>
+ #vList ~= #arguments =>
error "Incorrect number of arguments"
veList : List EXPR MFLOAT := [w::EXPR(MFLOAT) for w in vList]
aeList : List EXPR MFLOAT := [w::EXPR(MFLOAT) for w in arguments]
@@ -822,7 +822,7 @@ FortranProgram(name,returnType,arguments,symbols): Exports == Implement where
retractIfCan(lhs u)@Union(Kernel EXPR MCMPLX,"failed") case "failed"=>
error "left hand side is not a kernel"
vList : List Symbol := variables lhs u
- #vList ^= #arguments =>
+ #vList ~= #arguments =>
error "Incorrect number of arguments"
veList : List EXPR MCMPLX := [w::EXPR(MCMPLX) for w in vList]
aeList : List EXPR MCMPLX := [w::EXPR(MCMPLX) for w in arguments]
@@ -852,7 +852,7 @@ FortranProgram(name,returnType,arguments,symbols): Exports == Implement where
retractIfCan(lhs u)@Union(Kernel(EXPR INT),"failed") case "failed" =>
error "left hand side is not a kernel"
vList : List Symbol := variables lhs u
- #vList ^= #arguments =>
+ #vList ~= #arguments =>
error "Incorrect number of arguments"
veList : List EXPR INT := [w::EXPR(INT) for w in vList]
aeList : List EXPR INT := [w::EXPR(INT) for w in arguments]
@@ -869,7 +869,7 @@ FortranProgram(name,returnType,arguments,symbols): Exports == Implement where
retractIfCan(lhs u)@Union(Kernel(EXPR Float),"failed") case "failed" =>
error "left hand side is not a kernel"
vList : List Symbol := variables lhs u
- #vList ^= #arguments =>
+ #vList ~= #arguments =>
error "Incorrect number of arguments"
veList : List EXPR Float := [w::EXPR(Float) for w in vList]
aeList : List EXPR Float := [w::EXPR(Float) for w in arguments]
@@ -886,7 +886,7 @@ FortranProgram(name,returnType,arguments,symbols): Exports == Implement where
retractIfCan(lhs u)@Union(Kernel EXPR CMPX Float,"failed") case "failed"=>
error "left hand side is not a kernel"
vList : List Symbol := variables lhs u
- #vList ^= #arguments =>
+ #vList ~= #arguments =>
error "Incorrect number of arguments"
veList : List EXPR CMPX Float := [w::EXPR(CMPX Float) for w in vList]
aeList : List EXPR CMPX Float := [w::EXPR(CMPX Float) for w in arguments]
diff --git a/src/algebra/fr.spad.pamphlet b/src/algebra/fr.spad.pamphlet
index fc180573..4e5df0b9 100644
--- a/src/algebra/fr.spad.pamphlet
+++ b/src/algebra/fr.spad.pamphlet
@@ -187,7 +187,7 @@ Factored(R: IntegralDomain): Exports == Implementation where
-- l := concat(convert(rec.fctr)@InputForm, l)
-- l := concat(convert(rec.fctr)@InputForm ** rec.xpnt, l)
empty? l => convert(unit x)@InputForm
- if unit x ^= 1 then l := concat(convert(unit x)@InputForm,l)
+ if unit x ~= 1 then l := concat(convert(unit x)@InputForm,l)
empty? rest l => first l
binary(convert(_*::Symbol)@InputForm, l)@InputForm
diff --git a/src/algebra/free.spad.pamphlet b/src/algebra/free.spad.pamphlet
index 95e17711..9dbf0ea5 100644
--- a/src/algebra/free.spad.pamphlet
+++ b/src/algebra/free.spad.pamphlet
@@ -108,7 +108,7 @@ ListMonoidOps(S, E, un): Exports == Implementation where
mapExpon(f, l) ==
ans:List(REC) := empty()
for x in l repeat
- if (a := f(x.exp)) ^= 0 then ans := concat([x.gen, a], ans)
+ if (a := f(x.exp)) ~= 0 then ans := concat([x.gen, a], ans)
reverse_! ans
outputForm(l, op, opexp, id) ==
@@ -132,7 +132,7 @@ ListMonoidOps(S, E, un): Exports == Implementation where
concat([s, un], f)
commutativeEquality(s1:$, s2:$):Boolean ==
- #s1 ^= #s2 => false
+ #s1 ~= #s2 => false
for t1 in s1 repeat
if not member?(t1,s2) then return false
true
@@ -301,15 +301,15 @@ FreeMonoid(S: SetCategory): FMcategory == FMdefinition where
hclf(f, g) ==
h:List(REC) := empty()
for f0 in listOfMonoms f for g0 in listOfMonoms g repeat
- f0.gen ^= g0.gen => return makeMulti h
+ f0.gen ~= g0.gen => return makeMulti h
h := concat_!(h, [f0.gen, min(f0.exp, g0.exp)])
- f0.exp ^= g0.exp => return makeMulti h
+ f0.exp ~= g0.exp => return makeMulti h
makeMulti h
lquo(aq, a) ==
size a > #(laq := copy listOfMonoms aq) => "failed"
for a0 in listOfMonoms a repeat
- a0.gen ^= laq.first.gen or a0.exp > laq.first.exp =>
+ a0.gen ~= laq.first.gen or a0.exp > laq.first.exp =>
return "failed"
if a0.exp = laq.first.exp then laq := rest laq
else setfirst_!(laq, [laq.first.gen,
diff --git a/src/algebra/fspace.spad.pamphlet b/src/algebra/fspace.spad.pamphlet
index 902aa197..d044d256 100644
--- a/src/algebra/fspace.spad.pamphlet
+++ b/src/algebra/fspace.spad.pamphlet
@@ -256,19 +256,19 @@ ExpressionSpace(): Category == Defn where
elt(op:OP, args:List %) ==
not belong? op => error "Unknown operator"
- ((u := arity op) case N) and (#args ^= u::N)
+ ((u := arity op) case N) and (#args ~= u::N)
=> error "Wrong number of arguments"
(v := evaluate(op,args)$BasicOperatorFunctions1(%)) case % => v::%
okkernel(op, args)
retract f ==
(k := mainKernel f) case "failed" => error "not a kernel"
- k::K::% ^= f => error "not a kernel"
+ k::K::% ~= f => error "not a kernel"
k::K
retractIfCan f ==
(k := mainKernel f) case "failed" => "failed"
- k::K::% ^= f => "failed"
+ k::K::% ~= f => "failed"
k
is?(f:%, s:SY) ==
@@ -1572,7 +1572,7 @@ FunctionSpace(R:OrderedSet): Category == Definition where
a:% := 0
f := eval((lfunc.n) arg, lop, lexp, lfunc)
e := lexp.n
- while q ^= 0 repeat
+ while q ~= 0 repeat
m := degree q
qr := divide(m, e)
t1 := f ** (qr.quotient)::N
@@ -1621,14 +1621,14 @@ FunctionSpace(R:OrderedSet): Category == Definition where
u := third l
arg := argument k
ans:% := 0
- if (not member?(u,done)) and (ans := differentiate(u,x))^=0 then
+ if (not member?(u,done)) and (ans := differentiate(u,x))~=0 then
ans := ans * kernel(opdiff,
[subst(expr, [kd], [kernel(opdiff, [first l, gg, gg])]),
gg, u])
done := concat(gg, done)
is?(k, opdiff) => ans + diffdiff0(arg, x, expr, k, done)
for i in minIndex arg .. maxIndex arg for b in arg repeat
- if (not member?(b,done)) and (bp:=differentiate(b,x))^=0 then
+ if (not member?(b,done)) and (bp:=differentiate(b,x))~=0 then
g := symsub(gendiff, i)::%
ans := ans + bp * kernel(opdiff, [subst(expr, [kd],
[kernel(opdiff, [substArg(op, arg, i, g), gg, u])]), g, b])
@@ -1676,7 +1676,7 @@ FunctionSpace(R:OrderedSet): Category == Definition where
grad :=
(u := derivative op) case "failed" => opderiv(op, n)
u::List(List % -> %)
- if #grad ^= n then grad := opderiv(op, n)
+ if #grad ~= n then grad := opderiv(op, n)
[g args for g in grad]
-- SPECIALDIFF contains a map (List %, Symbol) -> %
diff --git a/src/algebra/funcpkgs.spad.pamphlet b/src/algebra/funcpkgs.spad.pamphlet
index 41f979ef..eae260a6 100644
--- a/src/algebra/funcpkgs.spad.pamphlet
+++ b/src/algebra/funcpkgs.spad.pamphlet
@@ -82,7 +82,7 @@ FunctionSpaceUnivariatePolynomialFactor(R, F, UP):
UP2ifCan p ==
ansq := 0$UPQ ; ansa := 0$UPA
goforq? := true
- while p ^= 0 repeat
+ while p ~= 0 repeat
if goforq? then
rq := retractIfCan(leadingCoefficient p)@Union(Q, "failed")
if rq case Q then
@@ -114,7 +114,7 @@ FunctionSpaceUnivariatePolynomialFactor(R, F, UP):
UP2ifCan p ==
ansq := 0$UPQ
- while p ^= 0 repeat
+ while p ~= 0 repeat
rq := retractIfCan(leadingCoefficient p)@Union(Q, "failed")
if rq case Q then ansq := ansq + monomial(rq::Q, degree p)
else return [true]
diff --git a/src/algebra/gaussfac.spad.pamphlet b/src/algebra/gaussfac.spad.pamphlet
index 1b1e3197..660d9f4c 100644
--- a/src/algebra/gaussfac.spad.pamphlet
+++ b/src/algebra/gaussfac.spad.pamphlet
@@ -80,7 +80,7 @@ GaussianFactorizationPackage() : C == T
for i in 2.. while (s=1 or s=qq1) repeat
s:=reduce(i,q)**(r::NNI)
t:=s
- while t^=qq1 repeat
+ while t~=qq1 repeat
s:=t
t:=t**2
s::Z
@@ -132,7 +132,7 @@ GaussianFactorizationPackage() : C == T
result : List FFE :=[]
unity:ZI:=1$ZI
- if d^=1 then
+ if d~=1 then
a:=(a exquo d)::Z
b:=(b exquo d)::Z
r:= intfactor(d)
@@ -163,13 +163,13 @@ GaussianFactorizationPackage() : C == T
m:=m quo z
result:=concat(part,result)
- if m^=1 then unity:=unity * m
+ if m~=1 then unity:=unity * m
makeFR(unity,result)
---- write p prime like sum of two squares ----
sumSquares(p:Z) : List Z ==
p=2 => [1,1]
- p rem 4 ^= 1 => error "no solutions"
+ p rem 4 ~= 1 => error "no solutions"
sumsq1(p)
@@ -180,9 +180,9 @@ GaussianFactorizationPackage() : C == T
prime?(n)$IntegerPrimesPackage(Z) => true
re : Z := real a
im : Z := imag a
- re^=0 and im^=0 => false
+ re~=0 and im~=0 => false
p : Z := abs(re+im) -- a is of the form p, -p, %i*p or -%i*p
- p rem 4 ^= 3 => false
+ p rem 4 ~= 3 => false
-- return-value true, if p is a rational prime,
-- and false, otherwise
prime?(p)$IntegerPrimesPackage(Z)
diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet
index ccbd0728..b45a902e 100644
--- a/src/algebra/gaussian.spad.pamphlet
+++ b/src/algebra/gaussian.spad.pamphlet
@@ -157,7 +157,7 @@ ComplexCategory(R:CommutativeRing): Category ==
coordinates(x:%, v:Vector %):Vector(R) ==
ra := real(a := v(minIndex v))
rb := real(b := v(maxIndex v))
- (#v ^= 2) or
+ (#v ~= 2) or
((d := recip(ra * (ib := imag b) - (ia := imag a) * rb))
case "failed") =>error "coordinates: vector is not a basis"
rx := real x
@@ -332,12 +332,12 @@ ComplexCategory(R:CommutativeRing): Category ==
xx := x * y1
x1 := real(xx) rem r
a := x1
- if x1^=0 and sizeLess?(r, 2 * x1) then
+ if x1~=0 and sizeLess?(r, 2 * x1) then
a := x1 - r
if sizeLess?(x1, a) then a := x1 + r
x2 := imag(xx) rem r
b := x2
- if x2^=0 and sizeLess?(r, 2 * x2) then
+ if x2~=0 and sizeLess?(r, 2 * x2) then
b := x2 - r
if sizeLess?(x2, b) then b := x2 + r
y1 := (complex(a, b) exquo y1)::%
@@ -759,7 +759,7 @@ ComplexIntegerSolveLinearPolynomialEquation(R,CR): C == T
slpePrime:R:=(2::R)
oldtable:Vector List CP := empty()
solveLinearPolynomialEquation(lp,p) ==
- if (oldlp ^= lp) then
+ if (oldlp ~= lp) then
-- we have to generate a new table
deg:= _+/[degree u for u in lp]
ans:Union(Vector List CP,"failed"):="failed"
diff --git a/src/algebra/gb.spad.pamphlet b/src/algebra/gb.spad.pamphlet
index e62ca71f..4cff4aac 100644
--- a/src/algebra/gb.spad.pamphlet
+++ b/src/algebra/gb.spad.pamphlet
@@ -128,13 +128,13 @@ GroebnerPackage(Dom, Expon, VarSet, Dpol): T == C where
groebner( Pol: List(Dpol) ) ==
Pol=[] => Pol
- Pol:=[x for x in Pol | x ^= 0]
+ Pol:=[x for x in Pol | x ~= 0]
Pol=[] => [0]
minGbasis(sort( degree #1 > degree #2, gbasis(Pol,0,0)))
groebner( Pol: List(Dpol), xx1: String) ==
Pol=[] => Pol
- Pol:=[x for x in Pol | x ^= 0]
+ Pol:=[x for x in Pol | x ~= 0]
Pol=[] => [0]
xx1 = "redcrit" =>
minGbasis(sort( degree #1 > degree #2, gbasis(Pol,1,0)))
@@ -149,7 +149,7 @@ GroebnerPackage(Dom, Expon, VarSet, Dpol): T == C where
groebner( Pol: List(Dpol), xx1: String, xx2: String) ==
Pol=[] => Pol
- Pol:=[x for x in Pol | x ^= 0]
+ Pol:=[x for x in Pol | x ~= 0]
Pol=[] => [0]
(xx1 = "redcrit" and xx2 = "info") or
(xx1 = "info" and xx2 = "redcrit") =>
diff --git a/src/algebra/gbeuclid.spad.pamphlet b/src/algebra/gbeuclid.spad.pamphlet
index 0ff28e44..660e9230 100644
--- a/src/algebra/gbeuclid.spad.pamphlet
+++ b/src/algebra/gbeuclid.spad.pamphlet
@@ -252,7 +252,7 @@ EuclideanGroebnerBasisPackage(Dom, Expon, VarSet, Dpol): T == C where
if xx2 = 1 then
prinpolINFO(Pol)
print(" THE GROEBNER BASIS over EUCLIDEAN DOMAIN"::Ex)
- if xx1 = 1 and xx2 ^= 1 then
+ if xx1 = 1 and xx2 ~= 1 then
print(" THE GROEBNER BASIS over EUCLIDEAN DOMAIN"::Ex)
H
@@ -272,7 +272,7 @@ EuclideanGroebnerBasisPackage(Dom, Expon, VarSet, Dpol): T == C where
ecredPol(h: Dpol, F: List(Dpol) ) ==
h0:Dpol:= 0
null F => h
- while h ^= 0 repeat
+ while h ~= 0 repeat
h0:= h0 + monomial(leadingCoefficient(h),degree(h))
h:= eRed(red(h), F, F)
h0
@@ -464,7 +464,7 @@ EuclideanGroebnerBasisPackage(Dom, Expon, VarSet, Dpol): T == C where
lepol(p1:Dpol)==
n: Integer
n:= 0
- while p1 ^= 0 repeat
+ while p1 ~= 0 repeat
n:= n + 1
p1:= red(p1)
n
diff --git a/src/algebra/gbintern.spad.pamphlet b/src/algebra/gbintern.spad.pamphlet
index 1ba941b2..2c3d430f 100644
--- a/src/algebra/gbintern.spad.pamphlet
+++ b/src/algebra/gbintern.spad.pamphlet
@@ -168,7 +168,7 @@ GroebnerInternalPackage(Dom, Expon, VarSet, Dpol): T == C where
if xx2 = 1 then
prinpolINFO(Pol)
messagePrint(" THE GROEBNER BASIS POLYNOMIALS")
- if xx1 = 1 and xx2 ^= 1 then
+ if xx1 = 1 and xx2 ~= 1 then
messagePrint(" THE GROEBNER BASIS POLYNOMIALS")
Pol
@@ -295,7 +295,7 @@ GroebnerInternalPackage(Dom, Expon, VarSet, Dpol): T == C where
--- lcm(eh,ei) and eik ^equal lcm(eh,ek)
critB(eh:Expon, eik:Expon, ei:Expon, ek:Expon) ==
- critM(eh, eik) and (eik ^= sup(eh, ei)) and (eik ^= sup(eh, ek))
+ critM(eh, eik) and (eik ~= sup(eh, ei)) and (eik ~= sup(eh, ek))
----------------------------
@@ -313,7 +313,7 @@ GroebnerInternalPackage(Dom, Expon, VarSet, Dpol): T == C where
credPol(h: Dpol, F: List(Dpol) ) ==
null F => h
h0:Dpol:= monomial(leadingCoefficient h, degree h)
- while (h:=reductum h) ^= 0 repeat
+ while (h:=reductum h) ~= 0 repeat
hred:= redPo(h, F)
h := hred.poly
h0:=(hred.mult)*h0 + monomial(leadingCoefficient(h),degree h)
@@ -335,7 +335,7 @@ GroebnerInternalPackage(Dom, Expon, VarSet, Dpol): T == C where
lepol(p1:Dpol)==
n: Integer
n:= 0
- while p1 ^= 0 repeat
+ while p1 ~= 0 repeat
n:= n + 1
p1:= reductum(p1)
n
diff --git a/src/algebra/gdirprod.spad.pamphlet b/src/algebra/gdirprod.spad.pamphlet
index c12b2fd4..622e8726 100644
--- a/src/algebra/gdirprod.spad.pamphlet
+++ b/src/algebra/gdirprod.spad.pamphlet
@@ -202,7 +202,7 @@ SplitHomogeneousDirectProduct(dimtot,dim1,S) : T == C where
(v1:% < v2:%):Boolean ==
lessThanRlex(v1,v2,1,dim1) => true
for i in 1..dim1 repeat
- if qelt(v1,i) ^= qelt(v2,i) then return false
+ if qelt(v1,i) ~= qelt(v2,i) then return false
lessThanRlex(v1,v2,dim1+1,dimtot)
@
diff --git a/src/algebra/gdpoly.spad.pamphlet b/src/algebra/gdpoly.spad.pamphlet
index 6c3ae4fd..49a77794 100644
--- a/src/algebra/gdpoly.spad.pamphlet
+++ b/src/algebra/gdpoly.spad.pamphlet
@@ -148,10 +148,10 @@ GeneralDistributedMultivariatePolynomial(vl,R,E): public == private where
p := reductum p
for i in 1..n repeat
maxdeg.i := max(maxdeg.i, tdeg.i)
- [index(i:PositiveInteger) for i in 1..n | maxdeg.i^=0]
+ [index(i:PositiveInteger) for i in 1..n | maxdeg.i~=0]
reorder(p: %,perm: List Integer):% ==
- #perm ^= n => error "must be a complete permutation of all vars"
+ #perm ~= n => error "must be a complete permutation of all vars"
q := [[directProduct [term.k.j for j in perm]$Vec,term.c]$Term
for term in p]
sort(#1.k > #2.k,q)
@@ -209,7 +209,7 @@ GeneralDistributedMultivariatePolynomial(vl,R,E): public == private where
monomial(leadingCoefficient p,0)
q := univariate(p,v:: OV)
ans:SUP(R) := 0
- while q ^= 0 repeat
+ while q ~= 0 repeat
ans := ans + monomial(ground leadingCoefficient q,degree q)
q := reductum q
ans
@@ -254,7 +254,7 @@ GeneralDistributedMultivariatePolynomial(vl,R,E): public == private where
t.k.i = 1 => l := cons(vl1.i,l)
l := cons(vl1.i ** t.k.i ::OutputForm,l)
l := reverse l
- if (t.c ^= 1) or (null l) then l := cons(t.c :: OutputForm,l)
+ if (t.c ~= 1) or (null l) then l := cons(t.c :: OutputForm,l)
1 = #l => lt := cons(first l,lt)
lt := cons(reduce("*",l),lt)
1 = #lt => first lt
diff --git a/src/algebra/geneez.spad.pamphlet b/src/algebra/geneez.spad.pamphlet
index 74076d65..5568763b 100644
--- a/src/algebra/geneez.spad.pamphlet
+++ b/src/algebra/geneez.spad.pamphlet
@@ -96,7 +96,7 @@ GenExEuclid(R,BP) : C == T
exactquo(u:BP,v:BP,p:R):Union(BP,"failed") ==
invlcv:=modInverse(leadingCoefficient v,p)
r:=monicDivide(u,reduction(invlcv*v,p))
- reduction(r.remainder,p) ^=0 => "failed"
+ reduction(r.remainder,p) ~=0 => "failed"
reduction(invlcv*r.quotient,p)
FP:=EuclideanModularRing(R,BP,R,reduction,merge,exactquo)
@@ -120,7 +120,7 @@ GenExEuclid(R,BP) : C == T
ftab:Vector L FP :=
map(reduceList(#1,lmod),table)$VectorFunctions2(List BP,List FP)
sln:L FP:=[0$FP for xx in ftab.1 ]
- for i in 0 .. d |(cc:=coefficient(err,i)) ^=0 repeat
+ for i in 0 .. d |(cc:=coefficient(err,i)) ~=0 repeat
sln:=[slp+reduce(cc::BP,lmod)*pp
for pp in ftab.(i+1) for slp in sln]
nsol:=[f-lmodk*reduction(g::BP,lmod) for f in oldsol for g in sln]
@@ -141,12 +141,12 @@ GenExEuclid(R,BP) : C == T
testModulus(pmod, listPol) ==
redListPol := reduceList(listPol, pmod)
for pol in listPol for rpol in redListPol repeat
- degree(pol) ^= degree(rpol::BP) => return false
+ degree(pol) ~= degree(rpol::BP) => return false
while not empty? redListPol repeat
rpol := first redListPol
redListPol := rest redListPol
for rpol2 in redListPol repeat
- gcd(rpol, rpol2) ^= 1 => return false
+ gcd(rpol, rpol2) ~= 1 => return false
true
if R has Field then
@@ -165,7 +165,7 @@ GenExEuclid(R,BP) : C == T
-- Actually, there's no possibility of failure
d:=degree m
sln:L BP:=[0$BP for xx in table.1]
- for i in 0 .. d | coefficient(m,i)^=0 repeat
+ for i in 0 .. d | coefficient(m,i)~=0 repeat
sln:=[slp+coefficient(m,i)*pp
for pp in table.(i+1) for slp in sln]
sln
@@ -192,7 +192,7 @@ GenExEuclid(R,BP) : C == T
map(reduceList(#1,pmod),table)$VectorFunctions2(List BP,List FP)
lpolys:L BP:=table.(#table)
sln:L FP:=[0$FP for xx in ftab.1]
- for i in 0 .. d | coefficient(m,i)^=0 repeat
+ for i in 0 .. d | coefficient(m,i)~=0 repeat
sln:=[slp+reduce(coefficient(m,i)::BP,pmod)*pp
for pp in ftab.(i+1) for slp in sln]
soln:=[slp::BP for slp in sln]
diff --git a/src/algebra/ghensel.spad.pamphlet b/src/algebra/ghensel.spad.pamphlet
index 79d49c13..5643e7e2 100644
--- a/src/algebra/ghensel.spad.pamphlet
+++ b/src/algebra/ghensel.spad.pamphlet
@@ -63,7 +63,7 @@ GeneralHenselPackage(RP,TP):C == T where
exactquo(u:TP,v:TP,p:RP):Union(TP,"failed") ==
invlcv:=modInverse(leadingCoefficient v,p)
r:=monicDivide(u,reduction(invlcv*v,p))
- reduction(r.remainder,p) ^=0 => "failed"
+ reduction(r.remainder,p) ~=0 => "failed"
reduction(invlcv*r.quotient,p)
FP:=EuclideanModularRing(RP,TP,RP,reduction,merge,exactquo)
@@ -78,7 +78,7 @@ GeneralHenselPackage(RP,TP):C == T where
factlist=[] => [[pol] for pol in fln]
maxd := +/[degree f for f in fln] quo 2
auxfl:List List TP := []
- for poly in fln while factlist^=[] repeat
+ for poly in fln while factlist~=[] repeat
factlist := [term for term in factlist | ^member?(poly,term)]
dp := degree poly
for term in factlist repeat
@@ -112,7 +112,7 @@ GeneralHenselPackage(RP,TP):C == T where
fln = nfln and zero?(err:=poly-*/fln) => leave "finished"
fln := nfln
Modulus := prime*Modulus
- if constp^=0 then fln:=cons(constp,fln)
+ if constp~=0 then fln:=cons(constp,fln)
[fln,Modulus]
completeHensel(m:TP,tl1:List TP,prime:RP,bound:PI) ==
@@ -127,9 +127,9 @@ GeneralHenselPackage(RP,TP):C == T where
dfn :NonNegativeInteger := nm
lcm1 := leadingCoefficient m
mm := lcm1*m
- while dfn>0 and (factlist := genFact(fln,factlist))^=[] repeat
+ while dfn>0 and (factlist := genFact(fln,factlist))~=[] repeat
auxfl := []
- while factlist^=[] repeat
+ while factlist~=[] repeat
auxl := factlist.first
factlist := factlist.rest
tc := reduceCoef((lcm1 * */[coefficient(poly,0)
diff --git a/src/algebra/gpgcd.spad.pamphlet b/src/algebra/gpgcd.spad.pamphlet
index bf758915..85f20722 100644
--- a/src/algebra/gpgcd.spad.pamphlet
+++ b/src/algebra/gpgcd.spad.pamphlet
@@ -139,7 +139,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
=> g*gcd(c1,c2)::SUPP -- divdes them both, so is the gcd
v:=variables g -- there can be at most these variables in answer
v1:=setDifference(vp1,v)
- if #v1 ^= 0 then
+ if #v1 ~= 0 then
g:=recursivelyGCDCoefficients(g,v,p1,v1)
-- one? g => return gcd(c1,c2)::SUPP
(g = 1) => return gcd(c1,c2)::SUPP
@@ -222,7 +222,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
g:=monomial(lcp,degree gR)+map(#1::P,reductum gR)
cf:=monomial(lcp,degree cfR)+map(#1::P,reductum cfR)
p:=lcp*p -- impose leaidng coefficient of p on each factor
- while lv ^= [] repeat
+ while lv ~= [] repeat
v:=first lv
r:=first lr
lv:=rest lv
@@ -243,7 +243,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
g:=g+pn*first step
cf:=cf+pn*second step
pn:=pn*prime
- thisp ^= g*cf => return "failed"
+ thisp ~= g*cf => return "failed"
g
recursivelyGCDCoefficients(g:SUPP,v:List OV,p:SUPP,pv:List OV) ==
mv:=first pv -- take each coefficient w.r.t. mv
@@ -256,7 +256,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
else g:=recursivelyGCDCoefficients(p,v,p1,pv)
-- one? g => return 1
(g = 1) => return 1
- g^=oldg =>
+ g~=oldg =>
oldv:=v
v:=variables g
pv:=setUnion(pv,setDifference(v,oldv))
@@ -265,7 +265,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
#lv = 0 => p1
lr:=[ randomR() for vv in lv]
dg:=degree p1
- while dg ^= degree (ans:= map(eval(#1,lv,lr),p1)) repeat
+ while dg ~= degree (ans:= map(eval(#1,lv,lr),p1)) repeat
lr:=[ randomR() for vv in lv]
ans
-- eval(p1:SUPP,lv:List OV,lr:List R) == map(eval(#1,lv,lr),p1)
@@ -305,9 +305,9 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
--JHD range:=2*range
--JHD lval:=[(random()$I rem (2*range) - range)::R for i in 1..nvr]
--JHD uf1:SUPR:=univariate eval(p1,lvr,lval)
---JHD degree uf1 ^= d1 => "new point"
+--JHD degree uf1 ~= d1 => "new point"
--JHD uf2:SUPR:=univariate eval(p2,lvr,lval)
---JHD degree uf2 ^= d2 => "new point"
+--JHD degree uf2 ~= d2 => "new point"
--JHD u:=gcd(uf1,uf2)
--JHD du:=degree u
--JHD --the univariate gcd is 1
@@ -324,7 +324,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
--JHD dd=d1 =>
--JHD if ^((f:=p2 exquo p1) case "failed") then
--JHD return [[u],lval,p1]$UTerm
---JHD if dd^=d2 then dd:=(dd-1)::NNI
+--JHD if dd~=d2 then dd:=(dd-1)::NNI
--JHD
--JHD dd=d2 =>
--JHD if ^((f:=p1 exquo p2) case "failed") then
@@ -369,7 +369,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
--JHD (gd1,gd2):=(l,l)
--JHD ul:=univariate(eval(l,lvar1,lval))
--JHD dl:=degree ul
---JHD if degree gcd(ul,differentiate ul) ^=0 then
+--JHD if degree gcd(ul,differentiate ul) ~=0 then
--JHD newchoice:=good(l,lvar.rest)
--JHD ul:=newchoice.upol
--JHD lval:=newchoice.inval
@@ -381,7 +381,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
--JHD d:SUPR:=gcd(cons(ul,ulist))
--JHD if degree d =0 then return gd1
--JHD lquo:=(ul exquo d)::SUPR
---JHD if degree lquo ^=0 then
+--JHD if degree lquo ~=0 then
--JHD lgcd:=gcd(cons(leadingCoefficient univariate(l,x),lcpol))
--JHD gd2:=lift(l,d,lquo,lgcd,lvar,ldeg,lval)
--JHD l:=gd2
@@ -546,7 +546,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
--JHD df:=degree(f,x)
--JHD leadlist:List(P):=[]
--JHD
---JHD if lgcd^=1$P then
+--JHD if lgcd~=1$P then
--JHD leadpol:=true
--JHD f:=lgcd*f
--JHD ldeg:=[n0+n1 for n0 in ldeg for n1 in degree(lgcd,lvar)]
@@ -558,7 +558,7 @@ GeneralPolynomialGcdPackage(E,OV,R,P):C == T where
--JHD lg:=imposelc([d,uf],lvar,lval,leadlist)
--JHD plist:=lifting(univariate(f,x),lvar,lg,lval,leadlist,ldeg)::List P
--JHD (p0:P,p1:P):=(plist.first,plist.2)
---JHD if univariate eval(p0,rest lvar,lval) ^= lg.first then
+--JHD if univariate eval(p0,rest lvar,lval) ~= lg.first then
--JHD (p0,p1):=(p1,p0)
--JHD ^leadpol => p0
--JHD cprim:=contprim([p0])
diff --git a/src/algebra/gpol.spad.pamphlet b/src/algebra/gpol.spad.pamphlet
index a4563b03..3d09fc08 100644
--- a/src/algebra/gpol.spad.pamphlet
+++ b/src/algebra/gpol.spad.pamphlet
@@ -87,7 +87,7 @@ LaurentPolynomial(R, UP): Exports == Implementation where
zero? p => 0::Z::O
l := nil()$List(O)
v := monomial(1, 1)$UP :: O
- while p ^= 0 repeat
+ while p ~= 0 repeat
l := concat(l, toutput(leadingCoefficient p, degree p, v))
p := reductum p
reduce("+", l)
@@ -140,7 +140,7 @@ LaurentPolynomial(R, UP): Exports == Implementation where
poly(p) * monomial(1, order(p)::N)$UP
retractIfCan(p:%):Union(R, "failed") ==
- order(p) ^= 0 => "failed"
+ order(p) ~= 0 => "failed"
retractIfCan poly p
if R has Field then
diff --git a/src/algebra/groebf.spad.pamphlet b/src/algebra/groebf.spad.pamphlet
index 68cc216c..47225404 100644
--- a/src/algebra/groebf.spad.pamphlet
+++ b/src/algebra/groebf.spad.pamphlet
@@ -200,8 +200,8 @@ GroebnerFactorizationPackage(Dom, Expon, VarSet, Dpol): T == C where
basis := [[0,1$Dpol]$sugarPol]
terminateWithBasis := true
- -- if "nP" ^= 0, then we continue, otherwise we determine next "nP"
- nP ^= 0$Dpol =>
+ -- if "nP" ~= 0, then we continue, otherwise we determine next "nP"
+ nP ~= 0$Dpol =>
-- now we divide "nP", if possible, by the polynomials
-- from "nonZeroRestrictions"
for q in nonZeroRestrictions repeat
@@ -224,8 +224,8 @@ GroebnerFactorizationPackage(Dom, Expon, VarSet, Dpol): T == C where
basis := [[0,1$Dpol]$sugarPol]
terminateWithBasis := true -- doSplitting? is still false
- -- if "nP" ^= 0, then we continue, otherwise we determine next "nP"
- nP ^= 0$Dpol =>
+ -- if "nP" ~= 0, then we continue, otherwise we determine next "nP"
+ nP ~= 0$Dpol =>
-- now we factorize "nP", which is not constant
irreducibleFactors : L Dpol := createAllFactors(nP)
-- if there are more than 1 factors we reduce them and split
@@ -254,7 +254,7 @@ GroebnerFactorizationPackage(Dom, Expon, VarSet, Dpol): T == C where
doSplitting? =>
for fnP in allReducedFactors repeat
- if fnP ^= 1$Dpol
+ if fnP ~= 1$Dpol
then
newInputPolys : L Dpol := _
sort( degree #1 > degree #2 ,cons(fnP,inputPolys))
diff --git a/src/algebra/groebsol.spad.pamphlet b/src/algebra/groebsol.spad.pamphlet
index b2e4ab76..482c960f 100644
--- a/src/algebra/groebsol.spad.pamphlet
+++ b/src/algebra/groebsol.spad.pamphlet
@@ -77,7 +77,7 @@ GroebnerSolve(lv,F,R) : C == T
lc := (lc exquo gg)::DPoly
linp:SUP:=monomial(lc,1$NNI)$SUP + monomial(trailp,0$NNI)$SUP
g:DPoly:=multivariate(uf-linp**df,x)
- redPol(g,lpol) ^= 0 => "failed"
+ redPol(g,lpol) ~= 0 => "failed"
multivariate(linp,x)
-- is the 0-dimensional ideal I in general position ? --
@@ -96,7 +96,7 @@ GroebnerSolve(lv,F,R) : C == T
then return "failed"
newlpol :=concat(redPol(g::DPoly,newlpol),newlpol)
rlvar:=rest rlvar
- else if redPol(f,newlpol)^=0 then return"failed"
+ else if redPol(f,newlpol)~=0 then return"failed"
newlpol
@@ -152,7 +152,7 @@ GroebnerSolve(lv,F,R) : C == T
val:=(x::HDPoly)-val
ans:=[totolex groebner [elt(univariate(p,x),val) for p in lp]
for lp in result]
- [ll for ll in ans | ll^=[1]]
+ [ll for ll in ans | ll~=[1]]
zeroDim?(lp: List HDPoly,lvar:L OV) : Boolean ==
empty? lp => false
diff --git a/src/algebra/ideal.spad.pamphlet b/src/algebra/ideal.spad.pamphlet
index f1ba1d61..980cba38 100644
--- a/src/algebra/ideal.spad.pamphlet
+++ b/src/algebra/ideal.spad.pamphlet
@@ -174,7 +174,7 @@ PolynomialIdeals(F,Expon,VarSet,DPoly) : C == T
q=0$newPoly => 0$DPoly
dq:newExpon:=degree q
n:NNI:=selectfirst (dq)
- n^=0 => "failed"
+ n~=0 => "failed"
((g:=oldpoly reductum q) case "failed") => "failed"
monomial(leadingCoefficient q,selectsecond dq)$DPoly + (g::DPoly)
@@ -218,7 +218,7 @@ PolynomialIdeals(F,Expon,VarSet,DPoly) : C == T
lsubset : List List VarSet := sort(#(#1)>#(#2),subset(lv))
for subs in lsubset repeat
ldif:List VarSet:= lv
- for mvset in monvar while ldif ^=[] repeat
+ for mvset in monvar while ldif ~=[] repeat
ldif:=setDifference(mvset,subs)
if ^(empty? ldif) then return #subs
0
@@ -378,7 +378,7 @@ PolynomialIdeals(F,Expon,VarSet,DPoly) : C == T
vec2.i:=1
g:nPoly:=0$nPoly
pol:=0$P
- while f^=0 repeat
+ while f~=0 repeat
df:=degree(f-reductum f,lvint)
lcf:=leadingCoefficient f
pol:=pol+monompol(df,lcf,lvint)
@@ -390,7 +390,7 @@ PolynomialIdeals(F,Expon,VarSet,DPoly) : C == T
leq : List Equation P :=
[p = pol for p in npol for pol in reverse lp ]
lf:=(groebner lf)$gp
- while lf^=[] repeat
+ while lf~=[] repeat
q:=lf.first
dq:nExponent:=degree q
n:=selectfirst (dq)
@@ -399,7 +399,7 @@ PolynomialIdeals(F,Expon,VarSet,DPoly) : C == T
solsn:List P:=[]
for q in lf repeat
g:Polynomial F :=0
- while q^=0 repeat
+ while q~=0 repeat
dq:=degree q
lcq:=leadingCoefficient q
q:=reductum q
@@ -416,7 +416,7 @@ PolynomialIdeals(F,Expon,VarSet,DPoly) : C == T
empty? Idl => [0$DPoly] :: OutputForm
Idl :: OutputForm
- ideal(Id:List DPoly) :Ideal == [[f for f in Id|f^=0],false]
+ ideal(Id:List DPoly) :Ideal == [[f for f in Id|f~=0],false]
groebnerIdeal(Id:List DPoly) : Ideal == [Id,true]
diff --git a/src/algebra/idecomp.spad.pamphlet b/src/algebra/idecomp.spad.pamphlet
index 9ba4d219..740d60de 100644
--- a/src/algebra/idecomp.spad.pamphlet
+++ b/src/algebra/idecomp.spad.pamphlet
@@ -145,7 +145,7 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
lf:=Id.first
pv:DPoly:=0
pw:DPoly:=0
- while degree(lf,y)^=1 repeat
+ while degree(lf,y)~=1 repeat
val:=random()$Z rem 23
pv:=px+val*py
pw:=px-val*py
@@ -153,7 +153,7 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
lf:=Id.first
ris:= generators(zeroRadComp(groebnerIdeal(Id.rest),truelist.rest))
ris:=cons(lf,ris)
- if pv^=0 then
+ if pv~=0 then
ris:=[(univariate(h,x)).pw for h in ris]
groebnerIdeal(groebner ris)
@@ -172,12 +172,12 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
truelist=[] => true
n:=#truelist
Jd:=groebner generators J
- for x in truelist while Jd^=[] repeat
+ for x in truelist while Jd~=[] repeat
f := Jd.first
Jd:=Jd.rest
- if ((y:=mainVariable f) case "failed") or (y::OV ^=x )
+ if ((y:=mainVariable f) case "failed") or (y::OV ~=x )
or _^ (ismonic (f,x)) then return false
- while Jd^=[] and (mainVariable Jd.first)::OV=x repeat Jd:=Jd.rest
+ while Jd~=[] and (mainVariable Jd.first)::OV=x repeat Jd:=Jd.rest
if Jd=[] and position(x,truelist)<n then return false
true
@@ -246,7 +246,7 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
pushdown(g:DPoly,x:OV) : DPoly ==
rf:DPoly:=0$DPoly
i:=position(x,lvint)
- while g^=0 repeat
+ while g~=0 repeat
g1:=reductum g
rf:=rf+pushdterm(g-g1,x,i)
g := g1
@@ -266,11 +266,11 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
rf:DPoly:=0$DPoly
g := f
xp := convert(x)@SE
- while g^=0 repeat
+ while g~=0 repeat
h:=lcm(trueden(denom leadingCoefficient g,xp),h)
g:=reductum g
f:=(h::F)*f
- while f^=0 repeat
+ while f~=0 repeat
g:=reductum f
rf:=rf+pushuterm(f-g,xp,x)
f:=g
@@ -296,7 +296,7 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
is0dimprimary(J:FIdeal,truelist:List OV) : Boolean ==
element?(1,J) => true
Jd:=generators(groebner J)
- #(factors factor Jd.last)^=1 => return false
+ #(factors factor Jd.last)~=1 => return false
i:=subtractIfCan(#truelist,1)
(i case "failed") => return true
JR:=(reverse Jd);JM:=groebnerIdeal([JR.first]);JP:List(DPoly):=[]
@@ -353,10 +353,10 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
element?(1,J) => true
n:NNI:=#vl;i:NNI:=1
Jd:=generators J
- #Jd^=n => false
+ #Jd~=n => false
for f in Jd repeat
if _^ ismonic(f,lvint.i) then return false
- if i<n and (degree univariate(f,lvint.i))^=1 then return false
+ if i<n and (degree univariate(f,lvint.i))~=1 then return false
i:=i+1
g:=Jd.n
#(lfact:=factors(factor g)) >1 => false
diff --git a/src/algebra/indexedp.spad.pamphlet b/src/algebra/indexedp.spad.pamphlet
index 41f9bc89..34d62e96 100644
--- a/src/algebra/indexedp.spad.pamphlet
+++ b/src/algebra/indexedp.spad.pamphlet
@@ -65,8 +65,8 @@ IndexedDirectProductObject(A:SetCategory,S:OrderedSet): IndexedDirectProductCate
--define
x = y ==
while not null x and _^ null y repeat
- x.first.k ^= y.first.k => return false
- x.first.c ^= y.first.c => return false
+ x.first.k ~= y.first.k => return false
+ x.first.c ~= y.first.c => return false
x:=x.rest
y:=y.rest
null x and null y
@@ -159,10 +159,10 @@ IndexedDirectProductAbelianMonoid(A:AbelianMonoid,S:OrderedSet):
n * x ==
n = 0 => 0
n = 1 => x
- [[u.k,a] for u in x | (a:=n*u.c) ^= 0$A]
+ [[u.k,a] for u in x | (a:=n*u.c) ~= 0$A]
monomial(r,s) == (r = 0 => 0; [[s,r]])
- map(f,x) == [[tm.k,a] for tm in x | (a:=f(tm.c)) ^= 0$A]
+ map(f,x) == [[tm.k,a] for tm in x | (a:=f(tm.c)) ~= 0$A]
reductum x == (null x => 0; rest x)
leadingCoefficient x == (null x => 0; x.first.c)
@@ -253,7 +253,7 @@ IndexedDirectProductAbelianGroup(A:AbelianGroup,S:OrderedSet):
n * x ==
n = 0 => 0
n = 1 => x
- [[u.k,a] for u in x | (a:=n*u.c) ^= 0$A]
+ [[u.k,a] for u in x | (a:=n*u.c) ~= 0$A]
qsetrest!: (Rep, Rep) -> Rep
qsetrest!(l: Rep, e: Rep): Rep == RPLACD(l, e)$Lisp
diff --git a/src/algebra/intaf.spad.pamphlet b/src/algebra/intaf.spad.pamphlet
index 23f73b17..8a4e2b94 100644
--- a/src/algebra/intaf.spad.pamphlet
+++ b/src/algebra/intaf.spad.pamphlet
@@ -389,7 +389,7 @@ PureAlgebraicIntegration(R, F, L): Exports == Implementation where
linearInXIfCan(x, y) ==
a := b := 0$UP
p := clearDenominator lift(minPoly y, x)
- while p ^= 0 repeat
+ while p ~= 0 repeat
degree(q := numer leadingCoefficient p) > 1 => return "failed"
a := a + monomial(coefficient(q, 1), d := degree p)
b := b - monomial(coefficient(q, 0), d)
@@ -401,7 +401,7 @@ PureAlgebraicIntegration(R, F, L): Exports == Implementation where
prootintegrate(f, x, y) ==
modulus := lift(p := minPoly y, x)
rf := reductum(ff := univariate(f, x, y, p))
- ((r := retractIfCan(rf)@Union(RF,"failed")) case RF) and rf ^= 0 =>
+ ((r := retractIfCan(rf)@Union(RF,"failed")) case RF) and rf ~= 0 =>
-- in this case, ff := lc(ff) y^i + r so we integrate both terms
-- separately to gain time
map(#1(x::F), integrate(r::RF)) +
@@ -481,7 +481,7 @@ PureAlgebraicIntegration(R, F, L): Exports == Implementation where
-- returns either "failed" or r(u, z)
chvarIfCan(p, d, u, u1) ==
ans:UPUP := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
(v := composite(u1 * leadingCoefficient(p) / d ** degree(p), u))
case "failed" => return "failed"
ans := ans + monomial(v::RF, degree p)
diff --git a/src/algebra/intalg.spad.pamphlet b/src/algebra/intalg.spad.pamphlet
index a08b41fa..c9002c53 100644
--- a/src/algebra/intalg.spad.pamphlet
+++ b/src/algebra/intalg.spad.pamphlet
@@ -292,11 +292,11 @@ AlgebraicIntegrate(R0, F, UP, UPUP, R): Exports == Implementation where
varRoot?(p, derivation) ==
for c in coefficients primitivePart p repeat
- derivation(c) ^= 0 => return true
+ derivation(c) ~= 0 => return true
false
pLogDeriv(log, derivation) ==
- map(derivation, log.coeff) ^= 0 =>
+ map(derivation, log.coeff) ~= 0 =>
error "can only handle logs with constant coefficients"
-- one?(n := degree(log.coeff)) =>
((n := degree(log.coeff)) = 1) =>
diff --git a/src/algebra/intaux.spad.pamphlet b/src/algebra/intaux.spad.pamphlet
index d8d3493f..d2452f79 100644
--- a/src/algebra/intaux.spad.pamphlet
+++ b/src/algebra/intaux.spad.pamphlet
@@ -106,13 +106,13 @@ IntegrationResult(F:Field): Exports == Implementation where
coeffp:O := (outputForm(rec.coeff, alpha) = 0::Z::O)@O
logandp :=
alpha * prefix("log"::Symbol::O, [outputForm(rec.logand, alpha)])
- if (cc := Q2F(rec.scalar)) ^= 1 then
+ if (cc := Q2F(rec.scalar)) ~= 1 then
logandp := cc::O * logandp
sum(logandp, coeffp)
nesimp l ==
[[u,x] for x in removeDuplicates_!([ne.intvar for ne in l]$List(F))
- | (u := neselect(l, x)) ^= 0]
+ | (u := neselect(l, x)) ~= 0]
if (F has LiouvillianFunctionCategory) and (F has RetractableTo Symbol) then
retractIfCan u ==
@@ -152,7 +152,7 @@ IntegrationResult(F:Field): Exports == Implementation where
error "pNeDeriv: cannot differentiate not elementary part into F"
pLogDeriv(log, derivation) ==
- map(derivation, log.coeff) ^= 0 =>
+ map(derivation, log.coeff) ~= 0 =>
error "pLogDeriv: can only handle logs with constant coefficients"
-- one?(n := degree(log.coeff)) =>
((n := degree(log.coeff)) = 1) =>
@@ -173,7 +173,7 @@ IntegrationResult(F:Field): Exports == Implementation where
coerce(u:%):O ==
(r := retractIfCan u) case F => r::F::O
l := reverse_! [LOG2O f for f in logpart u]$List(O)
- if ratpart u ^= 0 then l := concat(ratpart(u)::O, l)
+ if ratpart u ~= 0 then l := concat(ratpart(u)::O, l)
if not elem? u then l := concat([NE2O f for f in notelem u], l)
null l => 0::O
reduce("+", l)
diff --git a/src/algebra/intclos.spad.pamphlet b/src/algebra/intclos.spad.pamphlet
index 4470fc41..802f079d 100644
--- a/src/algebra/intclos.spad.pamphlet
+++ b/src/algebra/intclos.spad.pamphlet
@@ -206,8 +206,8 @@ IntegralBasisTools(R,UP,F): Exports == Implementation where
(not square? rb1) or (not square? rbinv1) or (not square? rb2) _
or (not square? rbinv2) =>
error "moduleSum: matrices must be square"
- ((n := nrows rb1) ^= (nrows rbinv1)) or (n ^= (nrows rb2)) _
- or (n ^= (nrows rbinv2)) =>
+ ((n := nrows rb1) ~= (nrows rbinv1)) or (n ~= (nrows rb2)) _
+ or (n ~= (nrows rbinv2)) =>
error "moduleSum: matrices of imcompatible dimensions"
(zero? rbden1) or (zero? rbden2) =>
error "moduleSum: denominator must be non-zero"
@@ -755,8 +755,8 @@ 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 =>
+ (indexChange = 1) or gcd(p2,disc) ~= p2 =>
return [rb, rbden, rbinv, disc]
discriminant() ==
diff --git a/src/algebra/intef.spad.pamphlet b/src/algebra/intef.spad.pamphlet
index 4dbbc26f..0ba69df7 100644
--- a/src/algebra/intef.spad.pamphlet
+++ b/src/algebra/intef.spad.pamphlet
@@ -117,7 +117,7 @@ ElementaryIntegration(R, F): Exports == Implementation where
and ((z := retractIfCan(zz := third l)@Union(SE, "failed")) case SE)
and (z::SE = x)
and ((u := droponex(first l, a, ka, zz)) case F) => u::F::IR
- (da := differentiate(a := denom(f)::F, x)) ^= 0 and
+ (da := differentiate(a := denom(f)::F, x)) ~= 0 and
zero? differentiate(c := numer(f)::F / da, x) => (c * log a)::IR
mkAnswer(0, empty(), [[f, x::F]])
@@ -130,7 +130,7 @@ ElementaryIntegration(R, F): Exports == Implementation where
eval(f, [ka], [x])
unklimint(f, x, lu) ==
- for u in lu | u ^= 0 repeat
+ for u in lu | u ~= 0 repeat
zero? differentiate(c := f * u / differentiate(u, x), x) => [0,[[c,u]]]
"failed"
@@ -254,7 +254,7 @@ ElementaryIntegration(R, F): Exports == Implementation where
primextint(f, x, k, g) ==
lk := varselect([a for a in tower f
- | k ^= a and is?(a, "log"::SE)], x)
+ | k ~= a and is?(a, "log"::SE)], x)
(u1 := primextendedint(univariate(f, k), differentiate(#1,
differentiate(#1, x), differentiate(k::F, x)::UP),
lfextlimint(#1, x, k, lk), univariate(g, k))) case "failed"
@@ -278,7 +278,7 @@ ElementaryIntegration(R, F): Exports == Implementation where
primint(f, x, k) ==
lk := varselect([a for a in tower f
- | k ^= a and is?(a, "log"::SE)], x)
+ | k ~= a and is?(a, "log"::SE)], x)
r1 := primintegrate(univariate(f, k), differentiate(#1,
differentiate(#1, x), differentiate(k::F, x)::UP),
lfextlimint(#1, x, k, lk))
@@ -313,7 +313,7 @@ ElementaryIntegration(R, F): Exports == Implementation where
primlimint(f, x, k, lu) ==
lk := varselect([a for a in tower f
- | k ^= a and is?(a, "log"::SE)], x)
+ | k ~= a and is?(a, "log"::SE)], x)
(u1 := primlimitedint(univariate(f, k), differentiate(#1,
differentiate(#1, x), differentiate(k::F, x)::UP),
lfextlimint(#1, x, k, lk), [univariate(u, k) for u in lu]))
diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet
index 3aa12fa9..787b3b74 100644
--- a/src/algebra/integer.spad.pamphlet
+++ b/src/algebra/integer.spad.pamphlet
@@ -41,7 +41,7 @@ IntegerSolveLinearPolynomialEquation(): C ==T
slpePrime:Integer:=(2::Integer)
oldtable:Vector List ZP := empty()
solveLinearPolynomialEquation(lp,p) ==
- if (oldlp ^= lp) then
+ if (oldlp ~= lp) then
-- we have to generate a new table
deg:= _+/[degree u for u in lp]
ans:Union(Vector List ZP,"failed"):="failed"
diff --git a/src/algebra/intfact.spad.pamphlet b/src/algebra/intfact.spad.pamphlet
index 996b9232..316da86a 100644
--- a/src/algebra/intfact.spad.pamphlet
+++ b/src/algebra/intfact.spad.pamphlet
@@ -330,7 +330,7 @@ IntegerRoots(I:IntegerNumberSystem): Exports == Implementation where
return ((1 + s + a quo s) quo two)
-- initial approximation for the root is within a factor of 2
(new, old) := (shift(1, n quo two), 1)
- while new ^= old repeat
+ while new ~= old repeat
(new, old) := ((1 + new + a quo new) quo two, new)
new
diff --git a/src/algebra/intpm.spad.pamphlet b/src/algebra/intpm.spad.pamphlet
index 49f03dbe..dad6bfa9 100644
--- a/src/algebra/intpm.spad.pamphlet
+++ b/src/algebra/intpm.spad.pamphlet
@@ -117,7 +117,7 @@ PatternMatchIntegration(R, F): Exports == Implementation where
[cc, nc]
if (v := isPower f) case Record(val:F, exponent:Z) then
vv := v::Record(val:F, exponent:Z)
- (vv.exponent ^= 1) =>
+ (vv.exponent ~= 1) =>
rec := splitConstant(vv.val, x)
return [rec.const ** vv.exponent, rec.nconst ** vv.exponent]
error "splitConstant: should not happen"
@@ -233,7 +233,7 @@ PatternMatchIntegration(R, F): Exports == Implementation where
and failed?(res := patternMatch(f,convert(patci0)@PAT,res0)) =>
[NONE, 0, 0]
l := mkalist res
- (b := l.pmb) ^= 2 * (a := l.pma) => [NONE, 0, 0]
+ (b := l.pmb) ~= 2 * (a := l.pma) => [NONE, 0, 0]
db := differentiate(b, x)
d := (cc := l.pmc) / db
zero? differentiate(d, x) =>
@@ -248,11 +248,11 @@ PatternMatchIntegration(R, F): Exports == Implementation where
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
- rec.exponent ^=2 => error "insqrt: hould not happen"
+ rec.exponent ~=2 => error "insqrt: hould not happen"
rec.coef * sqrt(rec.radicand)
pmintegrate(f, x) ==
- (rc := splitConstant(f, x)).const ^= 1 =>
+ (rc := splitConstant(f, x)).const ~= 1 =>
(u := pmintegrate(rc.nconst, x)) case "failed" => "failed"
rec := u::ANS
[rc.const * rec.special, rc.const * rec.integrand]
@@ -270,7 +270,7 @@ PatternMatchIntegration(R, F): Exports == Implementation where
"failed"
pmComplexintegrate(f, x) ==
- (rc := splitConstant(f, x)).const ^= 1 =>
+ (rc := splitConstant(f, x)).const ~= 1 =>
(u := pmintegrate(rc.nconst, x)) case "failed" => "failed"
rec := u::ANS
[rc.const * rec.special, rc.const * rec.integrand]
diff --git a/src/algebra/intrf.spad.pamphlet b/src/algebra/intrf.spad.pamphlet
index 17f21167..73a73040 100644
--- a/src/algebra/intrf.spad.pamphlet
+++ b/src/algebra/intrf.spad.pamphlet
@@ -97,7 +97,7 @@ SubResultantPackage(R, UP): Exports == Implementation where
F := Sn
null l => error "SUBRESP: strange Subresultant chain from PRS"
zero? Sn => error "SUBRESP: strange Subresultant chain from PRS"
- while (l ^= []) repeat
+ while (l ~= []) repeat
res.(n) := Sn
F := first(l)
l := rest(l)
@@ -422,7 +422,7 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
-- in k[z] of the restriction of D to k.
kappa(p, derivation) ==
ans:UP := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
ans := ans + derivation(leadingCoefficient(p)::UP)*monomial(1,degree p)
p := reductum p
ans
@@ -469,7 +469,7 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
expintegratepoly(p, FRDE) ==
coef0:F := 0
notelm := answr := 0$GP
- while p ^= 0 repeat
+ while p ~= 0 repeat
ans1 := FRDE(n := degree p, a := leadingCoefficient p)
answr := answr + monomial(ans1.ans, n)
if ~ans1.sol? then -- Risch d.e. has no complete solution
@@ -487,7 +487,7 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
tanintegratespecial(f, derivation, FRDE) ==
ans:RF := 0
p := monomial(1, 2)$UP + 1
- while (n := degree(denom f) quo 2) ^= 0 repeat
+ while (n := degree(denom f) quo 2) ~= 0 repeat
r := numer(f) rem p
a := coefficient(r, 1)
b := coefficient(r, 0)
@@ -507,21 +507,21 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
expextintfrac(f, derivation, g) ==
zero? f => [0, 0]
degree numer f >= degree denom f => error "Not a proper fraction"
- order(denom f,monomial(1,1)) ^= 0 => error "Not integral at t = 0"
+ order(denom f,monomial(1,1)) ~= 0 => error "Not integral at t = 0"
r := HermiteIntegrate(f, derivation)
zero? g =>
- r.logpart ^= 0 => "failed"
+ r.logpart ~= 0 => "failed"
[r.answer, 0]
degree numer g >= degree denom g => error "Not a proper fraction"
- order(denom g,monomial(1,1)) ^= 0 => error "Not integral at t = 0"
- differentiate(c := r.logpart / g, derivation) ^= 0 => "failed"
+ order(denom g,monomial(1,1)) ~= 0 => error "Not integral at t = 0"
+ differentiate(c := r.logpart / g, derivation) ~= 0 => "failed"
[r.answer, c]
limitedLogs(f, logderiv, lu) ==
zero? f => empty()
empty? lu => "failed"
empty? rest lu =>
- logderiv(c0 := f / logderiv(u0 := first lu)) ^= 0 => "failed"
+ logderiv(c0 := f / logderiv(u0 := first lu)) ~= 0 => "failed"
[[c0, u0]]
num := numer f
den := denom f
@@ -538,14 +538,14 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
m := rowEchelon m
ans := empty()$LLG
for i in minRowIndex m .. maxRowIndex m |
- qelt(m, i, maxColIndex m) ^= 0 repeat
+ qelt(m, i, maxColIndex m) ~= 0 repeat
OK := false
for pp in l1 for j in minColIndex m .. maxColIndex m - 1
while not OK repeat
- if qelt(m, i, j) ^= 0 then
+ if qelt(m, i, j) ~= 0 then
OK := true
c := qelt(m, i, maxColIndex m) / qelt(m, i, j)
- logderiv(c0 := c::UP::RF) ^= 0 => return "failed"
+ logderiv(c0 := c::UP::RF) ~= 0 => return "failed"
ans := concat([c0, pp.logand2], ans)
not OK => return "failed"
ans
@@ -553,13 +553,13 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
-- returns q in UP s.t. p = q', or "failed"
primintfldpoly(p, extendedint, t') ==
(u := primintegratepoly(p, extendedint, t')) case UPUP => "failed"
- u.a0 ^= 0 => "failed"
+ u.a0 ~= 0 => "failed"
u.answer
-- returns q in GP st p = q', or "failed"
expintfldpoly(p, FRDE) ==
(u := expintegratepoly(p, FRDE)) case GPGP => "failed"
- u.a0 ^= 0 => "failed"
+ u.a0 ~= 0 => "failed"
u.answer
-- returns (v in RF, c1...cn in RF, a in F) s.t. ci' = 0,
@@ -649,7 +649,7 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
r := monomialIntPoly(rec.polypart, derivation)
t := monomial(1, 1)$UP
c := coefficient(r.polypart, 1) / leadingCoefficient(derivation t)
- derivation(c::UP) ^= 0 =>
+ derivation(c::UP) ~= 0 =>
[i1 + mkAnswer(r.answer::RF, empty(),
[[r.polypart::RF + rec.specpart, dummy]$NE]), 0]
logs:List(LOG) :=
@@ -721,10 +721,10 @@ TranscendentalIntegration(F, UP): Exports == Implementation where
degree numer f >= degree denom f => error "Not a proper fraction"
r := HermiteIntegrate(f, derivation)
zero? g =>
- r.logpart ^= 0 => "failed"
+ r.logpart ~= 0 => "failed"
[r.answer, 0]
degree numer g >= degree denom g => error "Not a proper fraction"
- differentiate(c := r.logpart / g, derivation) ^= 0 => "failed"
+ differentiate(c := r.logpart / g, derivation) ~= 0 => "failed"
[r.answer, c]
@
diff --git a/src/algebra/irexpand.spad.pamphlet b/src/algebra/irexpand.spad.pamphlet
index 2a39f76b..e725ca76 100644
--- a/src/algebra/irexpand.spad.pamphlet
+++ b/src/algebra/irexpand.spad.pamphlet
@@ -215,7 +215,7 @@ IntegrationResultToFunction(R, F): Exports == Implementation where
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]
- rec.exponent ^=2 => error "Should not happen"
+ 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/kl.spad.pamphlet b/src/algebra/kl.spad.pamphlet
index 0ebb9578..26a8b374 100644
--- a/src/algebra/kl.spad.pamphlet
+++ b/src/algebra/kl.spad.pamphlet
@@ -233,7 +233,7 @@ Kernel(S:OrderedSet): Exports == Implementation where
k1.posit < k2.posit
kernel(fn, x, n) ==
- ((u := arity fn) case N) and (#x ^= u::N)
+ ((u := arity fn) case N) and (#x ~= u::N)
=> error "Wrong number of arguments"
enterInCache([fn, x, n, 0]$Rep, triage)
@@ -249,13 +249,13 @@ Kernel(S:OrderedSet): Exports == Implementation where
(u::(List OutputForm -> OutputForm)) l
triage(k1, k2) ==
- k1.nest ^= k2.nest => B2Z(k1.nest < k2.nest)
- k1.op ^= k2.op => B2Z(k1.op < k2.op)
- (n1 := #(argument k1)) ^= (n2 := #(argument k2)) => B2Z(n1 < n2)
+ k1.nest ~= k2.nest => B2Z(k1.nest < k2.nest)
+ k1.op ~= k2.op => B2Z(k1.op < k2.op)
+ (n1 := #(argument k1)) ~= (n2 := #(argument k2)) => B2Z(n1 < n2)
((func := property(operator k1, SPECIALEQUAL)) case None) and
(((func::None) pretend ((%, %) -> Boolean)) (k1, k2)) => 0
for x1 in argument(k1) for x2 in argument(k2) repeat
- x1 ^= x2 => return B2Z(x1 < x2)
+ x1 ~= x2 => return B2Z(x1 < x2)
0
if S has ConvertibleTo InputForm then
diff --git a/src/algebra/laplace.spad.pamphlet b/src/algebra/laplace.spad.pamphlet
index 6f81b2ee..b3a6767c 100644
--- a/src/algebra/laplace.spad.pamphlet
+++ b/src/algebra/laplace.spad.pamphlet
@@ -134,7 +134,7 @@ LaplaceTransform(R, F): Exports == Implementation where
[c, c1, c0]
if (v := isPower f) case Record(val:F, exponent:Integer) then
w := v::Record(val:F, exponent:Integer)
- (w.exponent ^= 1) and
+ (w.exponent ~= 1) and
((r := aexp(w.val, t)) case Record(coef:F,coef1:F,coef0:F)) =>
rec := r::Record(coef:F, coef1:F, coef0:F)
return [rec.coef ** w.exponent, w.exponent * rec.coef1,
@@ -178,7 +178,7 @@ LaplaceTransform(R, F): Exports == Implementation where
oplap(f, tt, ss)
(u := mkPlus f) case List(F) =>
+/[locallaplace(g, t, tt, s, ss) for g in u::List(F)]
- (rec := splitConstant(f, t)).const ^= 1 =>
+ (rec := splitConstant(f, t)).const ~= 1 =>
rec.const * locallaplace(rec.nconst, t, tt, s, ss)
(v := atn(f, t)) case Record(coef:F, deg:PI) =>
vv := v::Record(coef:F, deg:PI)
diff --git a/src/algebra/laurent.spad.pamphlet b/src/algebra/laurent.spad.pamphlet
index ab0417c1..1a162ede 100644
--- a/src/algebra/laurent.spad.pamphlet
+++ b/src/algebra/laurent.spad.pamphlet
@@ -506,13 +506,13 @@ UnivariateLaurentSeriesConstructor(Coef,UTS):_
empty? uu => (0$Coef) :: OUT
n : NNI ; count : NNI := _$streamCount$Lisp
for n in 0..count while not empty? uu repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput((n :: I) + m,frst(uu),xxx),l)
uu := rst uu
if showAll?() then
for n in (count + 1).. while explicitEntries? uu and _
not eq?(uu,rst uu) repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput((n::I) + m,frst(uu),xxx),l)
uu := rst uu
l :=
diff --git a/src/algebra/leadcdet.spad.pamphlet b/src/algebra/leadcdet.spad.pamphlet
index 73635266..21a1048f 100644
--- a/src/algebra/leadcdet.spad.pamphlet
+++ b/src/algebra/leadcdet.spad.pamphlet
@@ -62,7 +62,7 @@ LeadingCoefDetermination(OV,E,Z,P) : C == T
q := unitNormal(lval.i).canonical
for j in 0..(i-1)::NNI repeat
y := distlist.((i-j)::NNI)
- while y^=1 repeat
+ while y~=1 repeat
y := gcd(y,q)
q := q quo y
if q=1 then return false
@@ -87,7 +87,7 @@ LeadingCoefDetermination(OV,E,Z,P) : C == T
d := vl.i quo d
unilist.i := d*unilist.i
contm := contm quo d
- if contm ^=1 then for i in 1..nf repeat pl.i := contm*pl.i
+ if contm ~=1 then for i in 1..nf repeat pl.i := contm*pl.i
[pl,contm,unilist]$LeadFact
distFact(contm:Z,unilist:List(BP),plead:FinalFact,
@@ -109,7 +109,7 @@ LeadingCoefDetermination(OV,E,Z,P) : C == T
for k in 1..(# lpol) repeat
lexp.k=0 => "next factor"
h:= checkpow(vl.k,c)
- if h ^=0 then
+ if h ~=0 then
if h>lexp.k then return "failed"
lexp.k:=lexp.k-h
aux.i := aux.i*(lpol.k ** h)
@@ -117,7 +117,7 @@ LeadingCoefDetermination(OV,E,Z,P) : C == T
vlp.i:= vlp.i*d
c:= c quo d
if contm=1 then vlp.i:=c
- for k in 1..(# lpol) repeat if lexp.k ^= 0 then return "failed"
+ for k in 1..(# lpol) repeat if lexp.k ~= 0 then return "failed"
contm =1 => [[vlp.i*aux.i for i in 1..nf],1,unilist]$LeadFact
distribute(contm,unilist,aux,vlp,lvar,lval)
diff --git a/src/algebra/limitps.spad.pamphlet b/src/algebra/limitps.spad.pamphlet
index a388417e..9e8b3b53 100644
--- a/src/algebra/limitps.spad.pamphlet
+++ b/src/algebra/limitps.spad.pamphlet
@@ -151,7 +151,7 @@ PowerSeriesLimitPackage(R,FE): Exports == Implementation where
for k in xkers repeat
(fval := limitPlus(k::FE,x)) case "failed" =>
return specialLimitNormalize(fcn,x)
- whatInfinity(val := fval::OFE) ^= 0 =>
+ whatInfinity(val := fval::OFE) ~= 0 =>
return specialLimitNormalize(fcn,x)
(valu := retractIfCan(val)@Union(FE,"failed")) case "failed" =>
return specialLimitNormalize(fcn,x)
@@ -163,11 +163,11 @@ PowerSeriesLimitPackage(R,FE): Exports == Implementation where
specialLimitNormalize(fcn,x) == -- tries to normalize result first
nfcn := normalize(fcn)
- fcn ^= nfcn => limitPlus(nfcn,x)
+ fcn ~= nfcn => limitPlus(nfcn,x)
xkers := [k for k in tower fcn | member?(x,variables(k::FE))]
- # xkers ^= 2 => "failed"
+ # xkers ~= 2 => "failed"
expKers := [k for k in xkers | is?(k, "exp" :: Symbol)]
- # expKers ^= 1 => "failed"
+ # expKers ~= 1 => "failed"
-- fcn is a rational function of x and exp(g(x)) for some rational function g
expKer := first expKers
(fval := limitPlus(expKer::FE,x)) case "failed" => "failed"
@@ -188,7 +188,7 @@ PowerSeriesLimitPackage(R,FE): Exports == Implementation where
specialLimit1(fcn,x) ==
-- find the first interesting kernel in tower(fcn)
xkers := [k for k in kernels fcn | member?(x,variables(k::FE))]
- #xkers ^= 1 => "failed"
+ #xkers ~= 1 => "failed"
ker := first xkers
vv := new()$SY; eq : EQ FE := equation(ker :: FE,vv :: FE)
cc := eval(fcn,eq)
@@ -631,7 +631,7 @@ ElementaryFunctionSign(R,F): Exports == Implementation where
n * plusInfinity()$ORF
ofesign a ==
- (n := whatInfinity a) ^= 0 => convert(n)@Z
+ (n := whatInfinity a) ~= 0 => convert(n)@Z
sign(retract(a)@F)
insign(f, x, a, m) ==
@@ -641,7 +641,7 @@ ElementaryFunctionSign(R,F): Exports == Implementation where
eq : Equation OFE := equation(x :: F :: OFE,a)
(u := limit(f,eq)) case "failed" => "failed"
u case OFE =>
- (n := whatInfinity(u::OFE)) ^= 0 => convert(n)@Z
+ (n := whatInfinity(u::OFE)) ~= 0 => convert(n)@Z
(v := retract(u::OFE)@F) = 0 =>
(s := insign(differentiate(f, x), x, a, m + 1)) case "failed"
=> "failed"
@@ -663,7 +663,7 @@ ElementaryFunctionSign(R,F): Exports == Implementation where
eq : Equation F := equation(x :: F,a)
(u := limit(f,eq,st)) case "failed" => "failed"
u case OFE =>
- (n := whatInfinity(u::OFE)) ^= 0 => convert(n)@Z
+ (n := whatInfinity(u::OFE)) ~= 0 => convert(n)@Z
(v := retract(u::OFE)@F) = 0 =>
(s := psign(differentiate(f,x),x,a,st,m + 1)) case "failed"=>
"failed"
diff --git a/src/algebra/lingrob.spad.pamphlet b/src/algebra/lingrob.spad.pamphlet
index 29e2b34f..290c39e6 100644
--- a/src/algebra/lingrob.spad.pamphlet
+++ b/src/algebra/lingrob.spad.pamphlet
@@ -115,7 +115,7 @@ LinGroebnerPackage(lv,F) : C == T
ofirstmon:DPoly:=1$DPoly
orecfmon:Record(poly:HDPoly, mult:F) := [1,1]
i:NNI:=2
- while (firstmon:=choosemon(firstmon,ltresult))^=1 repeat
+ while (firstmon:=choosemon(firstmon,ltresult))~=1 repeat
if (v:=firstmon exquo ofirstmon) case "failed" then
recfmon:=rRedPol(transform firstmon,B)
else
@@ -213,7 +213,7 @@ LinGroebnerPackage(lv,F) : C == T
part:List HDPoly :=[]
for f in lr repeat
g:=x::HDPoly * f
- if redPo(g,mB).poly^=0 then part:=concat(g,part)
+ if redPo(g,mB).poly~=0 then part:=concat(g,part)
concat(part,intcompBasis(x,part,mB))
----- coordinate of f with respect to the basis B -----
@@ -221,7 +221,7 @@ LinGroebnerPackage(lv,F) : C == T
coord(f:HDPoly,B:List HDPoly) : VF ==
ndim := #B
vv:VF:=new(ndim,0$F)$VF
- while f^=0 repeat
+ while f~=0 repeat
rf := reductum f
lf := f-rf
lcf := leadingCoefficient f
@@ -241,7 +241,7 @@ LinGroebnerPackage(lv,F) : C == T
for x in reverse lvar repeat
xx:=x ::DPoly
mf:=xx*mf
- if redPo(mf,nB).poly ^= 0 then return mf
+ if redPo(mf,nB).poly ~= 0 then return mf
dx := degree(mf,x)
mf := (mf exquo (xx ** dx))::DPoly
mf
@@ -272,7 +272,7 @@ LinGroebnerPackage(lv,F) : C == T
ofirstmon:DPoly:=1$DPoly
orecfmon:Record(poly:HDPoly, mult:F) := [1,1]
lx:= lvar.last
- while (firstmon:=choosemon(firstmon,ltresult))^=1 repeat
+ while (firstmon:=choosemon(firstmon,ltresult))~=1 repeat
if (v:=firstmon exquo ofirstmon) case "failed" then
recfmon:=rRedPol(transform(eval(firstmon,lx,nval)),B)
else
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet
index 93c7b627..e702f8f1 100644
--- a/src/algebra/list.spad.pamphlet
+++ b/src/algebra/list.spad.pamphlet
@@ -118,7 +118,7 @@ IndexedList(S:Type, mn:Integer): Exports == Implementation where
x = y ==
Qeq(x,y) => true
while not Qnull x and not Qnull y repeat
- Qfirst x ^=$S Qfirst y => return false
+ Qfirst x ~=$S Qfirst y => return false
x := Qrest x
y := Qrest y
Qnull x and Qnull y
@@ -1533,7 +1533,7 @@ AssociationList(Key:SetCategory, Entry:SetCategory):
first(l).entry
prev := l
curr := rest l
- while not empty? curr and first(curr).key ^= k repeat
+ while not empty? curr and first(curr).key ~= k repeat
prev := curr
curr := rest curr
empty? curr => "failed"
diff --git a/src/algebra/listgcd.spad.pamphlet b/src/algebra/listgcd.spad.pamphlet
index f626adbd..2f4ccde4 100644
--- a/src/algebra/listgcd.spad.pamphlet
+++ b/src/algebra/listgcd.spad.pamphlet
@@ -78,7 +78,7 @@ HeuGcd (BP):C == T
--compute the height of a polynomial
height(f:BP):PI ==
k:PI:=1
- while f^=0 repeat
+ while f~=0 repeat
k:=max(k,abs(leadingCoefficient(f)@Z)::PI)
f:=reductum f
k
@@ -88,7 +88,7 @@ HeuGcd (BP):C == T
genpoly(dval:Z,value:PI):BP ==
d:=0$BP
val:=dval
- for i in 0.. while (val^=0) repeat
+ for i in 0.. while (val~=0) repeat
val1:=negShiftz(val rem value,value)
d:= d+monomial(val1,i)
val:=(val-val1) quo value
diff --git a/src/algebra/lmdict.spad.pamphlet b/src/algebra/lmdict.spad.pamphlet
index cba196e2..f7b820f5 100644
--- a/src/algebra/lmdict.spad.pamphlet
+++ b/src/algebra/lmdict.spad.pamphlet
@@ -140,7 +140,7 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
a := copy s
while not empty? a repeat
x := inspect a
- count(x, s) ^= count(x, t) => return false
+ count(x, s) ~= count(x, t) => return false
remove_!(x, a)
true
diff --git a/src/algebra/lodo.spad.pamphlet b/src/algebra/lodo.spad.pamphlet
index c25901eb..dbf0cdbc 100644
--- a/src/algebra/lodo.spad.pamphlet
+++ b/src/algebra/lodo.spad.pamphlet
@@ -59,7 +59,7 @@ LinearOrdinaryDifferentialOperatorCategory(A:Ring): Category ==
adjoint a ==
ans:% := 0
- while a ^= 0 repeat
+ while a ~= 0 repeat
ans := ans + m1monom(degree a) * leadingCoefficient(a)::%
a := reductum a
ans
@@ -118,7 +118,7 @@ LinearOrdinaryDifferentialOperatorsOps(A, L): Exports == Implementation where
killer : (P, N, List V, List P, A -> A) -> L
vec2LODO : Vector A -> L
- nonTrivial? v == any?(#1 ^= 0, v)$Vector(A)
+ nonTrivial? v == any?(#1 ~= 0, v)$Vector(A)
vec2LODO v == +/[monomial(v.i, (i-1)::N) for i in 1..#v]
symmetricPower(l, m, diff) ==
@@ -164,7 +164,7 @@ LinearOrdinaryDifferentialOperatorsOps(A, L): Exports == Implementation where
applyLODO(l, v) ==
p:P := 0
- while l ^= 0 repeat
+ while l ~= 0 repeat
p := p + monomial(leadingCoefficient(l)::P,
differentiate(v, degree l), 1)
l := reductum l
diff --git a/src/algebra/lodof.spad.pamphlet b/src/algebra/lodof.spad.pamphlet
index fd72c15a..3a35261a 100644
--- a/src/algebra/lodof.spad.pamphlet
+++ b/src/algebra/lodof.spad.pamphlet
@@ -149,7 +149,7 @@ SetOfMIntegersInOneToN(m, n): Exports == Implementation where
while found < k repeat
if b.i then found := found + 1
if found < k then i := i + 1
- b.p and i ^= p => "failed"
+ b.p and i ~= p => "failed"
newb := copy b
newb.p := true
newb.i := false
@@ -309,7 +309,7 @@ AssociatedEquations(R, L):Exports == Implementation where
u := incrementKthElement(wi, k::PI)$S
if u case S then eq(lookup(u::S)) := 1
if member?(n, wi) then
- for j in 1..n | a.j ^= 0 repeat
+ for j in 1..n | a.j ~= 0 repeat
u := replaceKthElement(wi, m, j::PI)
if u case S then
eq(lookup(u::S)) := (odd? delta(wi, m, j::PI) => -a.j; a.j)
@@ -334,8 +334,8 @@ AssociatedEquations(R, L):Exports == Implementation where
computeIt: (L, PI, N) -> REC
makeeq(v, m, i, n) ==
- [v.i, makeop row(m, i) - 1, [v.j for j in 1..n | j ^= i],
- [makeop row(m, j) for j in 1..n | j ^= i]]
+ [v.i, makeop row(m, i) - 1, [v.j for j in 1..n | j ~= i],
+ [makeop row(m, j) for j in 1..n | j ~= i]]
associatedEquations(op, m) ==
(u := firstUncouplingMatrix(op, m)) case "failed" => computeIt(op,m,1)
@@ -414,7 +414,7 @@ LinearOrdinaryDifferentialOperatorFactorizer(F, UP): Exports == Impl where
first sol
expsols(l, zeros, ezfactor, all?) ==
- sol := [differentiate(f)/f for f in ratDsolve(l, 0).basis | f ^= 0]
+ sol := [differentiate(f)/f for f in ratDsolve(l, 0).basis | f ~= 0]
not(all? or empty? sol) => sol
concat(sol, ricDsolve(l, zeros, ezfactor))
diff --git a/src/algebra/lodop.spad.pamphlet b/src/algebra/lodop.spad.pamphlet
index f1e5eebb..680ed017 100644
--- a/src/algebra/lodop.spad.pamphlet
+++ b/src/algebra/lodop.spad.pamphlet
@@ -34,7 +34,7 @@
++
++ Note that multiplication is not necessarily commutative.
++ In fact, if \spad{a} is in \spad{R}, it is quite normal
-++ to have \spad{a*G \^= G*a}.
+++ to have \spad{a*G \~= G*a}.
MonogenicLinearOperator(R): Category == Defn where
E ==> NonNegativeInteger
@@ -46,7 +46,7 @@ MonogenicLinearOperator(R): Category == Defn where
++ \spad{l = sum(monomial(a(i),i), i = 0..n)}.
minimumDegree: $ -> E
++ minimumDegree(l) is the smallest \spad{k} such that
- ++ \spad{a(k) \^= 0} if
+ ++ \spad{a(k) \~= 0} if
++ \spad{l = sum(monomial(a(i),i), i = 0..n)}.
leadingCoefficient: $ -> R
++ leadingCoefficient(l) is \spad{a(n)} if
@@ -163,7 +163,7 @@ NonCommutativeOperatorDivision(P, F): PDcat == PDdef where
q: P := 0
r: P := a
iv:F := inv leadingCoefficient b
- while degree r >= degree b and r ^= 0 repeat
+ while degree r >= degree b and r ~= 0 repeat
h := monomial(iv*leadingCoefficient r,
(degree r - degree b)::NonNegativeInteger)$P
r := r - b*h
@@ -189,7 +189,7 @@ NonCommutativeOperatorDivision(P, F): PDcat == PDdef where
b0 := b
u := monomial(1,0)$P
v := 0
- while leadingCoefficient b ^= 0 repeat
+ while leadingCoefficient b ~= 0 repeat
qr := leftDivide(a,b)
(a, b) := (b, qr.remainder)
(u, v) := (u*qr.quotient+v, u)
diff --git a/src/algebra/manip.spad.pamphlet b/src/algebra/manip.spad.pamphlet
index 2322ac7c..5cad4e61 100644
--- a/src/algebra/manip.spad.pamphlet
+++ b/src/algebra/manip.spad.pamphlet
@@ -368,8 +368,8 @@ AlgebraicManipulations(R, F): Exports == Implementation where
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)) =>
+-- (x ~= -1) and (one?(num := numer x) or (num = -1)) =>
+ (x ~= -1) and (((num := numer x) = 1) 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)
@@ -752,7 +752,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
supexp(p, f1, f2, bse) ==
ans:F := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
g := htrigs(leadingCoefficient(p)::F)
if ((d := degree(p)::Z - bse) >= 0) then
ans := ans + g * f1 ** d
@@ -781,7 +781,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
exlog(numer(x := expand arg)) - exlog denom x
num := numer arg
den := denom arg
- (b := (reductum num) / den) ^= 0 =>
+ (b := (reductum num) / den) ~= 0 =>
a := (leadingMonomial num) / den
is?(op, "exp"::Symbol) => exp(expand a) * expand(exp b)
is?(op, "sin"::Symbol) =>
@@ -801,7 +801,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
smpexp p ==
ans:F := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
ans := ans + termexp leadingMonomial p
p := reductum p
ans
diff --git a/src/algebra/matcat.spad.pamphlet b/src/algebra/matcat.spad.pamphlet
index f7bc1ef8..90b62b28 100644
--- a/src/algebra/matcat.spad.pamphlet
+++ b/src/algebra/matcat.spad.pamphlet
@@ -225,24 +225,24 @@ MatrixCategory(R,Row,Col): Category == Definition where
diagonal? x ==
not square? x => false
for i in minr x .. maxr x repeat
- for j in minc x .. maxc x | (j - minc x) ^= (i - minr x) repeat
+ for j in minc x .. maxc x | (j - minc x) ~= (i - minr x) repeat
not zero? qelt(x, i, j) => return false
true
symmetric? x ==
- (nRows := nrows x) ^= ncols x => false
+ (nRows := nrows x) ~= ncols x => false
mr := minRowIndex x; mc := minColIndex x
for i in 0..(nRows - 1) repeat
for j in (i + 1)..(nRows - 1) repeat
- qelt(x,mr + i,mc + j) ^= qelt(x,mr + j,mc + i) => return false
+ qelt(x,mr + i,mc + j) ~= qelt(x,mr + j,mc + i) => return false
true
antisymmetric? x ==
- (nRows := nrows x) ^= ncols x => false
+ (nRows := nrows x) ~= ncols x => false
mr := minRowIndex x; mc := minColIndex x
for i in 0..(nRows - 1) repeat
for j in i..(nRows - 1) repeat
- qelt(x,mr + i,mc + j) ^= -qelt(x,mr + j,mc + i) =>
+ qelt(x,mr + i,mc + j) ~= -qelt(x,mr + j,mc + i) =>
return false
true
@@ -256,7 +256,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
rows : NonNegativeInteger := 1; cols := # first l
cols = 0 => error "matrices with zero columns are not supported"
for ll in rest l repeat
- cols ^= # ll => error "matrix: rows of different lengths"
+ cols ~= # ll => error "matrix: rows of different lengths"
rows := rows + 1
ans := new(rows,cols,0)
for i in minr(ans)..maxr(ans) for ll in l repeat
@@ -323,7 +323,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
ans
horizConcat(x,y) ==
- (rows := nrows x) ^= nrows y =>
+ (rows := nrows x) ~= nrows y =>
error "HConcat: matrices must have same number of rows"
ans := new(rows,(cols := ncols x) + ncols y,0)
for i in minr(x)..maxr(x) repeat
@@ -335,7 +335,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
ans
vertConcat(x,y) ==
- (cols := ncols x) ^= ncols y =>
+ (cols := ncols x) ~= ncols y =>
error "HConcat: matrices must have same number of columns"
ans := new((rows := nrows x) + nrows y,cols,0)
for i in minr(x)..maxr(x) repeat
@@ -397,7 +397,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
for ej in colList repeat
(ej < minc(x)) or (ej > maxc(x)) =>
error "setelt: index out of range"
- ((# rowList) ^= (nrows y)) or ((# colList) ^= (ncols y)) =>
+ ((# rowList) ~= (nrows y)) or ((# colList) ~= (ncols y)) =>
error "setelt: matrix has bad dimensions"
for ei in rowList for i in minr(y)..maxr(y) repeat
for ej in colList for j in minc(y)..maxc(y) repeat
@@ -434,7 +434,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
--% Arithmetic
x + y ==
- ((r := nrows x) ^= nrows y) or ((c := ncols x) ^= ncols y) =>
+ ((r := nrows x) ~= nrows y) or ((c := ncols x) ~= ncols y) =>
error "can't add matrices of different dimensions"
ans := new(r,c,0)
for i in minr(x)..maxr(x) repeat
@@ -443,7 +443,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
ans
x - y ==
- ((r := nrows x) ^= nrows y) or ((c := ncols x) ^= ncols y) =>
+ ((r := nrows x) ~= nrows y) or ((c := ncols x) ~= ncols y) =>
error "can't subtract matrices of different dimensions"
ans := new(r,c,0)
for i in minr(x)..maxr(x) repeat
@@ -458,7 +458,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
m:Integer * x:% == map(m * #1,x)
x:% * y:% ==
- (ncols x ^= nrows y) =>
+ (ncols x ~= nrows y) =>
error "can't multiply matrices of incompatible dimensions"
ans := new(nrows x,ncols y,0)
for i in minr(x)..maxr(x) repeat
@@ -492,8 +492,8 @@ MatrixCategory(R,Row,Col): Category == Definition where
if Col has shallowlyMutable then
x:% * v:Col ==
- ncols(x) ^= #v =>
- error "can't multiply matrix A and vector v if #cols A ^= #v"
+ ncols(x) ~= #v =>
+ error "can't multiply matrix A and vector v if #cols A ~= #v"
w : Col := new(nrows x,0)
for i in minr(x)..maxr(x) for k in mini(w)..maxi(w) repeat
w.k :=
@@ -506,8 +506,8 @@ MatrixCategory(R,Row,Col): Category == Definition where
if Row has shallowlyMutable then
v:Row * x:% ==
- nrows(x) ^= #v =>
- error "can't multiply vector v and matrix A if #rows A ^= #v"
+ nrows(x) ~= #v =>
+ error "can't multiply vector v and matrix A if #rows A ~= #v"
w : Row := new(ncols x,0)
for j in minc(x)..maxc(x) for k in mini(w)..maxi(w) repeat
w.k :=
@@ -682,24 +682,24 @@ RectangularMatrixCategory(m,n,R,Row,Col): Category == Definition where
not square? x => false
for i in minRowIndex x .. maxRowIndex x repeat
for j in minColIndex x .. maxColIndex x
- | (j - minColIndex x) ^= (i - minRowIndex x) repeat
+ | (j - minColIndex x) ~= (i - minRowIndex x) repeat
not zero? qelt(x, i, j) => return false
true
symmetric? x ==
- m ^= n => false
+ m ~= n => false
mr := minRowIndex x; mc := minColIndex x
for i in 0..(n - 1) repeat
for j in (i + 1)..(n - 1) repeat
- qelt(x,mr + i,mc + j) ^= qelt(x,mr + j,mc + i) => return false
+ qelt(x,mr + i,mc + j) ~= qelt(x,mr + j,mc + i) => return false
true
antisymmetric? x ==
- m ^= n => false
+ m ~= n => false
mr := minRowIndex x; mc := minColIndex x
for i in 0..(n - 1) repeat
for j in i..(n - 1) repeat
- qelt(x,mr + i,mc + j) ^= -qelt(x,mr + j,mc + i) =>
+ qelt(x,mr + i,mc + j) ~= -qelt(x,mr + j,mc + i) =>
return false
true
diff --git a/src/algebra/matfuns.spad.pamphlet b/src/algebra/matfuns.spad.pamphlet
index 59d08748..776895ee 100644
--- a/src/algebra/matfuns.spad.pamphlet
+++ b/src/algebra/matfuns.spad.pamphlet
@@ -66,7 +66,7 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_
-- determines if the ith row of x consists only of zeroes
-- internal function: no check on index i
for j in minColIndex(x)..maxColIndex(x) repeat
- qelt(x,i,j) ^= 0 => return false
+ qelt(x,i,j) ~= 0 => return false
true
colAllZeroes?: (M,I) -> Boolean
@@ -74,7 +74,7 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_
-- determines if the ith column of x consists only of zeroes
-- internal function: no check on index j
for i in minRowIndex(x)..maxRowIndex(x) repeat
- qelt(x,i,j) ^= 0 => return false
+ qelt(x,i,j) ~= 0 => return false
true
rowEchelon y ==
@@ -87,19 +87,19 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_
for j in minC..maxC repeat
i > maxR => return x
n := minR - 1
- -- n = smallest k such that k >= i and x(k,j) ^= 0
+ -- n = smallest k such that k >= i and x(k,j) ~= 0
for k in i..maxR repeat
- if qelt(x,k,j) ^= 0 then leave (n := k)
+ if qelt(x,k,j) ~= 0 then leave (n := k)
n = minR - 1 => "no non-zeroes"
-- put nth row in ith position
- if i ^= n then swapRows_!(x,i,n)
+ if i ~= n then swapRows_!(x,i,n)
-- divide ith row by its first non-zero entry
b := inv qelt(x,i,j)
qsetelt_!(x,i,j,1)
for k in (j+1)..maxC repeat qsetelt_!(x,i,k,b * qelt(x,i,k))
-- perform row operations so that jth column has only one 1
for k in minR..maxR repeat
- if k ^= i and qelt(x,k,j) ^= 0 then
+ if k ~= i and qelt(x,k,j) ~= 0 then
for k1 in (j+1)..maxC repeat
qsetelt_!(x,k,k1,qelt(x,k,k1) - qelt(x,k,j) * qelt(x,i,k1))
qsetelt_!(x,k,j,0)
@@ -160,7 +160,7 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_
qsetelt_!(w,l,1)
basis := cons(w,basis)
for k in minC..(j-1) for ll in minR..(l-1) repeat
- if qelt(v,k) ^= minR - 1 then
+ if qelt(v,k) ~= minR - 1 then
qsetelt_!(w,ll,-qelt(x,qelt(v,k),j))
qsetelt_!(w,l,1)
basis := cons(w,basis)
@@ -168,7 +168,7 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_
basis
determinant y ==
- (ndim := nrows y) ^= (ncols y) =>
+ (ndim := nrows y) ~= (ncols y) =>
error "determinant: matrix must be square"
-- Gaussian Elimination
ndim = 1 => qelt(y,minRowIndex y,minColIndex y)
@@ -180,13 +180,13 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_
if qelt(x,i,j) = 0 then
rown := minR - 1
for k in (i+1)..maxR repeat
- qelt(x,k,j) ^= 0 => leave (rown := k)
+ qelt(x,k,j) ~= 0 => leave (rown := k)
if rown = minR - 1 then return 0
swapRows_!(x,i,rown); ans := -ans
ans := qelt(x,i,j) * ans; b := -inv qelt(x,i,j)
for l in (j+1)..maxC repeat qsetelt_!(x,i,l,b * qelt(x,i,l))
for k in (i+1)..maxR repeat
- if (b := qelt(x,k,j)) ^= 0 then
+ if (b := qelt(x,k,j)) ~= 0 then
for l in (j+1)..maxC repeat
qsetelt_!(x,k,l,qelt(x,k,l) + b * qelt(x,i,l))
qelt(x,maxR,maxC) * ans
@@ -208,7 +208,7 @@ InnerMatrixLinearAlgebraFunctions(R,Row,Col,M):_
map(elt(#1,0),yy)$MATCAT22
inverse x ==
- (ndim := nrows x) ^= (ncols x) =>
+ (ndim := nrows x) ~= (ncols x) =>
error "inverse: matrix must be square"
ndim = 2 =>
ans2 : M := zero(ndim, ndim)
@@ -457,10 +457,10 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
++ of first kind
elRow2! : (M,R,I,I) -> M
++ elRow2!(m,a,i,j) adds to row i a*row(m,j) : elementary operation of
- ++ second kind. (i ^=j)
+ ++ second kind. (i ~=j)
elColumn2! : (M,R,I,I) -> M
++ elColumn2!(m,a,i,j) adds to column i a*column(m,j) : elementary
- ++ operation of second kind. (i ^=j)
+ ++ operation of second kind. (i ~=j)
if R has IntegralDomain then
rank: M -> NonNegativeInteger
@@ -502,7 +502,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
-- determines if the ith row of x consists only of zeroes
-- internal function: no check on index i
for j in minColIndex(x)..maxColIndex(x) repeat
- qelt(x,i,j) ^= 0 => return false
+ qelt(x,i,j) ~= 0 => return false
true
colAllZeroes?: (M,I) -> Boolean
@@ -510,7 +510,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
-- determines if the ith column of x consists only of zeroes
-- internal function: no check on index j
for i in minRowIndex(x)..maxRowIndex(x) repeat
- qelt(x,i,j) ^= 0 => return false
+ qelt(x,i,j) ~= 0 => return false
true
minorDet:(M,I,List I,I,PrimitiveArray(Union(R,"uncomputed")))-> R
@@ -521,7 +521,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
j := first l; l := rest l; pos := true
minR := minRowIndex x; minC := minColIndex x;
repeat
- if qelt(x,j + minR,i + minC) ^= 0 then
+ if qelt(x,j + minR,i + minC) ~= 0 then
ans :=
md := minorDet(x,m - 2**(j :: NonNegativeInteger),_
concat_!(reverse rl,l),i + 1,v) *_
@@ -534,7 +534,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
pos := not pos; rl := cons(j,rl); j := first l; l := rest l
minordet x ==
- (ndim := nrows x) ^= (ncols x) =>
+ (ndim := nrows x) ~= (ncols x) =>
error "determinant: matrix must be square"
-- minor expansion with (s---loads of) memory
n1 : I := ndim - 1
@@ -553,14 +553,14 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
m
-- elementary operation of second kind: add to row i--
- -- a*row j (i^=j) --
+ -- a*row j (i~=j) --
elRow2!(m : M,a:R,i:I,j:I) : M ==
vec:= map(a*#1,row(m,j))
vec:=map("+",row(m,i),vec)
setRow!(m,i,vec)
m
-- elementary operation of second kind: add to column i --
- -- a*column j (i^=j) --
+ -- a*column j (i~=j) --
elColumn2!(m : M,a:R,i:I,j:I) : M ==
vec:= map(a*#1,column(m,j))
vec:=map("+",column(m,i),vec)
@@ -579,7 +579,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
if qelt(x,i,j) = 0 then -- candidate for pivot = 0
rown := minR - 1
for k in (i+1)..maxR repeat
- if qelt(x,k,j) ^= 0 then
+ if qelt(x,k,j) ~= 0 then
rown := k -- found a pivot
leave
if rown > minR - 1 then
@@ -623,14 +623,14 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
subMatrix(x,minR,maxR,maxC1,exCol)
invertIfCan(y) ==
- (nr:=nrows y) ^= (ncols y) =>
+ (nr:=nrows y) ~= (ncols y) =>
error "invertIfCan: matrix must be square"
adjRec := adjoint y
(den:=recip(adjRec.detMat)) case "failed" => "failed"
den::R * adjRec.adjMat
adjoint(y) ==
- (nr:=nrows y) ^= (ncols y) => error "adjoint: matrix must be square"
+ (nr:=nrows y) ~= (ncols y) => error "adjoint: matrix must be square"
maxR := maxRowIndex y
maxC := maxColIndex y
x := horizConcat(copy y,scalarMatrix(nr,1$R))
@@ -668,7 +668,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
nullSpace m == nullSpace(m)$IMATQF
determinant y ==
- (nrows y) ^= (ncols y) => error "determinant: matrix must be square"
+ (nrows y) ~= (ncols y) => error "determinant: matrix must be square"
fm:=fractionFreeGauss!(copy y)
fm(maxRowIndex fm,maxColIndex fm)
@@ -736,7 +736,7 @@ MatrixLinearAlgebraFunctions(R,Row,Col,M):Exports == Implementation where
un := unitNormal qelt(x,i,j)
qsetelt_!(x,i,j,un.canonical)
- if un.associate ^= 1 then for jj in (j+1)..maxC repeat
+ if un.associate ~= 1 then for jj in (j+1)..maxC repeat
qsetelt_!(x,i,jj,un.associate * qelt(x,i,jj))
xij := qelt(x,i,j)
diff --git a/src/algebra/mathml.spad.pamphlet b/src/algebra/mathml.spad.pamphlet
index 747dbfca..cde994f9 100644
--- a/src/algebra/mathml.spad.pamphlet
+++ b/src/algebra/mathml.spad.pamphlet
@@ -704,7 +704,7 @@ returning Void. I really only need the one coerce function.
-- Finds the closing ">" for either a start or end tag of a mathML
-- element, so the return value is the position of ">" in mathML.
pI:I := pos
- while (mathML.pI ^= char ">") repeat
+ while (mathML.pI ~= char ">") repeat
pI := pI+1
u:US := segment(pos,pI)$US
--sayTeX$Lisp "tagEnd: "mathML.u
@@ -899,8 +899,8 @@ have to be switched by swapping names.
-- {{{SUB}{y}{{CONCAT}{{CONCAT}{{CONCAT}{{CONCAT}{,}{1}}{{CONCAT}{,}{1}}}{{CONCAT}{,}{2}}}{{CONCAT}{,}{1}}}}{x}{z}}
atomE : L E := atomize(expr)
op : S := stringify first atomE
- op ^= "SUB" => "<mtext>Mistake in formatSub: no SUB</mtext>"
- stringify first rest rest atomE ^= "CONCAT" => "<mtext>Mistake in formatSub: no CONCAT</mtext>"
+ op ~= "SUB" => "<mtext>Mistake in formatSub: no SUB</mtext>"
+ stringify first rest rest atomE ~= "CONCAT" => "<mtext>Mistake in formatSub: no CONCAT</mtext>"
-- expecting form for atomE like
--[{SUB}{func}{CONCAT}...{CONCAT}{,}{n}{CONCAT}{,}{n}...{CONCAT}{,}{n}],
--counting the first CONCATs before the comma gives the number of
@@ -973,8 +973,8 @@ have to be switched by swapping names.
-- args is {{x}{z}}
atomE : L E := atomize(expr)
op : S := stringify first atomE
- op ^= "SUB" => "<mtext>Mistake in formatSub: no SUB</mtext>"
- stringify first rest rest atomE ^= "CONCAT" => "<mtext>Mistake in formatSub: no CONCAT</mtext>"
+ op ~= "SUB" => "<mtext>Mistake in formatSub: no SUB</mtext>"
+ stringify first rest rest atomE ~= "CONCAT" => "<mtext>Mistake in formatSub: no CONCAT</mtext>"
-- expecting form for atomE like
--[{SUB}{func}{CONCAT}...{CONCAT}{,}{n}{CONCAT}{,}{n}...{CONCAT}{,}{n}],
--counting the first CONCATs before the comma gives the number of
@@ -1024,8 +1024,8 @@ have to be switched by swapping names.
-- first have to divine the semantics, add cases as needed
atomE : L E := atomize(expr)
op : S := stringify first atomE
- op ^= "SUPERSUB" => "<mtext>Mistake in formatSuperSub: no SUPERSUB1</mtext>"
- #args ^= 1 => "<mtext>Mistake in SuperSub1: #args <> 1</mtext>"
+ op ~= "SUPERSUB" => "<mtext>Mistake in formatSuperSub: no SUPERSUB1</mtext>"
+ #args ~= 1 => "<mtext>Mistake in SuperSub1: #args <> 1</mtext>"
var : E := first args
-- should be looking at something like {{SUPERSUB}{var}{ }{,,...,}} for
-- example here's the second derivative of y w.r.t. x
@@ -1053,8 +1053,8 @@ have to be switched by swapping names.
-- first have to divine the semantics, add cases as needed
atomE : L E := atomize(expr)
op : S := stringify first atomE
- op ^= "SUPERSUB" => "<mtext>Mistake in formatSuperSub: no SUPERSUB</mtext>"
- #args ^= 1 => "<mtext>Mistake in SuperSub: #args <> 1</mtext>"
+ op ~= "SUPERSUB" => "<mtext>Mistake in formatSuperSub: no SUPERSUB</mtext>"
+ #args ~= 1 => "<mtext>Mistake in SuperSub: #args <> 1</mtext>"
var : E := first args
-- should be looking at something like {{SUPERSUB}{var}{ }{,,...,}} for
-- example here's the second derivative of y w.r.t. x
@@ -1079,7 +1079,7 @@ have to be switched by swapping names.
op = "INTSIGN" => formatIntSign(args,minPrec)
opPrec := plexPrecs.p
n : I := #args
- (n ^= 2) and (n ^= 3) => error "wrong number of arguments for plex"
+ (n ~= 2) and (n ~= 3) => error "wrong number of arguments for plex"
s : S :=
op = "SIGMA" =>
checkarg := true
@@ -1104,14 +1104,14 @@ have to be switched by swapping names.
"????"
hold := formatMml(first args,minPrec)
args := rest args
- if op ^= "INDEFINTEGRAL" then
- if hold ^= "" then
+ if op ~= "INDEFINTEGRAL" then
+ if hold ~= "" then
s := concat ["<munderover>",s,group hold]
else
s := concat ["<munderover>",s,group " "]
if not null rest args then
hold := formatMml(first args,minPrec)
- if hold ^= "" then
+ if hold ~= "" then
s := concat [s,group hold,"</munderover>"]
else
s := concat [s,group " ","</munderover>"]
diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet
index 3704e00e..a5c173dc 100644
--- a/src/algebra/matrix.spad.pamphlet
+++ b/src/algebra/matrix.spad.pamphlet
@@ -205,7 +205,7 @@ Matrix(R): Exports == Implementation where
-- -- error check: this is a top level function
-- cols := # v.mini(v)
-- for k in (mini(v) + 1)..maxi(v) repeat
--- cols ^= # v.k => error "matrix: rows of different lengths"
+-- cols ~= # v.k => error "matrix: rows of different lengths"
-- ans := new(rows,cols,0)
-- for i in minr(ans)..maxr(ans) for k in mini(v)..maxi(v) repeat
-- vv := v.k
@@ -303,9 +303,9 @@ RectangularMatrix(m,n,R): Exports == Implementation where
matrix(l: List List R) ==
-- error check: this is a top level function
- #l ^= m => error "matrix: wrong number of rows"
+ #l ~= m => error "matrix: wrong number of rows"
for ll in l repeat
- #ll ^= n => error "matrix: wrong number of columns"
+ #ll ~= n => error "matrix: wrong number of columns"
ans : Matrix R := new(m,n,0)
for i in minr(ans)..maxr(ans) for ll in l repeat
for j in minc(ans)..maxc(ans) for r in ll repeat
@@ -318,7 +318,7 @@ RectangularMatrix(m,n,R): Exports == Implementation where
coerce(x:$):Matrix(R) == copy(x pretend Matrix(R))
rectangularMatrix x ==
- (nrows(x) ^= m) or (ncols(x) ^= n) =>
+ (nrows(x) ~= m) or (ncols(x) ~= n) =>
error "rectangularMatrix: matrix of bad dimensions"
copy(x) pretend $
@@ -410,9 +410,9 @@ SquareMatrix(ndim,R): Exports == Implementation where
matrix(l: List List R) ==
-- error check: this is a top level function
- #l ^= ndim => error "matrix: wrong number of rows"
+ #l ~= ndim => error "matrix: wrong number of rows"
for ll in l repeat
- #ll ^= ndim => error "matrix: wrong number of columns"
+ #ll ~= ndim => error "matrix: wrong number of columns"
ans : Matrix R := new(ndim,ndim,0)
for i in minr(ans)..maxr(ans) for ll in l repeat
for j in minc(ans)..maxc(ans) for r in ll repeat
@@ -426,14 +426,14 @@ SquareMatrix(ndim,R): Exports == Implementation where
scalarMatrix r == scalarMatrix(ndim,r)$Matrix(R) pretend $
diagonalMatrix l ==
- #l ^= ndim =>
+ #l ~= ndim =>
error "diagonalMatrix: wrong number of entries in list"
diagonalMatrix(l)$Matrix(R) pretend $
coerce(x:$):Matrix(R) == copy(x pretend Matrix(R))
squareMatrix x ==
- (nrows(x) ^= ndim) or (ncols(x) ^= ndim) =>
+ (nrows(x) ~= ndim) or (ncols(x) ~= ndim) =>
error "squareMatrix: matrix of bad dimensions"
copy(x) pretend $
diff --git a/src/algebra/mfinfact.spad.pamphlet b/src/algebra/mfinfact.spad.pamphlet
index 685afc57..2e3a3183 100644
--- a/src/algebra/mfinfact.spad.pamphlet
+++ b/src/algebra/mfinfact.spad.pamphlet
@@ -213,12 +213,12 @@ MultFiniteFactorize(OV,E,F,PG) : C == T
ldeg:=ldeg.rest
lvar:=lvar.rest
- if varch.nvar.1 ^= x then
+ if varch.nvar.1 ~= x then
lvar:= varch.nvar
x := lvar.1
lvar:=lvar.rest
pc:= gcd coefficients um
- if pc^=1 then
+ if pc~=1 then
um:=(um exquo pc)::SUP P
ffactor:=multivariate(um,x)
for lcterm in mFactor(pc,dx).factors repeat
@@ -228,7 +228,7 @@ MultFiniteFactorize(OV,E,F,PG) : C == T
-- should be unitNormal if unified, but for now it is easier
lcum:F:= leadingCoefficient leadingCoefficient
leadingCoefficient um
- if lcum ^=1 then
+ if lcum ~=1 then
um:=((inv lcum)::R::P) * um
flead.contp := (lcum::R) *flead.contp
@@ -286,13 +286,13 @@ MultFiniteFactorize(OV,E,F,PG) : C == T
lpol:= dist.polfac
dd := dist.correct
unifact:=dist.corrfact
- if dd^=1 then
+ if dd~=1 then
unifact := [dd*unifact.i for i in 1..nfact]
um := ((dd**(nfact-1)::NNI)::P)*um
(ffin:= lifting(um,lvar,unifact,lval,lpol,ldeg,pM(unifact)))
case "failed" => intfact(um,lvar,ldeg,tleadpol,ltry)
factfin: L SUP P:=ffin :: L SUP P
- if dd^=1 then
+ if dd~=1 then
factfin:=[primitivePart ff for ff in factfin]
factfin
@@ -301,7 +301,7 @@ MultFiniteFactorize(OV,E,F,PG) : C == T
pushup(f:P,x:OV) :PG ==
ground? f => pushupconst((retract f)@R,x)
rr:PG:=0
- while f^=0 repeat
+ while f~=0 repeat
lf:=leadingMonomial f
cf:=pushupconst(leadingCoefficient f,x)
lvf:=variables lf
@@ -314,7 +314,7 @@ MultFiniteFactorize(OV,E,F,PG) : C == T
ground? g => ((retract g)@F)::R::P
rf:P:=0$P
ug:=univariate(g,x)
- while ug^=0 repeat
+ while ug~=0 repeat
cf:=monomial(1,degree ug)$R
rf:=rf+cf*pushdcoef(leadingCoefficient ug)
ug := reductum ug
@@ -324,7 +324,7 @@ MultFiniteFactorize(OV,E,F,PG) : C == T
pushupconst(r:R,x:OV):PG ==
ground? r => (retract r)@F ::PG
rr:PG:=0
- while r^=0 repeat
+ while r~=0 repeat
rr:=rr+monomial((leadingCoefficient r)::PG,x,degree r)$PG
r:=reductum r
rr
@@ -385,19 +385,19 @@ MultFiniteFactorize(OV,E,F,PG) : C == T
leadcomp1:=[retract eval(pol,lvar,lval) for pol in plist]
testp and or/[unit? epl for epl in leadcomp1] => range:=range+1
newm:SUP R:=completeEval(um,lvar,lval)
- degum ^= degree newm or minimumDegree newm ^=0 => range:=range+1
+ degum ~= degree newm or minimumDegree newm ~=0 => range:=range+1
lffc1:=content newm
newm:=(newm exquo lffc1)::SUP R
testp and leadtest and ^ polCase(lffc1*clc,#plist,leadcomp1)
=> range:=range+1
Dnewm := differentiate newm
D2newm := map(differentiate, newm)
- degree(gcd [newm,Dnewm,D2newm])^=0 => range:=range+1
+ degree(gcd [newm,Dnewm,D2newm])~=0 => range:=range+1
-- if R has Integer then luniv:=henselFact(newm,false)$
-- else
lcnm:F:=1
-- should be unitNormal if unified, but for now it is easier
- if (lcnm:=leadingCoefficient leadingCoefficient newm)^=1 then
+ if (lcnm:=leadingCoefficient leadingCoefficient newm)~=1 then
newm:=((inv lcnm)::R)*newm
dx:="max"/[degree uc for uc in coefficients newm]
luniv:=generalTwoFactor(newm)$TwoFactorize(F)
diff --git a/src/algebra/mlift.spad.jhd.pamphlet b/src/algebra/mlift.spad.jhd.pamphlet
index 637d1b32..ea1a70ed 100644
--- a/src/algebra/mlift.spad.jhd.pamphlet
+++ b/src/algebra/mlift.spad.jhd.pamphlet
@@ -82,7 +82,7 @@ MultivariateLifting(E,OV,R,P) : C == T
flcoef:=corrPoly(um,lvar,fval.rest,ld.rest,listpolv,table,pmod)
if flcoef case "failed" then return "failed"
else lcoef:=flcoef :: L SUP
- listcong:=[*/[flist.i for i in 1..np | i^=l] for l in 1..np]
+ listcong:=[*/[flist.i for i in 1..np | i~=l] for l in 1..np]
polc:SUP:= (monomial(1,y,1) - a)::SUP
pol := 1$SUP
diff:=m- +/[lcoef.i*listcong.i for i in 1..np]
@@ -156,13 +156,13 @@ MultivariateLifting(E,OV,R,P) : C == T
else lalpha:=flalpha :: L SUP
plist:=[term-alpha*pol for term in plist for alpha in lalpha]
for term in plist repeat degj:=degj-maxDegree(term,x)
- degj ^= 0 => return "failed"
+ degj ~= 0 => return "failed"
plist
--There are not extraneous factors
maxDegree(um:SUP,x:OV):NonNegativeInteger ==
ans:NonNegativeInteger:=0
- while um ^= 0 repeat
+ while um ~= 0 repeat
ans:=max(ans,degree(leadingCoefficient um,x))
um:=reductum um
ans
@@ -220,7 +220,7 @@ MultivariateLifting(E,OV,R,P) : C == T
new:=monomial(leadingCoefficient um,dm)
for k in dm-1..0 by -1 repeat
i:NNI:=k::NNI
- empty?(lterm) or lterm.first.expt^=i =>
+ empty?(lterm) or lterm.first.expt~=i =>
new:=new+monomial(coefficient(um,i),i)
new:=new+monomial(lterm.first.pcoef,i)
lterm:=lterm.rest
diff --git a/src/algebra/mlift.spad.pamphlet b/src/algebra/mlift.spad.pamphlet
index 4ec8d14c..8ccdf72a 100644
--- a/src/algebra/mlift.spad.pamphlet
+++ b/src/algebra/mlift.spad.pamphlet
@@ -85,7 +85,7 @@ MultivariateLifting(E,OV,R,P) : C == T
flcoef:=corrPoly(um,lvar,fval.rest,ld.rest,listpolv,table,pmod)
if flcoef case "failed" then return "failed"
else lcoef:=flcoef :: L SUP
- listcong:=[*/[flist.i for i in 1..np | i^=l] for l in 1..np]
+ listcong:=[*/[flist.i for i in 1..np | i~=l] for l in 1..np]
polc:SUP:= (monomial(1,y,1) - a)::SUP
pol := 1$SUP
diff:=m- +/[lcoef.i*listcong.i for i in 1..np]
@@ -167,7 +167,7 @@ MultivariateLifting(E,OV,R,P) : C == T
maxDegree(um:SUP,x:OV):NonNegativeInteger ==
ans:NonNegativeInteger:=0
- while um ^= 0 repeat
+ while um ~= 0 repeat
ans:=max(ans,degree(leadingCoefficient um,x))
um:=reductum um
ans
@@ -225,7 +225,7 @@ MultivariateLifting(E,OV,R,P) : C == T
new:=monomial(leadingCoefficient um,dm)
for k in dm-1..0 by -1 repeat
i:NNI:=k::NNI
- empty?(lterm) or lterm.first.expt^=i =>
+ empty?(lterm) or lterm.first.expt~=i =>
new:=new+monomial(coefficient(um,i),i)
new:=new+monomial(lterm.first.pcoef,i)
lterm:=lterm.rest
diff --git a/src/algebra/moddfact.spad.pamphlet b/src/algebra/moddfact.spad.pamphlet
index 19692d42..7c12510c 100644
--- a/src/algebra/moddfact.spad.pamphlet
+++ b/src/algebra/moddfact.spad.pamphlet
@@ -79,7 +79,7 @@ ModularDistinctDegreeFactorizer(U):C == T where
exactquo(u:U,v:U,p:I):Union(U,"failed") ==
invlcv:=modInverse(leadingCoefficient v,p)
r:=monicDivide(u,reduction(invlcv*v,p))
- reduction(r.remainder,p) ^=0 => "failed"
+ reduction(r.remainder,p) ~=0 => "failed"
reduction(invlcv*r.quotient,p)
EMR := EuclideanModularRing(Integer,U,Integer,
reduction,merge,exactquo)
@@ -114,7 +114,7 @@ ModularDistinctDegreeFactorizer(U):C == T where
ans::U
ddfactor(u) ==
- if (c:= lc(u)) ^= 1$I then u:= makeMonic(u)
+ if (c:= lc(u)) ~= 1$I then u:= makeMonic(u)
ans:= sepfact(ddfact(u))
cons(c::EMR,[makeMonic(f) for f in ans | degree(f) > 0])
@@ -133,7 +133,7 @@ ModularDistinctDegreeFactorizer(U):C == T where
w:= reduce(monomial(1,1)$U,p)
m:= w
d:I:= 1
- if (c:= lc(u)) ^= 1$I then u:= makeMonic u
+ if (c:= lc(u)) ~= 1$I then u:= makeMonic u
ans:DDList:= []
repeat
w:= exptmod(w,p,u)
@@ -173,7 +173,7 @@ ModularDistinctDegreeFactorizer(U):C == T where
u:= f.factor
p:=modulus u
(d := f.degree) = 0 => [u]
- if (c:= lc(u)) ^= 1$I then u:= makeMonic(u)
+ if (c:= lc(u)) ~= 1$I then u:= makeMonic(u)
d = (du := degree(u)) => [u]
ans:L EMR:= []
x:U:= monomial(1,1)
diff --git a/src/algebra/modgcd.spad.pamphlet b/src/algebra/modgcd.spad.pamphlet
index a2f056cf..f26ac49d 100644
--- a/src/algebra/modgcd.spad.pamphlet
+++ b/src/algebra/modgcd.spad.pamphlet
@@ -205,7 +205,7 @@ InnerModularGcd(R,BP,pMod,nextMod):C == T
exactquo(u:BP,v:BP,p:R):Union(BP,"failed") ==
invlcv:=modInverse(leadingCoefficient v,p)
r:=monicDivide(u,reduction(invlcv*v,p))
- reduction(r.remainder,p) ^=0 => "failed"
+ reduction(r.remainder,p) ~=0 => "failed"
reduction(invlcv*r.quotient,p)
diff --git a/src/algebra/modmon.spad.pamphlet b/src/algebra/modmon.spad.pamphlet
index cc8bebec..0d4241e2 100644
--- a/src/algebra/modmon.spad.pamphlet
+++ b/src/algebra/modmon.spad.pamphlet
@@ -75,7 +75,7 @@ ModMonic(R,Rep): C == T
setPoly (mon : Rep) ==
mon =$Rep m => mon
oldm := m
- leadingCoefficient mon ^= 1 => error "polynomial must be monic"
+ leadingCoefficient mon ~= 1 => error "polynomial must be monic"
-- following copy code needed since FFPOLY can modify mon
copymon:Rep:= 0
while not zero? mon repeat
@@ -141,7 +141,7 @@ ModMonic(R,Rep): C == T
frobenius(a:%):% ==
aq:% := 0
- while a^=0 repeat
+ while a~=0 repeat
aq:= aq + leadingCoefficient(a)*frobeniusPower(degree a)
a := reductum a
aq
diff --git a/src/algebra/modmonom.spad.pamphlet b/src/algebra/modmonom.spad.pamphlet
index f96b812c..593d5aa8 100644
--- a/src/algebra/modmonom.spad.pamphlet
+++ b/src/algebra/modmonom.spad.pamphlet
@@ -96,7 +96,7 @@ GeneralModulePolynomial(vl, R, IS, E, ff, P): public == private where
-----------------------------------------------------------------------------
- ---- WARNING: assumes c ^= 0
+ ---- WARNING: assumes c ~= 0
multMonom(c:R, e:E, mp:$):$ ==
zero? mp => mp
diff --git a/src/algebra/modring.spad.pamphlet b/src/algebra/modring.spad.pamphlet
index 015a5c84..bfd9912a 100644
--- a/src/algebra/modring.spad.pamphlet
+++ b/src/algebra/modring.spad.pamphlet
@@ -85,7 +85,7 @@ ModularRing(R,Mod,reduction:(R,Mod) -> R,
exQuo(x,y) ==
xm:=x.modulo
- if xm ^=$Mod y.modulo then xm:=newmodulo(xm,y.modulo)
+ if xm ~=$Mod y.modulo then xm:=newmodulo(xm,y.modulo)
r:=exactQuo(x.val,y.val,xm)
r case "failed"=> "failed"
[r::R,xm]$Rep
diff --git a/src/algebra/mring.spad.pamphlet b/src/algebra/mring.spad.pamphlet
index 04c50f32..3d2ca1c7 100644
--- a/src/algebra/mring.spad.pamphlet
+++ b/src/algebra/mring.spad.pamphlet
@@ -109,7 +109,7 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where
for j in 0.. while i > 0 repeat
h := i rem p
-- we use index(p) = 0$R
- if h ^= 0 then
+ if h ~= 0 then
c : R := index(h :: PositiveInteger)$R
m : M := index((j+n) :: PositiveInteger)$M
--ans := ans + c *$% m
@@ -161,7 +161,7 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where
else
(r:R) * (a:%) ==
r = 0 => 0
- [[rt, t.Mn] for t in a | (rt:=r*t.Cf) ^= 0]
+ [[rt, t.Mn] for t in a | (rt:=r*t.Cf) ~= 0]
if R has noZeroDivisors
then
(n:Integer) * (a:%) ==
@@ -170,8 +170,8 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where
else
(n:Integer) * (a:%) ==
n = 0 => 0
- [[nt, t.Mn] for t in a | (nt:=n*t.Cf) ^= 0]
- map(f, a) == [[ft, t.Mn] for t in a | (ft:=f(t.Cf)) ^= 0]
+ [[nt, t.Mn] for t in a | (nt:=n*t.Cf) ~= 0]
+ map(f, a) == [[ft, t.Mn] for t in a | (ft:=f(t.Cf)) ~= 0]
numberOfMonomials a == #a
retractIfCan(a:%):Union(M, "failed") ==
@@ -188,13 +188,13 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where
if M has Group then
recip a ==
lt := terms a
- #lt ^= 1 => "failed"
+ #lt ~= 1 => "failed"
(u := recip lt.first.Cf) case "failed" => "failed"
--(u::R) * inv lt.first.Mn
monomial((u::R), inv lt.first.Mn)$%
else
recip a ==
- #a ^= 1 or a.first.Mn ^= 1 => "failed"
+ #a ~= 1 or a.first.Mn ~= 1 => "failed"
(u := recip a.first.Cf) case "failed" => "failed"
u::R::%
@@ -215,9 +215,9 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where
reductum a == (empty? a => a; rest a)
a = b ==
- #a ^= #b => false
+ #a ~= #b => false
for ta in a for tb in b repeat
- ta.Cf ^= tb.Cf or ta.Mn ^= tb.Mn => return false
+ ta.Cf ~= tb.Cf or ta.Mn ~= tb.Mn => return false
true
a + b ==
@@ -298,7 +298,7 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where
else -- M hasn't OrderedSet
-- Terms are stored in random order.
a = b ==
- #a ^= #b => false
+ #a ~= #b => false
brace(a pretend List(Term)) =$Set(Term) brace(b pretend List(Term))
coefficient(a, m) ==
diff --git a/src/algebra/mset.spad.pamphlet b/src/algebra/mset.spad.pamphlet
index abe5d56d..678265f9 100644
--- a/src/algebra/mset.spad.pamphlet
+++ b/src/algebra/mset.spad.pamphlet
@@ -269,13 +269,13 @@ Multiset(S: SetCategory): MultisetAggregate S with
union(difference(m1,m2), difference(m2,m1))
m1 = m2 ==
- m1.count ^= m2.count => false
+ m1.count ~= m2.count => false
t1 := m1.table
t2 := m2.table
for e in keys t1 repeat
- t1.e ^= t2.e => return false
+ t1.e ~= t2.e => return false
for e in keys t2 repeat
- t1.e ^= t2.e => return false
+ t1.e ~= t2.e => return false
true
m1 < m2 ==
diff --git a/src/algebra/mts.spad.pamphlet b/src/algebra/mts.spad.pamphlet
index a7335877..1d26d0a1 100644
--- a/src/algebra/mts.spad.pamphlet
+++ b/src/algebra/mts.spad.pamphlet
@@ -142,7 +142,7 @@ SparseMultivariateTaylorSeries(Coef,Var,SMP):_
rst s
eval(s:%,v:L Var,q:L %) ==
- #v ^= #q =>
+ #v ~= #q =>
error "eval: number of variables should equal number of values"
nq : L StS := [restCheck(i pretend StS) for i in q]
addiag(map(csubst(v,nq),s pretend StS)$ST2(SMP,StS))$STT pretend %
@@ -250,12 +250,12 @@ SparseMultivariateTaylorSeries(Coef,Var,SMP):_
n : NNI; count : NNI := _$streamCount$Lisp
l : List OUT := empty()
for n in 0..count while not empty? uu repeat
- if frst(uu) ^= 0 then l := concat(tout frst uu,l)
+ if frst(uu) ~= 0 then l := concat(tout frst uu,l)
uu := rst uu
if showAll?() then
for n in n.. while explicitEntries? uu and _
not eq?(uu,rst uu) repeat
- if frst(uu) ^= 0 then l := concat(tout frst uu,l)
+ if frst(uu) ~= 0 then l := concat(tout frst uu,l)
uu := rst uu
l :=
explicitlyEmpty? uu => l
diff --git a/src/algebra/multfact.spad.pamphlet b/src/algebra/multfact.spad.pamphlet
index 6efcd462..0aa0bb59 100644
--- a/src/algebra/multfact.spad.pamphlet
+++ b/src/algebra/multfact.spad.pamphlet
@@ -182,7 +182,7 @@ InnerMultFact(OV,E,R,P) : C == T
"max"/[numberOfMonomials ff for ff in lum]
"max"/[+/[euclideanSize cc for i in 0..degree ff|
- (cc:= coefficient(ff,i))^=0] for ff in lum]
+ (cc:= coefficient(ff,i))~=0] for ff in lum]
--- Choose the integer to reduce to univariate case ---
intChoose(um:USP,lvar:L OV,clc:R,plist:L P,ltry:L L R,
@@ -220,12 +220,12 @@ InnerMultFact(OV,E,R,P) : C == T
leadcomp1:=[retract eval(pol,lvar,lval) for pol in plist]
testp and or/[unit? epl for epl in leadcomp1] => range:=2*range
newm:BP:=completeEval(um,lvar,lval)
- degum ^= degree newm or minimumDegree newm ^=0 => range:=2*range
+ degum ~= degree newm or minimumDegree newm ~=0 => range:=2*range
lffc1:=content newm
newm:=(newm exquo lffc1)::BP
testp and leadtest and ^ polCase(lffc1*clc,#plist,leadcomp1)
=> range:=2*range
- degree(gcd [newm,differentiate(newm)])^=0 => range:=2*range
+ degree(gcd [newm,differentiate(newm)])~=0 => range:=2*range
luniv:=ufactor(newm)
lunivf:= factors luniv
lffc1:R:=retract(unit luniv)@R * lffc1
@@ -325,7 +325,7 @@ InnerMultFact(OV,E,R,P) : C == T
lpol:= dist.polfac
dd := dist.correct
unifact:=dist.corrfact
- if dd^=1 then
+ if dd~=1 then
-- if polcase then lpol := [unitCanonical lp for lp in lpol]
-- dd:=unitCanonical(dd)
unifact := [dd * unif for unif in unifact]
@@ -334,7 +334,7 @@ InnerMultFact(OV,E,R,P) : C == T
(ffin:=lifting(umd,lvar,unifact,lval,lpol,ldeg,pmod))
case "failed" => intfact(um,lvar,ldeg,tleadpol,ltry,ufactor)
factfin: L USP:=ffin :: L USP
- if dd^=1 then
+ if dd~=1 then
factfin:=[primitivePart ff for ff in factfin]
factfin
@@ -351,7 +351,7 @@ InnerMultFact(OV,E,R,P) : C == T
ans:USP := monomial(1,n)
n:=(n-1)::NonNegativeInteger
prod:P:=1
- while (um:=reductum(um)) ^= 0 repeat
+ while (um:=reductum(um)) ~= 0 repeat
i := degree um
lc := leadingCoefficient um
prod := prod * c ** (n-(n:=i))::NonNegativeInteger
@@ -420,12 +420,12 @@ InnerMultFact(OV,E,R,P) : C == T
x:=lvar.first
ldeg:=ldeg.rest
lvar := lvar.rest
- if varch.nvar.first ^= x then
+ if varch.nvar.first ~= x then
lvar:= varch.nvar
x := lvar.first
lvar := lvar.rest
pc:= gcd coefficients um
- if pc^=1 then
+ if pc~=1 then
um:=(um exquo pc)::USP
ffactor:=multivariate(um,x)
for lcterm in mFactor(pc,ufactor).factors repeat
diff --git a/src/algebra/multpoly.spad.pamphlet b/src/algebra/multpoly.spad.pamphlet
index 86e5548a..99ab7833 100644
--- a/src/algebra/multpoly.spad.pamphlet
+++ b/src/algebra/multpoly.spad.pamphlet
@@ -180,7 +180,7 @@ SparseMultivariatePolynomial(R: Ring,VarSet: OrderedSet): C == T where
monomial? p ==
p case R => true
sup : D := p.ts
- 1 ^= numberOfMonomials(sup) => false
+ 1 ~= numberOfMonomials(sup) => false
monomial? leadingCoefficient(sup)$D
-- local
@@ -487,11 +487,11 @@ SparseMultivariatePolynomial(R: Ring,VarSet: OrderedSet): C == T where
gcd(leadingCoefficient b, content a)::SUP $
conta := content a
mona:SUP $ := monomial(conta, minimumDegree a)
- if mona ^= 1 then
+ if mona ~= 1 then
a := (a exquo mona)::SUP $
contb := content b
monb:SUP $ := monomial(contb, minimumDegree b)
- if monb ^= 1 then
+ if monb ~= 1 then
b := (b exquo monb)::SUP $
mong:SUP $ := monomial(gcd(conta, contb),
min(degree mona, degree monb))
@@ -618,7 +618,7 @@ SparseMultivariatePolynomial(R: Ring,VarSet: OrderedSet): C == T where
u := univariate(p, mv := mainVariable(p)::VarSet)
weight:NonNegativeInteger := (member?(mv,Lvar) => 1; 0)
tdeg:NonNegativeInteger := 0
- while u ^= 0 repeat
+ while u ~= 0 repeat
termdeg:NonNegativeInteger := weight*degree u +
totalDegree(leadingCoefficient u, Lvar)
tdeg := max(tdeg, termdeg)
diff --git a/src/algebra/multsqfr.spad.pamphlet b/src/algebra/multsqfr.spad.pamphlet
index fbc32eeb..4d71bd73 100644
--- a/src/algebra/multsqfr.spad.pamphlet
+++ b/src/algebra/multsqfr.spad.pamphlet
@@ -111,19 +111,19 @@ MultivariateSquareFree (E,OV,R,P) : C == T where
exp0:Z:=0
unitsq:P:=1
lcf:P:=leadingCoefficient f
- if ctf^=1 then
+ if ctf~=1 then
f0:=ctf*f0
f:=(ctf::P)*f
lcf:=ctf*lcf
sqlead:List FFEP:= empty()
sqlc:Factored P:=1
- if lcf^=1$P then
+ if lcf~=1$P then
leadpol:=true
sqlc:=squareFree lcf
unitsq:=unitsq*(unit sqlc)
sqlead:= factors sqlc
lfact:=sort(#1.exponent > #2.exponent,lfact)
- while lfact^=[] repeat
+ while lfact~=[] repeat
pfact:=lfact.first
(g0,exp0):=(pfact.factor,pfact.exponent)
lfact:=lfact.rest
@@ -132,7 +132,7 @@ MultivariateSquareFree (E,OV,R,P) : C == T where
gg := unitNormal leadingCoefficient f
sqdec:=cons([gg.associate*f,exp0],sqdec)
return [gg.unit, sqdec]$squareForm
- if ctf^=1 then g0:=ctf*g0
+ if ctf~=1 then g0:=ctf*g0
npol:=consnewpol(f,f0,exp0)
(d,d0):=(npol.pol,npol.polval)
if leadpol then lcoef:=coefChoose(exp0,sqlc)
@@ -147,8 +147,8 @@ MultivariateSquareFree (E,OV,R,P) : C == T where
f:=h::SUP
f0:=completeEval(h,lvar,lval)
lcr:P:=leadingCoefficient result0
- if leadpol and lcr^=1$P then
- for lpfact in sqlead while lcr^=1 repeat
+ if leadpol and lcr~=1$P then
+ for lpfact in sqlead while lcr~=1 repeat
ground? lcr =>
unitsq:=(unitsq exquo lcr)::P
lcr:=1$P
@@ -195,7 +195,7 @@ MultivariateSquareFree (E,OV,R,P) : C == T where
y:=lvar.im
p:=p*monomial(1$P,y,n)
result1:=cons(["sqfr",y::P,n],result1)
- if p^=1$P then
+ if p~=1$P then
f := (f exquo p)::P
if ground? f then return makeFR(f, result1)
lvar:=variables(f)
@@ -206,7 +206,7 @@ MultivariateSquareFree (E,OV,R,P) : C == T where
makeFR(unit result,append(result1,factorList result))
ldeg:=degree(f,lvar) --- general case ---
- m:="min"/[j for j in ldeg|j^=0]
+ m:="min"/[j for j in ldeg|j~=0]
i:Z:=1
for j in ldeg while j>m repeat i:=i+1
x:=lvar.i
@@ -241,7 +241,7 @@ MultivariateSquareFree (E,OV,R,P) : C == T where
member?(lval,ltry) => "new integer"
ltry:=cons(lval,ltry)
f0:=completeEval(f,lvar,lval)
- degree f0 ^=degf => "new integer"
+ degree f0 ~=degf => "new integer"
ctf:=content f0
lfact:List(FFE):=factors(squareFree((f0 exquo (ctf:R)::BP)::BP))
@@ -303,7 +303,7 @@ MultivariateSquareFree (E,OV,R,P) : C == T where
plist:=lifting(ud,lvar,[g0,g1],lval,leadlist,ldeg,pmod)
plist case "failed" => "failed"
(p0:SUP,p1:SUP):=((plist::List SUP).1,(plist::List SUP).2)
- if completeEval(p0,lvar,lval) ^= g0 then (p0,p1):=(p1,p0)
+ if completeEval(p0,lvar,lval) ~= g0 then (p0,p1):=(p1,p0)
[primitivePart p0,primitivePart p1]
---- the polynomial is univariate ----
diff --git a/src/algebra/naalg.spad.pamphlet b/src/algebra/naalg.spad.pamphlet
index ec93ce54..f252ef74 100644
--- a/src/algebra/naalg.spad.pamphlet
+++ b/src/algebra/naalg.spad.pamphlet
@@ -491,7 +491,7 @@ second argument")
structuralConstants(ls:L S, mt: M POLY R) ==
nn := #(ls)
- nrows(mt) ^= nn or ncols(mt) ^= nn =>
+ nrows(mt) ~= nn or ncols(mt) ~= nn =>
error "structuralConstants: size of second argument does not _
agree with number of generators"
gamma : L M POLY R := []
@@ -505,14 +505,14 @@ agree with number of generators"
totalDegree(p,ls) > 1 =>
error "structuralConstants: entries of second argument _
must be linear polynomials in the generators"
- if (c := coefficient(p, s, 1) ) ^= 0 then qsetelt_!(mat,i,j,c)
+ if (c := coefficient(p, s, 1) ) ~= 0 then qsetelt_!(mat,i,j,c)
gamma := cons(mat, gamma)
lscopy := rest lscopy
vector reverse gamma
structuralConstants(ls:L S, mt: M FRAC POLY R) ==
nn := #(ls)
- nrows(mt) ^= nn or ncols(mt) ^= nn =>
+ nrows(mt) ~= nn or ncols(mt) ~= nn =>
error "structuralConstants: size of second argument does not _
agree with number of generators"
gamma : L M FRAC(POLY R) := []
@@ -524,14 +524,14 @@ agree with number of generators"
for j in 1..nn repeat
r := qelt(mt,i,j)
q := denom(r)
- totalDegree(q,ls) ^= 0 =>
+ totalDegree(q,ls) ~= 0 =>
error "structuralConstants: entries of second argument _
must be (linear) polynomials in the generators"
p := numer(r)
totalDegree(p,ls) > 1 =>
error "structuralConstants: entries of second argument _
must be linear polynomials in the generators"
- if (c := coefficient(p, s, 1) ) ^= 0 then qsetelt_!(mat,i,j,c/q)
+ if (c := coefficient(p, s, 1) ) ~= 0 then qsetelt_!(mat,i,j,c/q)
gamma := cons(mat, gamma)
lscopy := rest lscopy
vector reverse gamma
diff --git a/src/algebra/naalgc.spad.pamphlet b/src/algebra/naalgc.spad.pamphlet
index b48429ca..f6b470c1 100644
--- a/src/algebra/naalgc.spad.pamphlet
+++ b/src/algebra/naalgc.spad.pamphlet
@@ -653,7 +653,7 @@ FiniteRankNonAssociativeAlgebra(R:CommutativeRing):
lrx case "failed" => "failed"
rrx := rightRecip x
rrx case "failed" => "failed"
- (lrx :: %) ^= (rrx :: %) => "failed"
+ (lrx :: %) ~= (rrx :: %) => "failed"
lrx :: %
@@ -1005,7 +1005,7 @@ FramedNonAssociativeAlgebra(R:CommutativeRing):
++ Error: if shape of matrix doesn't fit.
--attributes
--attributes
- --separable <=> discriminant() ^= 0
+ --separable <=> discriminant() ~= 0
add
V ==> Vector
diff --git a/src/algebra/newpoint.spad.pamphlet b/src/algebra/newpoint.spad.pamphlet
index b6b32e30..27301539 100644
--- a/src/algebra/newpoint.spad.pamphlet
+++ b/src/algebra/newpoint.spad.pamphlet
@@ -65,7 +65,7 @@ Point(R:Ring) : Exports == Implementation where
dimension p == (# p)::PI -- Vector returns NonNegativeInteger...?
convert(l:List R):% == point(l)
cross(p0, p1) ==
- #p0 ^=3 or #p1^=3 => error "Arguments to cross must be three dimensional"
+ #p0 ~=3 or #p1~=3 => error "Arguments to cross must be three dimensional"
point [p0.2 * p1.3 - p1.2 * p0.3, _
p1.1 * p0.3 - p0.1 * p1.3, _
p0.1 * p1.2 - p1.1 * p0.2]
@@ -567,7 +567,7 @@ SubSpace(n:PI,R:Ring) : Exports == Implementation where
(leaf? s1 and leaf? s2) =>
(s1.pt = s2.pt) and (s1.property = s2.property) and (s1.levelField = s2.levelField)
-- note that the ordering of children is important
- #s1.childrenField ^= #s2.childrenField => false
+ #s1.childrenField ~= #s2.childrenField => false
and/[c1 = c2 for c1 in s1.childrenField for c2 in s2.childrenField]
and (s1.property = s2.property) and (s1.levelField = s2.levelField)
coerce(space:%):O ==
diff --git a/src/algebra/nlinsol.spad.pamphlet b/src/algebra/nlinsol.spad.pamphlet
index f181a478..c69d5633 100644
--- a/src/algebra/nlinsol.spad.pamphlet
+++ b/src/algebra/nlinsol.spad.pamphlet
@@ -68,7 +68,7 @@ RetractSolvePackage(Q, R): Exports == Implementation where
"failed"
up := univariate(p, s := u::SY)
ans:FQ := 0
- while up ^= 0 repeat
+ while up ~= 0 repeat
(v := PQIfCan leadingCoefficient up) case "failed" => return "failed"
ans := ans + monomial(1, s, degree up)$PQ * (v::FQ)
up := reductum up
diff --git a/src/algebra/nlode.spad.pamphlet b/src/algebra/nlode.spad.pamphlet
index 2f7f672d..b43c0102 100644
--- a/src/algebra/nlode.spad.pamphlet
+++ b/src/algebra/nlode.spad.pamphlet
@@ -101,7 +101,7 @@ NonLinearFirstOrderODESolver(R, F): Exports == Implementation where
r := denom(f := m / n)::F
(not freeOf?(r, y := ky::F))
or (d := degree(p := univariate(numer f, ky))) < 2
- or degree(pp := reductum p) ^= 1 or reductum(pp) ^= 0
+ or degree(pp := reductum p) ~= 1 or reductum(pp) ~= 0
or (not freeOf?(a := (leadingCoefficient(pp)::F), y))
or (not freeOf?(b := (leadingCoefficient(p)::F), y)) => "failed"
[a / r, b / r, d]
diff --git a/src/algebra/npcoef.spad.pamphlet b/src/algebra/npcoef.spad.pamphlet
index ef842223..c89d9382 100644
--- a/src/algebra/npcoef.spad.pamphlet
+++ b/src/algebra/npcoef.spad.pamphlet
@@ -63,7 +63,7 @@ NPCoef(BP,E,OV,R,P) : C == T where
changed:Boolean:=true
ltochange:List(NNI):=empty()
ltodel:List(NNI):=empty()
- while changed and ndet^=1 repeat
+ while changed and ndet~=1 repeat
changed :=false
dt:=#tablecoef
for i in 1..dt while ^changed repeat
@@ -104,7 +104,7 @@ NPCoef(BP,E,OV,R,P) : C == T where
#termlist=1 =>
vterm:=termlist.first
for elterm in vterm while doit<2 repeat
- (cu1:=elterm.pcoef)^=0 => cfu:=cu1*cfu
+ (cu1:=elterm.pcoef)~=0 => cfu:=cu1*cfu
doit:=doit+1
poselt:=position(elterm,vterm):NNI
doit=2 or (pp:=tterm.coefu exquo cfu) case "failed" => "failed"
@@ -148,7 +148,7 @@ NPCoef(BP,E,OV,R,P) : C == T where
for celt in ctdet repeat
if celt.cfpos.expt=cfexp then
celt.cfpos.pcoef:=cfcoef
- if (and/[cc.pcoef ^=0 for cc in celt]) then
+ if (and/[cc.pcoef ~=0 for cc in celt]) then
k:=position(celt,ctdet):NNI
lterase:=cons(k,lterase)
cterm.coefu:=(cterm.coefu - */[cc.pcoef for cc in celt])
diff --git a/src/algebra/numeigen.spad.pamphlet b/src/algebra/numeigen.spad.pamphlet
index 310fe945..3f314958 100644
--- a/src/algebra/numeigen.spad.pamphlet
+++ b/src/algebra/numeigen.spad.pamphlet
@@ -198,7 +198,7 @@ InnerNumericEigenPackage(K,F,Par) : C == T
charpol(A:MK) : SUK ==
dimA :PI := (nrows A):PI
- dimA ^= ncols A => error " The matrix is not square"
+ dimA ~= ncols A => error " The matrix is not square"
B:Matrix SUK :=zero(dimA,dimA)
for i in 1..dimA repeat
for j in 1..dimA repeat B(i,j):=A(i,j)::SUK
diff --git a/src/algebra/numsolve.spad.pamphlet b/src/algebra/numsolve.spad.pamphlet
index b640b925..edb7898c 100644
--- a/src/algebra/numsolve.spad.pamphlet
+++ b/src/algebra/numsolve.spad.pamphlet
@@ -148,7 +148,7 @@ InnerNumericFloatSolvePackage(K,F,Par): Cat == Cap where
p0 := primitivePart multivariate(vec.0, mainvar)
p1 := primitivePart(multivariate(vec.1, mainvar),mainvar)
zero? p1 or
- gcd(p0, leadingCoefficient(univariate(p1,mainvar))) ^=1 =>
+ gcd(p0, leadingCoefficient(univariate(p1,mainvar))) ~=1 =>
innerSolve(cons(0,lp),empty(),lv,eps)
findGenZeros([p1, p0], reverse lv, eps)
@@ -161,15 +161,15 @@ InnerNumericFloatSolvePackage(K,F,Par): Cat == Cap where
DP:=DirectProduct(#lv,NonNegativeInteger)
dmp:=DistributedMultivariatePolynomial(lv,K)
lq:L dmp:=[]
- if ld^=[] then
+ if ld~=[] then
lq:= [(pToDmp(q1)$PolToPol(lv,K)) pretend dmp for q1 in ld]
partRes:=groebSolve(lnp,lvv)$GroebnerSolve(lv,K,K) pretend (L L dmp)
partRes=list [] => []
-- remove components where denominators vanish
- if lq^=[] then
+ if lq~=[] then
gb:=GroebnerInternalPackage(K,DirectProduct(#lv,NNI),OV,dmp)
partRes:=[pr for pr in partRes|
- and/[(redPol(fq,pr pretend List(dmp))$gb) ^=0
+ and/[(redPol(fq,pr pretend List(dmp))$gb) ~=0
for fq in lq]]
-- select the components in "generic" form
@@ -182,7 +182,7 @@ InnerNumericFloatSolvePackage(K,F,Par): Cat == Cap where
"and"/[("max"/degree(f,rrlvv))=1 for f in res1] =>
listGen:=concat(res pretend (L dmp),listGen)
result:L L F := []
- if listGen^=[] then
+ if listGen~=[] then
listG :L L P K:=
[[dmpToP(pf)$PolToPol(lv,K) for pf in pr] for pr in listGen]
result:=
@@ -286,14 +286,14 @@ FloatingRealPackage(Par): Cat == Cap where
-- real zeros of the system of polynomial lp --
realRoots(lp:L RFI,lv:L SE,eps: Par) : L L Par ==
lnum:=[numer p for p in lp]
- lden:=[dp for p in lp |(dp:=denom p)^=1]
+ lden:=[dp for p in lp |(dp:=denom p)~=1]
innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par)
solve(lp:L RFI,eps : Par) : L L EQ P Par ==
lnum:=[numer p for p in lp]
- lden:=[dp for p in lp |(dp:=denom p)^=1]
+ lden:=[dp for p in lp |(dp:=denom p)~=1]
lv:="setUnion"/[variables np for np in lnum]
- if lden^=[] then
+ if lden~=[] then
lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden])
[makeEq(numres,lv) for numres
in innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par)]
@@ -301,9 +301,9 @@ FloatingRealPackage(Par): Cat == Cap where
solve(le:L EQ RFI,eps : Par) : L L EQ P Par ==
lp:=[lhs ep - rhs ep for ep in le]
lnum:=[numer p for p in lp]
- lden:=[dp for p in lp |(dp:=denom p)^=1]
+ lden:=[dp for p in lp |(dp:=denom p)~=1]
lv:="setUnion"/[variables np for np in lnum]
- if lden^=[] then
+ if lden~=[] then
lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden])
[makeEq(numres,lv) for numres
in innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par)]
@@ -406,14 +406,14 @@ FloatingComplexPackage(Par): Cat == Cap where
-- find the complex zeros of an univariate polynomial --
complexRoots(lp:L FPK,lv:L SE,eps:Par) : L L C Par ==
lnum:=[numer p for p in lp]
- lden:=[dp for p in lp |(dp:=denom p)^=1]
+ lden:=[dp for p in lp |(dp:=denom p)~=1]
innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par)
complexSolve(lp:L FPK,eps : Par) : L L EQ P C Par ==
lnum:=[numer p for p in lp]
- lden:=[dp for p in lp |(dp:=denom p)^=1]
+ lden:=[dp for p in lp |(dp:=denom p)~=1]
lv:="setUnion"/[variables np for np in lnum]
- if lden^=[] then
+ if lden~=[] then
lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden])
[[equation(x::(P C Par),r::(P C Par)) for x in lv for r in nres]
for nres in innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par)]
@@ -421,9 +421,9 @@ FloatingComplexPackage(Par): Cat == Cap where
complexSolve(le:L EQ FPK,eps : Par) : L L EQ P C Par ==
lp:=[lhs ep - rhs ep for ep in le]
lnum:=[numer p for p in lp]
- lden:=[dp for p in lp |(dp:=denom p)^=1]
+ lden:=[dp for p in lp |(dp:=denom p)~=1]
lv:="setUnion"/[variables np for np in lnum]
- if lden^=[] then
+ if lden~=[] then
lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden])
[[equation(x::(P C Par),r::(P C Par)) for x in lv for r in nres]
for nres in innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par)]
diff --git a/src/algebra/numtheor.spad.pamphlet b/src/algebra/numtheor.spad.pamphlet
index b5cf7404..6df112a7 100644
--- a/src/algebra/numtheor.spad.pamphlet
+++ b/src/algebra/numtheor.spad.pamphlet
@@ -126,12 +126,12 @@ Using the half extended Euclidean algorithm we compute 1/a mod b.
borg:I:=b
c1:I := 1
d1:I := 0
- while b ^= 0 repeat
+ while b ~= 0 repeat
q:I := a quo b
r:I := a-q*b
(a,b):=(b,r)
(c1,d1):=(d1,c1-q*d1)
- a ^= 1 => error("moduli are not relatively prime")
+ a ~= 1 => error("moduli are not relatively prime")
positiveRemainder(c1,borg)
@
@@ -287,7 +287,7 @@ IntegerNumberTheoryFunctions(): Exports == Implementation where
jacobi : (I,I) -> I
++ \spad{jacobi(a,b)} returns the Jacobi symbol \spad{J(a/b)}.
++ When b is odd, \spad{J(a/b) = product(L(a/p) for p in factor b )}.
- ++ Note: by convention, 0 is returned if \spad{gcd(a,b) ^= 1}.
+ ++ Note: by convention, 0 is returned if \spad{gcd(a,b) ~= 1}.
++ Iterative \spad{O(log(b)^2)} version coded by Michael Monagan June 1987.
legendre : (I,I) -> I
++ \spad{legendre(a,p)} returns the Legendre symbol \spad{L(a/p)}.
@@ -560,7 +560,7 @@ PolynomialNumberTheoryFunctions(): Exports == Implementation where
MonicQuotient: (SUP(I),SUP(I)) -> SUP(I)
MonicQuotient (a,b) ==
- leadingCoefficient(b) ^= 1 => error "divisor must be monic"
+ leadingCoefficient(b) ~= 1 => error "divisor must be monic"
b = 1 => a
da := degree a
db := degree b -- assertion: degree b > 0
diff --git a/src/algebra/odealg.spad.pamphlet b/src/algebra/odealg.spad.pamphlet
index 29a358d9..32425c96 100644
--- a/src/algebra/odealg.spad.pamphlet
+++ b/src/algebra/odealg.spad.pamphlet
@@ -89,7 +89,7 @@ SystemODESolver(F, LO): Exports == Implementation where
m:N := 0 -- number of Solutions
part:V := new(n, 0)
-- count first the different solutions
- for sol in sols repeat m := m + count(#1 ^= 0, sol.basis)$List(F)
+ for sol in sols repeat m := m + count(#1 ~= 0, sol.basis)$List(F)
SolMatrix:MF := new(n, m, 0)
m := 0
for sol in reverse_! sols repeat
@@ -136,7 +136,7 @@ SystemODESolver(F, LO): Exports == Implementation where
offset := minIndex v - (mr := minRowIndex m)
while r >= mr and every?(zero?, row(m, r))$Vector(LO) repeat r := r - 1
r < mr => error "backsolve: system has a 0 matrix"
- (c := firstnonzero(m, r)) ^= maxColIndex m =>
+ (c := firstnonzero(m, r)) ~= maxColIndex m =>
error "backsolve: undetermined system"
rec := solve(m(r, c), v(r + offset))
dim := (r - mr + 1)::N
@@ -151,7 +151,7 @@ SystemODESolver(F, LO): Exports == Implementation where
while r > mr repeat
r := r - 1
c := c - 1
- firstnonzero(m, r) ^= c => error "backsolve: undetermined system"
+ firstnonzero(m, r) ~= c => error "backsolve: undetermined system"
degree(eq := m(r, c)) > 0 => error "backsolve: pivot of order > 0"
a := leadingCoefficient(eq)::F
if part? then
@@ -189,7 +189,7 @@ SystemODESolver(F, LO): Exports == Implementation where
-- returns the index of the first nonzero entry in row r of m
firstnonzero(m, r) ==
for c in minColIndex m .. maxColIndex m repeat
- m(r, c) ^= 0 => return c
+ m(r, c) ~= 0 => return c
error "firstnonzero: zero row"
-- computes +/[m(r, i) v(i) for i ranging over the last n columns of m]
@@ -225,12 +225,12 @@ SystemODESolver(F, LO): Exports == Implementation where
if i > nrows then leave x
rown := minr - 1
for k in i .. nrows repeat
- if (x(k, j) ^= 0) and ((rown = minr - 1) or
+ if (x(k, j) ~= 0) and ((rown = minr - 1) or
degree x(k,j) < degree x(rown,j)) then rown := k
rown = minr - 1 => "enuf"
x := swapRows_!(x, i, rown)
swap_!(w, i + offset, rown + offset)
- for k in i+1 .. nrows | x(k, j) ^= 0 repeat
+ for k in i+1 .. nrows | x(k, j) ~= 0 repeat
l := rightLcm(x(i,j), x(k,j))
a := rightQuotient(l, x(i, j))
b := rightQuotient(l, x(k, j))
diff --git a/src/algebra/odeef.spad.pamphlet b/src/algebra/odeef.spad.pamphlet
index 734344a9..e33f827e 100644
--- a/src/algebra/odeef.spad.pamphlet
+++ b/src/algebra/odeef.spad.pamphlet
@@ -56,7 +56,7 @@ ReductionOfOrder(F, L): Exports == Impl where
ithcoef(eq, i, s) ==
ans:F := 0
- while eq ^= 0 repeat
+ while eq ~= 0 repeat
j := degree eq
ans := ans + localbinom(j, i) * locals(s,j,i) * leadingCoefficient eq
eq := reductum eq
@@ -213,7 +213,7 @@ ElementaryFunctionLODESolver(R, F, L): Exports == Implementation where
up := univariate(p, k := first l)
l := rest l
ans:P2 := 0
- while up ^= 0 repeat
+ while up ~= 0 repeat
ans := ans + monomial(upmp(leadingCoefficient up, l), k, degree up)
up := reductum up
ans
@@ -284,7 +284,7 @@ ElementaryFunctionLODESolver(R, F, L): Exports == Implementation where
ulodo(eq, k) ==
op:LQ := 0
- while eq ^= 0 repeat
+ while eq ~= 0 repeat
op := op + monomial(univariate(leadingCoefficient eq, k), degree eq)
eq := reductum eq
op
@@ -294,7 +294,7 @@ ElementaryFunctionLODESolver(R, F, L): Exports == Implementation where
op := ulodo(eq, k)
empty? remove_!(k, varselect(kernels g, x)) => -- i.e. rhs is rational
rc := ratDsolve(op, univariate(g, k))
- rc.particular case "failed" => -- this implies g ^= 0
+ rc.particular case "failed" => -- this implies g ~= 0
doVarParams(eq, g, homosolve(eq, op, rc.basis, k, x), x)
[multivariate(rc.particular::RF, k), homosolve(eq, op, rc.basis, k, x)]
doVarParams(eq, g, homosolve(eq, op, ratDsolve(op, 0).basis, k, x), x)
@@ -316,7 +316,7 @@ ElementaryFunctionLODESolver(R, F, L): Exports == Implementation where
localmap(f, op) ==
ans:L := 0
- while op ^= 0 repeat
+ while op ~= 0 repeat
ans := ans + monomial(f leadingCoefficient op, degree op)
op := reductum op
ans
@@ -475,7 +475,7 @@ ElementaryFunctionODESolver(R, F): Exports == Implementation where
p := rec.left
Lx := LinearOrdinaryDifferentialOperator(F, diff x)
op:Lx := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
op := op + monomial(leadingCoefficient p, degree p)
p := reductum p
solve(op, rec.right, x, a, y0)$ElementaryFunctionLODESolver(R, F, Lx)
@@ -495,7 +495,7 @@ ElementaryFunctionODESolver(R, F): Exports == Implementation where
p := rec.left
Lx := LinearOrdinaryDifferentialOperator(F, diff x)
op:Lx := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
op := op + monomial(leadingCoefficient p, degree p)
p := reductum p
(uuu := solve(op, rec.right, x)$ElementaryFunctionLODESolver(R, F, Lx))
@@ -504,7 +504,7 @@ ElementaryFunctionODESolver(R, F): Exports == Implementation where
-- returns [M, v] s.t. the equations are D x = M x + v
parseSYS(eqs, ly, x) ==
- (n := #eqs) ^= #ly => "failed"
+ (n := #eqs) ~= #ly => "failed"
m:M := new(n, n, 0)
v:V := new(n, 0)
xx := x::F
diff --git a/src/algebra/oderf.spad.pamphlet b/src/algebra/oderf.spad.pamphlet
index 6573a809..096c8973 100644
--- a/src/algebra/oderf.spad.pamphlet
+++ b/src/algebra/oderf.spad.pamphlet
@@ -48,7 +48,7 @@ BalancedFactorisation(R, UP): Exports == Implementation where
*/[balSqfr1(f.factor, n, b) for f in factors balSqfr(a,n,rest l)]
balancedFactorisation(a:UP, l:List UP) ==
- empty?(ll := select(#1 ^= 0, l)) =>
+ empty?(ll := select(#1 ~= 0, l)) =>
error "balancedFactorisation: 2nd argument is empty or all 0"
sa := squareFree a
unit(sa) * */[balSqfr(f.factor,f.exponent,ll) for f in factors sa])
@@ -226,7 +226,7 @@ PrimitiveRatDE(F, UP, L, LQ): Exports == Implementation where
cd := splitDenominator coefficients op
f := cd.den / gcd(cd.num)
l:L := 0
- while op ^= 0 repeat
+ while op ~= 0 repeat
l := l + monomial(retract(f * leadingCoefficient op), degree op)
op := reductum op
[l, [f * g for g in lg]]
@@ -261,7 +261,7 @@ PrimitiveRatDE(F, UP, L, LQ): Exports == Implementation where
lamb:List(N) := [d := degree l]
lf:List(UP) := [a := leadingCoefficient l]
mup := d::Z - order(a, c)
- while (l := reductum l) ^= 0 repeat
+ while (l := reductum l) ~= 0 repeat
a := leadingCoefficient l
if (m := (d := degree l)::Z - order(a, c)) > mup then
mup := m
@@ -511,10 +511,10 @@ RationalLODE(F, UP): Exports == Implementation where
regularPoint(l, lg) ==
a := leadingCoefficient(l) * commonDenominator lg
- coefficient(a, 0) ^= 0 => 0
+ coefficient(a, 0) ~= 0 => 0
for i in 1.. repeat
- a(j := i::F) ^= 0 => return i
- a(-j) ^= 0 => return(-i)
+ a(j := i::F) ~= 0 => return i
+ a(-j) ~= 0 => return(-i)
unitlist(i, q) ==
v := new(q, 0)$Vector(F)
@@ -535,7 +535,7 @@ RationalLODE(F, UP): Exports == Implementation where
for i in 1..q]$List(RF)
a1 := inv(leadingCoefficient(op)::RF)
part := [UTS2UP(dd * ode(RF2UTS(a1 * g)$tools + f #1, e)$solver, n)$tools
- /$RF d for g in lg | g ^= 0]$List(RF)
+ /$RF d for g in lg | g ~= 0]$List(RF)
[hom, part]
nzero? v ==
@@ -553,7 +553,7 @@ RationalLODE(F, UP): Exports == Implementation where
lamb:List(N) := [d := degree l]
lf:List(UP) := [a := leadingCoefficient l]
mup := degree(a)::Z - d
- while (l := reductum l) ^= 0 repeat
+ while (l := reductum l) ~= 0 repeat
a := leadingCoefficient l
if (m := degree(a)::Z - (d := degree l)) > mup then
mup := m
@@ -809,7 +809,7 @@ ConstantLODE(R, F, L): Exports == Implementation where
homoBasis(op, x) ==
p:SUP := 0
- while op ^= 0 repeat
+ while op ~= 0 repeat
p := p + monomial(leadingCoefficient op, degree op)
op := reductum op
b:List(F) := empty()
diff --git a/src/algebra/op.spad.pamphlet b/src/algebra/op.spad.pamphlet
index 19d4218e..8b195cbe 100644
--- a/src/algebra/op.spad.pamphlet
+++ b/src/algebra/op.spad.pamphlet
@@ -156,9 +156,9 @@ BasicOperator(): Exports == Implementation where
-- property EQUAL? contains a function f: (BOP, BOP) -> Boolean
-- such that f(o1, o2) is true iff o1 = o2
op1 = op2 ==
- name(op1) ^= name(op2) => false
- op1.narg ^= op2.narg => false
- brace(keys properties op1)^=$Set(String) brace(keys properties op2) => false
+ name(op1) ~= name(op2) => false
+ op1.narg ~= op2.narg => false
+ brace(keys properties op1)~=$Set(String) brace(keys properties op2) => false
(func := property(op1, EQUAL?)) case None =>
((func::None) pretend (($, $) -> Boolean)) (op1, op2)
true
@@ -172,14 +172,14 @@ BasicOperator(): Exports == Implementation where
-- property LESS? contains a function f: (BOP, BOP) -> Boolean
-- such that f(o1, o2) is true iff o1 < o2
op1 < op2 ==
- (w1 := weight op1) ^= (w2 := weight op2) => w1 < w2
- op1.narg ^= op2.narg => op1.narg < op2.narg
- name(op1) ^= name(op2) => name(op1) < name(op2)
+ (w1 := weight op1) ~= (w2 := weight op2) => w1 < w2
+ op1.narg ~= op2.narg => op1.narg < op2.narg
+ name(op1) ~= name(op2) => name(op1) < name(op2)
n1 := #(k1 := brace(keys(properties op1))$Set(String))
n2 := #(k2 := brace(keys(properties op2))$Set(String))
- n1 ^= n2 => n1 < n2
+ n1 ~= n2 => n1 < n2
not zero?(n1 := #(d1 := difference(k1, k2))) =>
- n1 ^= (n2 := #(d2 := difference(k2, k1))) => n1 < n2
+ n1 ~= (n2 := #(d2 := difference(k2, k1))) => n1 < n2
inspect(d1) < inspect(d2)
(func := property(op1, LESS?)) case None =>
((func::None) pretend (($, $) -> Boolean)) (op1, op2)
diff --git a/src/algebra/openmath.spad.pamphlet b/src/algebra/openmath.spad.pamphlet
index 2ad57181..c186a2fd 100644
--- a/src/algebra/openmath.spad.pamphlet
+++ b/src/algebra/openmath.spad.pamphlet
@@ -150,7 +150,7 @@ ExpressionToOpenMath(R: Join(OpenMath, OrderedSet, Ring)): with
outputOMArith1(dev, "power", args)
outputOMDefsum(dev: OpenMathDevice, args: List Expression R): Void ==
- #args ^= 5 => error "Unexpected number of arguments to a defsum"
+ #args ~= 5 => error "Unexpected number of arguments to a defsum"
OMputApp(dev)
OMputSymbol(dev, "arith1", "sum")
outputOMIntInterval(dev, args.4, args.5)
@@ -158,7 +158,7 @@ ExpressionToOpenMath(R: Join(OpenMath, OrderedSet, Ring)): with
OMputEndApp(dev)
outputOMDefprod(dev: OpenMathDevice, args: List Expression R): Void ==
- #args ^= 5 => error "Unexpected number of arguments to a defprod"
+ #args ~= 5 => error "Unexpected number of arguments to a defprod"
OMputApp(dev)
OMputSymbol(dev, "arith1", "product")
outputOMIntInterval(dev, args.4, args.5)
@@ -166,7 +166,7 @@ ExpressionToOpenMath(R: Join(OpenMath, OrderedSet, Ring)): with
OMputEndApp(dev)
outputOMDefint(dev: OpenMathDevice, args: List Expression R): Void ==
- #args ^= 5 => error "Unexpected number of arguments to a defint"
+ #args ~= 5 => error "Unexpected number of arguments to a defint"
OMputApp(dev)
OMputSymbol(dev, "calculus1", "defint")
outputOMInterval(dev, args.4, args.5)
@@ -174,7 +174,7 @@ ExpressionToOpenMath(R: Join(OpenMath, OrderedSet, Ring)): with
OMputEndApp(dev)
outputOMInt(dev: OpenMathDevice, args: List Expression R): Void ==
- #args ^= 3 => error "Unexpected number of arguments to a defint"
+ #args ~= 3 => error "Unexpected number of arguments to a defint"
OMputApp(dev)
OMputSymbol(dev, "calculus1", "int")
outputOMLambda(dev, eval(args.1, args.2, args.3), args.3)
diff --git a/src/algebra/ore.spad.pamphlet b/src/algebra/ore.spad.pamphlet
index 1c567ebf..ebdc406a 100644
--- a/src/algebra/ore.spad.pamphlet
+++ b/src/algebra/ore.spad.pamphlet
@@ -30,7 +30,7 @@ UnivariateSkewPolynomialCategory(R:Ring):
++ \spad{l = sum(monomial(a(i),i), i = 0..n)}.
minimumDegree: $ -> NonNegativeInteger
++ minimumDegree(l) is the smallest \spad{k} such that
- ++ \spad{a(k) ^= 0} if
+ ++ \spad{a(k) ~= 0} if
++ \spad{l = sum(monomial(a(i),i), i = 0..n)}.
leadingCoefficient: $ -> R
++ leadingCoefficient(l) is \spad{a(n)} if
@@ -146,14 +146,14 @@ UnivariateSkewPolynomialCategory(R:Ring):
coefficients l ==
ans:List(R) := empty()
- while l ^= 0 repeat
+ while l ~= 0 repeat
ans := concat(leadingCoefficient l, ans)
l := reductum l
ans
a:R * y:% ==
z:% := 0
- while y ^= 0 repeat
+ while y ~= 0 repeat
z := z + monomial(a * leadingCoefficient y, degree y)
y := reductum y
z
@@ -165,7 +165,7 @@ UnivariateSkewPolynomialCategory(R:Ring):
if R has IntegralDomain then
l exquo a ==
ans:% := 0
- while l ^= 0 repeat
+ while l ~= 0 repeat
(u := (leadingCoefficient(l) exquo a)) case "failed" =>
return "failed"
ans := ans + monomial(u::R, degree l)
@@ -205,7 +205,7 @@ UnivariateSkewPolynomialCategory(R:Ring):
a0 := a
u0:% := v:% := 1
v0:% := u:% := 0
- while b ^= 0 repeat
+ while b ~= 0 repeat
qr := leftDivide(a, b)
(a, b) := (b, qr.remainder)
(u0, u):= (u, u0 - u * qr.quotient)
@@ -216,7 +216,7 @@ UnivariateSkewPolynomialCategory(R:Ring):
zero? a => b
zero? b => a
degree a < degree b => ncgcd(b, a, ncrem)
- while b ^= 0 repeat (a, b) := (b, ncrem(a, b))
+ while b ~= 0 repeat (a, b) := (b, ncrem(a, b))
a
extended(a, b, eea) ==
@@ -240,7 +240,7 @@ UnivariateSkewPolynomialCategory(R:Ring):
a0 := a
u0:% := v:% := 1
v0:% := u:% := 0
- while b ^= 0 repeat
+ while b ~= 0 repeat
qr := rightDivide(a, b)
(a, b) := (b, qr.remainder)
(u0, u):= (u, u0 - qr.quotient * u)
@@ -392,7 +392,7 @@ UnivariateSkewPolynomialCategoryOps(R, C): Exports == Implementation where
times(x, y, sigma, delta) ==
zero? y => 0
z:C := 0
- while x ^= 0 repeat
+ while x ~= 0 repeat
z := z + termPoly(leadingCoefficient x, degree x, y, sigma, delta)
x := reductum x
z
@@ -402,7 +402,7 @@ UnivariateSkewPolynomialCategoryOps(R, C): Exports == Implementation where
(u := subtractIfCan(n, 1)) case "failed" => a * y
n1 := u::N
z:C := 0
- while y ^= 0 repeat
+ while y ~= 0 repeat
m := degree y
b := leadingCoefficient y
z := z + termPoly(a, n1, monomial(sigma b, m + 1), sigma, delta)
diff --git a/src/algebra/outform.spad.pamphlet b/src/algebra/outform.spad.pamphlet
index 9b2c13fe..8fd70793 100644
--- a/src/algebra/outform.spad.pamphlet
+++ b/src/algebra/outform.spad.pamphlet
@@ -180,17 +180,17 @@ NumberFormats(): NFexports == NFimplementation where
n := romval ord c
-- (I)=1000, ((I))=10000, (((I)))=100000, etc
if n < 0 then
- c ^= pren =>
+ c ~= pren =>
error ["Improper character in Roman numeral: ",c]
nprens: PI := 1
while c = pren and i >= minIndex s repeat
c := s.i; i := i-1
if c = pren then nprens := nprens+1
- c ^= ichar =>
+ c ~= ichar =>
error "Improper Roman numeral: (x)"
for k in 1..nprens while i >= minIndex s repeat
c := s.i; i := i-1
- c ^= plen =>
+ c ~= plen =>
error "Improper Roman numeral: unbalanced ')'"
n := 10**(nprens + 2)
if n < Max then
@@ -420,8 +420,8 @@ OutputForm(): SetCategory with
--% Specific applications
"=": ($, $) -> $
++ f = g creates the equivalent infix form.
- "^=": ($, $) -> $
- ++ f ^= g creates the equivalent infix form.
+ "~=": ($, $) -> $
+ ++ f ~= g creates the equivalent infix form.
"<": ($, $) -> $
++ f < g creates the equivalent infix form.
">": ($, $) -> $
@@ -571,7 +571,7 @@ OutputForm(): SetCategory with
vconcat(a,b) == [eform VCONCAT, a, b]
vconcat l == cons(eform VCONCAT, l)
- a ^= b == [sform "^=", a, b]
+ a ~= b == [sform "~=", a, b]
a < b == [sform "<", a, b]
a > b == [sform ">", a, b]
a <= b == [sform "<=", a, b]
@@ -793,7 +793,7 @@ Note that this code is not included in the generated catdef.spad file.
(SPADCALL |n| (- |m| 1) (QREFELT $ 46)) (QREFELT $ 45)))))
(DEFUN |OUTFORM;matrix;L$;29| (|ll| $)
- (PROG (#0=#:G1430 |l| #1=#:G1431 |lv|)
+ (PROG (#0=#:G1437 |l| #1=#:G1438 |lv|)
(RETURN
(SEQ (LETT |lv|
(PROGN
@@ -824,7 +824,7 @@ Note that this code is not included in the generated catdef.spad file.
(CONS (|OUTFORM;eform| 'AGGSET $) |l|))
(DEFUN |OUTFORM;blankSeparate;L$;33| (|l| $)
- (PROG (|c| |u| #0=#:G1439 |l1|)
+ (PROG (|c| |u| #0=#:G1446 |l1|)
(RETURN
(SEQ (LETT |c| (|OUTFORM;eform| 'CONCATB $)
|OUTFORM;blankSeparate;L$;33|)
@@ -913,8 +913,8 @@ Note that this code is not included in the generated catdef.spad file.
(DEFUN |OUTFORM;vconcat;L$;49| (|l| $)
(CONS (|OUTFORM;eform| 'VCONCAT $) |l|))
-(DEFUN |OUTFORM;^=;3$;50| (|a| |b| $)
- (LIST (|OUTFORM;sform| "^=" $) |a| |b|))
+(DEFUN |OUTFORM;~=;3$;50| (|a| |b| $)
+ (LIST (|OUTFORM;sform| "~=" $) |a| |b|))
(DEFUN |OUTFORM;<;3$;51| (|a| |b| $)
(LIST (|OUTFORM;sform| "<" $) |a| |b|))
@@ -978,7 +978,7 @@ Note that this code is not included in the generated catdef.spad file.
(DEFUN |OUTFORM;empty;$;71| ($) (LIST (|OUTFORM;eform| 'NOTHING $)))
(DEFUN |OUTFORM;infix?;$B;72| (|a| $)
- (PROG (#0=#:G1484 |e|)
+ (PROG (#0=#:G1491 |e|)
(RETURN
(SEQ (EXIT (SEQ (LETT |e|
(COND
@@ -1087,7 +1087,7 @@ Note that this code is not included in the generated catdef.spad file.
(LIST (|OUTFORM;eform| 'TAG $) |a| |b|))
(DEFUN |OUTFORM;differentiate;$Nni$;95| (|a| |nn| $)
- (PROG (#0=#:G1514 |r| |s|)
+ (PROG (#0=#:G1521 |r| |s|)
(RETURN
(SEQ (COND
((ZEROP |nn|) |a|)
@@ -1139,7 +1139,7 @@ Note that this code is not included in the generated catdef.spad file.
(DEFUN |OutputForm| ()
(PROG ()
(RETURN
- (PROG (#0=#:G1528)
+ (PROG (#0=#:G1535)
(RETURN
(COND
((LETT #0# (HGET |$ConstructorCache| '|OutputForm|)
@@ -1199,7 +1199,7 @@ Note that this code is not included in the generated catdef.spad file.
|OUTFORM;scripts;$L$;44| (|NonNegativeInteger|) (47 . |#|)
(|List| $$) (52 . |append|) |OUTFORM;supersub;$L$;45|
|OUTFORM;hconcat;L$;47| |OUTFORM;vconcat;L$;49|
- |OUTFORM;^=;3$;50| |OUTFORM;<;3$;51| |OUTFORM;>;3$;52|
+ |OUTFORM;~=;3$;50| |OUTFORM;<;3$;51| |OUTFORM;>;3$;52|
|OUTFORM;<=;3$;53| |OUTFORM;>=;3$;54| |OUTFORM;+;3$;55|
|OUTFORM;-;3$;56| |OUTFORM;-;2$;57| |OUTFORM;*;3$;58|
|OUTFORM;/;3$;59| |OUTFORM;**;3$;60| |OUTFORM;div;3$;61|
@@ -1226,23 +1226,23 @@ Note that this code is not included in the generated catdef.spad file.
|OUTFORM;prod;3$;100| |OUTFORM;prod;4$;101|
|OUTFORM;int;2$;102| |OUTFORM;int;3$;103|
|OUTFORM;int;4$;104| (|SingleInteger|))
- '#(~= 78 |zag| 84 |width| 90 |vspace| 99 |vconcat| 104
- |supersub| 115 |superHeight| 121 |super| 126 |sum| 132
- |subHeight| 150 |sub| 155 |string| 161 |slash| 166
- |semicolonSeparate| 172 |scripts| 177 |rspace| 183 |root|
- 189 |right| 200 |rem| 211 |rarrow| 217 |quote| 223 |quo|
- 228 |prod| 234 |print| 252 |prime| 257 |presuper| 268
- |presub| 274 |prefix| 280 |postfix| 286 |pile| 292 |paren|
- 297 |overlabel| 307 |overbar| 313 |over| 318 |outputForm|
- 324 |or| 344 |not| 350 |messagePrint| 355 |message| 360
- |matrix| 365 |left| 370 |latex| 381 |label| 386 |int| 392
- |infix?| 410 |infix| 415 |hspace| 428 |height| 433
- |hconcat| 442 |hash| 453 |exquo| 458 |empty| 464 |elt| 468
- |dot| 474 |div| 485 |differentiate| 491 |commaSeparate|
- 497 |coerce| 502 |center| 507 |bracket| 518 |brace| 528
- |box| 538 |blankSeparate| 543 |binomial| 548 |assign| 554
- |and| 560 ^= 566 SEGMENT 572 >= 583 > 589 = 595 <= 607 <
- 613 / 619 - 625 + 636 ** 642 * 648)
+ '#(~= 78 |zag| 90 |width| 96 |vspace| 105 |vconcat| 110
+ |supersub| 121 |superHeight| 127 |super| 132 |sum| 138
+ |subHeight| 156 |sub| 161 |string| 167 |slash| 172
+ |semicolonSeparate| 178 |scripts| 183 |rspace| 189 |root|
+ 195 |right| 206 |rem| 217 |rarrow| 223 |quote| 229 |quo|
+ 234 |prod| 240 |print| 258 |prime| 263 |presuper| 274
+ |presub| 280 |prefix| 286 |postfix| 292 |pile| 298 |paren|
+ 303 |overlabel| 313 |overbar| 319 |over| 324 |outputForm|
+ 330 |or| 350 |not| 356 |messagePrint| 361 |message| 366
+ |matrix| 371 |left| 376 |latex| 387 |label| 392 |int| 398
+ |infix?| 416 |infix| 421 |hspace| 434 |height| 439
+ |hconcat| 448 |hash| 459 |exquo| 464 |empty| 470 |elt| 474
+ |dot| 480 |div| 491 |differentiate| 497 |commaSeparate|
+ 503 |coerce| 508 |center| 513 |bracket| 524 |brace| 534
+ |box| 544 |blankSeparate| 549 |binomial| 554 |assign| 560
+ |and| 566 SEGMENT 572 >= 583 > 589 = 595 <= 607 < 613 /
+ 619 - 625 + 636 ** 642 * 648)
'NIL
(CONS (|makeByteWordVec2| 1 '(0 0 0))
(CONS '#(|SetCategory&| |BasicType&| NIL)
@@ -1254,42 +1254,42 @@ Note that this code is not included in the generated catdef.spad file.
54 1 6 9 0 66 1 6 0 0 67 1 6 2 0 68 1
6 70 0 71 2 72 0 0 0 73 1 72 0 0 101
1 25 0 10 110 1 124 10 123 125 1 10 0
- 0 126 2 0 9 0 0 1 2 0 0 0 0 115 0 0
- 19 35 1 0 19 0 30 1 0 0 19 44 1 0 0
- 49 76 2 0 0 0 0 45 2 0 0 0 49 74 1 0
- 19 0 33 2 0 0 0 0 63 2 0 0 0 0 129 3
- 0 0 0 0 0 130 1 0 0 0 128 1 0 19 0 32
- 2 0 0 0 0 62 1 0 0 0 105 2 0 0 0 0
- 119 1 0 0 49 52 2 0 0 0 49 69 2 0 0
- 19 19 46 1 0 0 0 116 2 0 0 0 0 117 1
- 0 0 0 43 2 0 0 0 19 40 2 0 0 0 0 89 2
- 0 0 0 0 122 1 0 0 0 106 2 0 0 0 0 90
- 3 0 0 0 0 0 133 1 0 0 0 131 2 0 0 0 0
- 132 1 0 7 0 8 2 0 0 0 70 112 1 0 0 0
- 109 2 0 0 0 0 65 2 0 0 0 0 64 2 0 0 0
- 49 100 2 0 0 0 0 104 1 0 0 49 50 1 0
- 0 49 61 1 0 0 0 60 2 0 0 0 0 113 1 0
- 0 0 107 2 0 0 0 0 118 1 0 0 10 29 1 0
- 0 23 24 1 0 0 21 22 1 0 0 19 20 2 0 0
- 0 0 93 1 0 0 0 94 1 0 7 10 14 1 0 0
- 10 13 1 0 0 47 48 1 0 0 0 42 2 0 0 0
- 19 39 1 0 10 0 1 2 0 0 0 0 121 3 0 0
- 0 0 0 136 2 0 0 0 0 135 1 0 0 0 134 1
- 0 9 0 98 2 0 0 0 49 102 3 0 0 0 0 0
- 103 1 0 0 19 36 0 0 19 34 1 0 19 0 31
- 1 0 0 49 75 2 0 0 0 0 37 1 0 137 0 1
- 2 0 0 0 0 91 0 0 0 12 2 0 0 0 49 99 2
- 0 0 0 70 111 1 0 0 0 108 2 0 0 0 0 88
- 2 0 0 0 70 127 1 0 0 49 51 1 0 17 0
- 18 1 0 0 0 41 2 0 0 0 19 38 1 0 0 0
- 58 1 0 0 49 59 1 0 0 49 57 1 0 0 0 56
- 1 0 0 0 114 1 0 0 49 55 2 0 0 0 0 97
- 2 0 0 0 0 120 2 0 0 0 0 92 2 0 0 0 0
- 77 1 0 0 0 96 2 0 0 0 0 95 2 0 0 0 0
- 81 2 0 0 0 0 79 2 0 0 0 0 16 2 0 9 0
- 0 15 2 0 0 0 0 80 2 0 0 0 0 78 2 0 0
- 0 0 86 1 0 0 0 84 2 0 0 0 0 83 2 0 0
- 0 0 82 2 0 0 0 0 87 2 0 0 0 0 85)))))
+ 0 126 2 0 0 0 0 77 2 0 9 0 0 1 2 0 0
+ 0 0 115 0 0 19 35 1 0 19 0 30 1 0 0
+ 19 44 1 0 0 49 76 2 0 0 0 0 45 2 0 0
+ 0 49 74 1 0 19 0 33 2 0 0 0 0 63 2 0
+ 0 0 0 129 3 0 0 0 0 0 130 1 0 0 0 128
+ 1 0 19 0 32 2 0 0 0 0 62 1 0 0 0 105
+ 2 0 0 0 0 119 1 0 0 49 52 2 0 0 0 49
+ 69 2 0 0 19 19 46 1 0 0 0 116 2 0 0 0
+ 0 117 1 0 0 0 43 2 0 0 0 19 40 2 0 0
+ 0 0 89 2 0 0 0 0 122 1 0 0 0 106 2 0
+ 0 0 0 90 3 0 0 0 0 0 133 1 0 0 0 131
+ 2 0 0 0 0 132 1 0 7 0 8 2 0 0 0 70
+ 112 1 0 0 0 109 2 0 0 0 0 65 2 0 0 0
+ 0 64 2 0 0 0 49 100 2 0 0 0 0 104 1 0
+ 0 49 50 1 0 0 49 61 1 0 0 0 60 2 0 0
+ 0 0 113 1 0 0 0 107 2 0 0 0 0 118 1 0
+ 0 10 29 1 0 0 23 24 1 0 0 21 22 1 0 0
+ 19 20 2 0 0 0 0 93 1 0 0 0 94 1 0 7
+ 10 14 1 0 0 10 13 1 0 0 47 48 1 0 0 0
+ 42 2 0 0 0 19 39 1 0 10 0 1 2 0 0 0 0
+ 121 3 0 0 0 0 0 136 2 0 0 0 0 135 1 0
+ 0 0 134 1 0 9 0 98 2 0 0 0 49 102 3 0
+ 0 0 0 0 103 1 0 0 19 36 0 0 19 34 1 0
+ 19 0 31 1 0 0 49 75 2 0 0 0 0 37 1 0
+ 137 0 1 2 0 0 0 0 91 0 0 0 12 2 0 0 0
+ 49 99 2 0 0 0 70 111 1 0 0 0 108 2 0
+ 0 0 0 88 2 0 0 0 70 127 1 0 0 49 51 1
+ 0 17 0 18 1 0 0 0 41 2 0 0 0 19 38 1
+ 0 0 0 58 1 0 0 49 59 1 0 0 49 57 1 0
+ 0 0 56 1 0 0 0 114 1 0 0 49 55 2 0 0
+ 0 0 97 2 0 0 0 0 120 2 0 0 0 0 92 1 0
+ 0 0 96 2 0 0 0 0 95 2 0 0 0 0 81 2 0
+ 0 0 0 79 2 0 0 0 0 16 2 0 9 0 0 15 2
+ 0 0 0 0 80 2 0 0 0 0 78 2 0 0 0 0 86
+ 1 0 0 0 84 2 0 0 0 0 83 2 0 0 0 0 82
+ 2 0 0 0 0 87 2 0 0 0 0 85)))))
'|lookupComplete|))
(MAKEPROP '|OutputForm| 'NILADIC T)
diff --git a/src/algebra/pade.spad.pamphlet b/src/algebra/pade.spad.pamphlet
index de1a71b2..475212ef 100644
--- a/src/algebra/pade.spad.pamphlet
+++ b/src/algebra/pade.spad.pamphlet
@@ -162,7 +162,7 @@ PadeApproximants(R,PS,UP): Exports == Implementation where
(l,m) := (m,l)
plist := concat(0,plist)
alist := concat(0,alist)
- -- Ensure l >= m, maintaining coef(dps,0)^=0.
+ -- Ensure l >= m, maintaining coef(dps,0)~=0.
if l < m then
-- (a<n>*x**n + a<n+1>*x**n+1 + ...)/b
-- = x**n/b + (a<n> + a<n+1>*x + ...)/b
diff --git a/src/algebra/padic.spad.pamphlet b/src/algebra/padic.spad.pamphlet
index a75faa77..e17fe7dc 100644
--- a/src/algebra/padic.spad.pamphlet
+++ b/src/algebra/padic.spad.pamphlet
@@ -116,7 +116,7 @@ InnerPAdicInteger(p,unBalanced?): Exports == Implementation where
modPInfo n ==
dv := divide(n,p)
r0 := dv.remainder; q := dv.quotient
- if (r := modP r0) ^= r0 then q := q + ((r0 - r) quo p)
+ if (r := modP r0) ~= r0 then q := q + ((r0 - r) quo p)
[r,q]
invModP: I -> I
@@ -135,7 +135,7 @@ InnerPAdicInteger(p,unBalanced?): Exports == Implementation where
n : I := _$streamCount$Lisp
for i in 0..n repeat
empty? st => return true
- frst st ^= 0 => return false
+ frst st ~= 0 => return false
st := rst st
empty? st
@@ -143,7 +143,7 @@ InnerPAdicInteger(p,unBalanced?): Exports == Implementation where
st := stream x
for i in 0..1000 repeat
empty? st => return 0
- frst st ^= 0 => return i
+ frst st ~= 0 => return i
st := rst st
error "order: series has more than 1000 leading zero coefs"
@@ -293,13 +293,13 @@ InnerPAdicInteger(p,unBalanced?): Exports == Implementation where
n : NNI ; count : NNI := _$streamCount$Lisp
l : L OUT := empty()
for n in 0..count while not empty? st repeat
- if frst(st) ^= 0 then
+ if frst(st) ~= 0 then
l := concat(termOutput(n :: I,frst st),l)
st := rst st
if showAll?() then
for n in (count + 1).. while explicitEntries? st and _
not eq?(st,rst st) repeat
- if frst(st) ^= 0 then
+ if frst(st) ~= 0 then
l := concat(termOutput(n pretend I,frst st),l)
st := rst st
l :=
@@ -515,13 +515,13 @@ PAdicRationalConstructor(p,PADIC): Exports == Implementation where
empty? uu => 0 :: OUT
n : NNI ; count : NNI := _$streamCount$Lisp
for n in 0..count while not empty? uu repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput((n :: I) + m,frst(uu)),l)
uu := rst uu
if showAll?() then
for n in (count + 1).. while explicitEntries? uu and _
not eq?(uu,rst uu) repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput((n::I) + m,frst(uu)),l)
uu := rst uu
l :=
diff --git a/src/algebra/patmatch1.spad.pamphlet b/src/algebra/patmatch1.spad.pamphlet
index 381bbf30..1ee6220f 100644
--- a/src/algebra/patmatch1.spad.pamphlet
+++ b/src/algebra/patmatch1.spad.pamphlet
@@ -283,7 +283,7 @@ PatternMatchKernel(S, E): Exports == Implementation where
-- matches the ordered lists ls and lp.
patternMatchArg(ls, lp, l) ==
- #ls ^= #lp => failed()
+ #ls ~= #lp => failed()
for p in lp for s in ls repeat
generic? p and failed?(l := addMatch(p,s,l)) => return failed()
for p in lp for s in ls repeat
@@ -518,7 +518,7 @@ PatternMatchTools(S, R, P): Exports == Implementation where
patternMatchTimes(ls, lp, l, pmatch) ==
member?(mn1, lp) =>
(u := negConstant ls) case "failed" => failed()
- if (u::P ^= -1::P) then ls := concat(-u::P, ls)
+ if (u::P ~= -1::P) then ls := concat(-u::P, ls)
patternMatch(remove(u::P,ls), remove(mn1,lp), */#1, l, pmatch)
patternMatch(ls, lp, */#1, l, pmatch)
diff --git a/src/algebra/pattern.spad.pamphlet b/src/algebra/pattern.spad.pamphlet
index e22e9207..fe011879 100644
--- a/src/algebra/pattern.spad.pamphlet
+++ b/src/algebra/pattern.spad.pamphlet
@@ -195,7 +195,7 @@ Pattern(R:SetCategory): Exports == Implementation where
generic? p == symbol? p and bitSet?(p.pat.sym.tag, SYM_GENERIC)
multiple? p == symbol? p and bitSet?(p.pat.sym.tag,SYM_MULTIPLE)
optional? p == symbol? p and bitSet?(p.pat.sym.tag,SYM_OPTIONAL)
- bitSet?(a, b) == And(a, b) ^= 0
+ bitSet?(a, b) == And(a, b) ~= 0
coerce(p:%):O == PAT2O(p.pat)
p1:% ** p2:% == taggedElt(PAT_EXPT, [p1, p2])
LPAT2O(f, l) == reduce(f, [x::O for x in l])$List(O)
diff --git a/src/algebra/pdecomp.spad.pamphlet b/src/algebra/pdecomp.spad.pamphlet
index 37057fc4..8f60ecd0 100644
--- a/src/algebra/pdecomp.spad.pamphlet
+++ b/src/algebra/pdecomp.spad.pamphlet
@@ -20,7 +20,7 @@ PolynomialComposition(UP: UnivariatePolynomialCategory(R), R: Ring): with
== add
compose(g, h) ==
r: UP := 0
- while g ^= 0 repeat
+ while g ~= 0 repeat
r := leadingCoefficient(g)*h**degree(g) + r
g := reductum g
r
@@ -50,7 +50,7 @@ PolynomialDecomposition(UP, F): PDcat == PDdef where
PDdef == add
leftFactor(f, h) ==
g: UP := 0
- for i in 0.. while f ^= 0 repeat
+ for i in 0.. while f ~= 0 repeat
fr := divide(f, h)
f := fr.quotient; r := fr.remainder
degree r > 0 => return "failed"
@@ -59,7 +59,7 @@ PolynomialDecomposition(UP, F): PDcat == PDdef where
decompose(f, dg, dh) ==
df := degree f
- dg*dh ^= df => "failed"
+ dg*dh ~= df => "failed"
h := rightFactorCandidate(f, dh)
g := leftFactor(f, h)
g case "failed" => "failed"
diff --git a/src/algebra/perm.spad.pamphlet b/src/algebra/perm.spad.pamphlet
index 23f24341..141f9c58 100644
--- a/src/algebra/perm.spad.pamphlet
+++ b/src/algebra/perm.spad.pamphlet
@@ -224,10 +224,10 @@ domain.
perm
smallerCycle?(cyca: L S, cycb: L S): B ==
- #cyca ^= #cycb =>
+ #cyca ~= #cycb =>
#cyca < #cycb
for i in cyca for j in cycb repeat
- i ^= j => return smaller?(i, j)
+ i ~= j => return smaller?(i, j)
false
shorterCycle?(cyca: L S, cycb: L S): B ==
@@ -235,7 +235,7 @@ domain.
permord(pa: RECCYPE, pb : RECCYPE): B ==
for i in pa.cycl for j in pb.cycl repeat
- i ^= j => return smallerCycle?(i, j)
+ i ~= j => return smallerCycle?(i, j)
#pa.cycl < #pb.cycl
coerceToCycle(p: %, doSorting?: B): L L S ==
@@ -249,7 +249,7 @@ domain.
preim := rest preim
nextEltInCycle := first im
im := rest im
- while nextEltInCycle ^= firstEltInCycle repeat
+ while nextEltInCycle ~= firstEltInCycle repeat
nextCycle := cons(nextEltInCycle, nextCycle)
i := position(nextEltInCycle, preim)
preim := delete(preim,i)
@@ -325,18 +325,18 @@ removes fixed points from its result.
degree p == #movedPoints p
p = q ==
- #(preimp := p.1) ^= #(preimq := q.1) => false
+ #(preimp := p.1) ~= #(preimq := q.1) => false
for i in 1..maxIndex preimp repeat
pos := position(preimp.i, preimq)
pos = 0 => return false
- (p.2).i ^= (q.2).pos => return false
+ (p.2).i ~= (q.2).pos => return false
true
orbit(p ,el) ==
-- start with a 1-element list:
out : Set S := brace list el
el2 := eval(p, el)
- while el2 ^= el repeat
+ while el2 ~= el repeat
-- be carefull: insert adds one element
-- as side effect to out
insert_!(el2, out)
@@ -365,7 +365,7 @@ removes fixed points from its result.
pacyc:= coerceToCycle(pa,true)
pbcyc:= coerceToCycle(pb,true)
for i in pacyc for j in pbcyc repeat
- i ^= j => return smallerCycle? ( i, j )
+ i ~= j => return smallerCycle? ( i, j )
maxIndex pacyc < maxIndex pbcyc
coerce(lls : L L S): % == coerceCycle lls
@@ -410,11 +410,11 @@ removes fixed points from its result.
preim := nil()$(L S)
im := nil()$(L S)
for pair in loP repeat
- if first pair ^= second pair then
+ if first pair ~= second pair then
preim := cons(first pair, preim)
im := cons(second pair, im)
duplicates?(preim) or duplicates?(im) or brace(preim)$(Set S) _
- ^= brace(im)$(Set S) =>
+ ~= brace(im)$(Set S) =>
error "coerceListOfPairs: the input cannot be interpreted as a permutation"
[preim, im]
@@ -439,7 +439,7 @@ removes fixed points from its result.
el := imOfq.j
-- if the composition fixes the element, we don't
-- have to do anything
- if el ^= preimOfp.i then
+ if el ~= preimOfp.i then
preimOfqp := cons(preimOfp.i, preimOfqp)
imOfqp := cons(el, imOfqp)
-- we drop the parts of q which have to do with p
diff --git a/src/algebra/perman.spad.pamphlet b/src/algebra/perman.spad.pamphlet
index bc2f63f1..2fa6e43d 100644
--- a/src/algebra/perman.spad.pamphlet
+++ b/src/algebra/perman.spad.pamphlet
@@ -135,7 +135,7 @@ Permanent(n : PositiveInteger, R : Ring with commutative("*")):
++ some modifications are necessary:
++ \item 2. if {\em n > 6} and R is an integral domain with characteristic
++ different from 2 (the algorithm works if and only 2 is not a
- ++ zero-divisor of R and {\em characteristic()$R ^= 2},
+ ++ zero-divisor of R and {\em characteristic()$R ~= 2},
++ but how to check that for any given R ?),
++ the local function {\em permanent2} is called;
++ \item 3. else, the local function {\em permanent3} is called
@@ -166,7 +166,7 @@ Permanent(n : PositiveInteger, R : Ring with commutative("*")):
-- For the meaning of the elements of vv, see GRAY.
w : V R := new(n,0$R)
j := 1 -- Will be the number of the element changed in subset
- while j ^= (n+1) repeat -- we sum over all subsets of (1,...,n)
+ while j ~= (n+1) repeat -- we sum over all subsets of (1,...,n)
sgn := -sgn
b := sgn
if vv.1.j = 1 then k := -1
@@ -211,7 +211,7 @@ Permanent(n : PositiveInteger, R : Ring with commutative("*")):
b := b * w.i
a := a+b
j := 1 -- Will be the number of the element changed in subset
- while j ^= n repeat -- we sum over all subsets of (1,...,n-1)
+ while j ~= n repeat -- we sum over all subsets of (1,...,n-1)
sgn := -sgn
b := sgn
if vv.1.j = 1 then k := -1
@@ -256,7 +256,7 @@ Permanent(n : PositiveInteger, R : Ring with commutative("*")):
b := b *$R w.i
a := a +$R b
j := 1 -- Will be the number of the element changed in subset
- while j ^= n repeat -- we sum over all subsets of (1,...,n-1)
+ while j ~= n repeat -- we sum over all subsets of (1,...,n-1)
sgn := -sgn
b := sgn
if vv.1.j = 1 then k := -1
diff --git a/src/algebra/permgrps.spad.pamphlet b/src/algebra/permgrps.spad.pamphlet
index 0b3fa62d..ee97d7ed 100644
--- a/src/algebra/permgrps.spad.pamphlet
+++ b/src/algebra/permgrps.spad.pamphlet
@@ -218,7 +218,7 @@ PermutationGroup(S:SetCategory): public == private where
flag := false
while pointer > 1 repeat
pointer := ( pointer - 1 )::NNI
- if newlw.pointer ^= test then
+ if newlw.pointer ~= test then
-- don't get a trivial element, try next
test := newlw.pointer
anzahl := 1
@@ -294,7 +294,7 @@ PermutationGroup(S:SetCategory): public == private where
testIdentity ( p : V NNI ) : B ==
-- internal test for identity
- for i in 1..degree repeat qelt(p,i) ^= i => return false
+ for i in 1..degree repeat qelt(p,i) ~= i => return false
true
pointList(group : %) : L S ==
@@ -346,14 +346,14 @@ PermutationGroup(S:SetCategory): public == private where
ort := orbitWithSvc ( group , i )
k := ort.orb
k1 := # k
- if k1 ^= 1 then leave
+ if k1 ~= 1 then leave
gpsgs := nil()$(L V NNI)
words2 := nil()$(L L NNI)
gplength : NNI := #group
- for jj in 1..gplength repeat if (group.jj).i ^= i then leave
+ for jj in 1..gplength repeat if (group.jj).i ~= i then leave
for k in 1..gplength repeat
el2 := group.k
- if el2.i ^= i then
+ if el2.i ~= i then
gpsgs := cons ( el2 , gpsgs )
if wordProblem then words2 := cons ( words.k , words2 )
else
@@ -432,7 +432,7 @@ PermutationGroup(S:SetCategory): public == private where
pt2 := baseLength - j + 1
sgs2 := append ( sgs2 , out.j )
obs2 := orbitWithSvc ( sgs2 , baseOfGroup.pt2 )
- if # obs2.orb ^= orbitLength.j then
+ if # obs2.orb ~= orbitLength.j then
test := false
leave
if test then
@@ -541,7 +541,7 @@ PermutationGroup(S:SetCategory): public == private where
word := shortenWord ( word , group )
if newBasePoint then
for i in 1..degree repeat
- if z.i ^= i then
+ if z.i ~= i then
baseOfGroup := append ( baseOfGroup , [ i ] )
leave
out := cons (list z, out )
@@ -739,7 +739,7 @@ PermutationGroup(S:SetCategory): public == private where
subgroup ( gp1 , gp2 )
gp1 = gp2 ==
- movedPoints gp1 ^= movedPoints gp2 => false
+ movedPoints gp1 ~= movedPoints gp2 => false
if #(gp1.gens) <= #(gp2.gens) then
not subgroup ( gp1 , gp2 ) => return false
else
@@ -1007,7 +1007,7 @@ PermutationGroupExamples():public == private where
mathieu11(l:L I):PERMGRP I ==
-- permutations derived from the ATLAS
l:=removeDuplicates l
- #l ^= 11 => error "Exactly 11 integers for mathieu11 needed !"
+ #l ~= 11 => error "Exactly 11 integers for mathieu11 needed !"
a:L L I:=[[l.1,l.10],[l.2,l.8],[l.3,l.11],[l.5,l.7]]
llli2gp [a,[[l.1,l.4,l.7,l.6],[l.2,l.11,l.10,l.9]]]
@@ -1016,7 +1016,7 @@ PermutationGroupExamples():public == private where
mathieu12(l:L I):PERMGRP I ==
-- permutations derived from the ATLAS
l:=removeDuplicates l
- #l ^= 12 => error "Exactly 12 integers for mathieu12 needed !"
+ #l ~= 12 => error "Exactly 12 integers for mathieu12 needed !"
a:L L I:=
[[l.1,l.2,l.3,l.4,l.5,l.6,l.7,l.8,l.9,l.10,l.11]]
llli2gp [a,[[l.1,l.6,l.5,l.8,l.3,l.7,l.4,l.2,l.9,l.10],[l.11,l.12]]]
@@ -1026,7 +1026,7 @@ PermutationGroupExamples():public == private where
mathieu22(l:L I):PERMGRP I ==
-- permutations derived from the ATLAS
l:=removeDuplicates l
- #l ^= 22 => error "Exactly 22 integers for mathieu22 needed !"
+ #l ~= 22 => error "Exactly 22 integers for mathieu22 needed !"
a:L L I:=[[l.1,l.2,l.4,l.8,l.16,l.9,l.18,l.13,l.3,l.6,l.12], _
[l.5,l.10,l.20,l.17,l.11,l.22,l.21,l.19,l.15,l.7,l.14]]
b:L L I:= [[l.1,l.2,l.6,l.18],[l.3,l.15],[l.5,l.8,l.21,l.13], _
@@ -1038,7 +1038,7 @@ PermutationGroupExamples():public == private where
mathieu23(l:L I):PERMGRP I ==
-- permutations derived from the ATLAS
l:=removeDuplicates l
- #l ^= 23 => error "Exactly 23 integers for mathieu23 needed !"
+ #l ~= 23 => error "Exactly 23 integers for mathieu23 needed !"
a:L L I:= [[l.1,l.2,l.3,l.4,l.5,l.6,l.7,l.8,l.9,l.10,l.11,l.12,l.13,l.14,_
l.15,l.16,l.17,l.18,l.19,l.20,l.21,l.22,l.23]]
b:L L I:= [[l.2,l.16,l.9,l.6,l.8],[l.3,l.12,l.13,l.18,l.4], _
@@ -1050,7 +1050,7 @@ PermutationGroupExamples():public == private where
mathieu24(l:L I):PERMGRP I ==
-- permutations derived from the ATLAS
l:=removeDuplicates l
- #l ^= 24 => error "Exactly 24 integers for mathieu24 needed !"
+ #l ~= 24 => error "Exactly 24 integers for mathieu24 needed !"
a:L L I:= [[l.1,l.16,l.10,l.22,l.24],[l.2,l.12,l.18,l.21,l.7], _
[l.4,l.5,l.8,l.6,l.17],[l.9,l.11,l.13,l.19,l.15]]
b:L L I:= [[l.1,l.22,l.13,l.14,l.6,l.20,l.3,l.21,l.8,l.11],[l.2,l.10], _
@@ -1062,7 +1062,7 @@ PermutationGroupExamples():public == private where
janko2(l:L I):PERMGRP I ==
-- permutations derived from the ATLAS
l:=removeDuplicates l
- #l ^= 100 => error "Exactly 100 integers for janko2 needed !"
+ #l ~= 100 => error "Exactly 100 integers for janko2 needed !"
a:L L I:=[ _
[l.2,l.3,l.4,l.5,l.6,l.7,l.8], _
[l.9,l.10,l.11,l.12,l.13,l.14,l.15], _
diff --git a/src/algebra/pfr.spad.pamphlet b/src/algebra/pfr.spad.pamphlet
index 8286147e..eeaa4c2f 100644
--- a/src/algebra/pfr.spad.pamphlet
+++ b/src/algebra/pfr.spad.pamphlet
@@ -147,9 +147,9 @@ PartialFraction(R: EuclideanDomain): Cat == Capsule where
coefs := (i :: Record(coef1: R, coef2: R))
c : % := copypf 0$%
d : %
- if coefs.coef2 ^= 0$R then
+ if coefs.coef2 ~= 0$R then
c := normalizeFracTerm ([coefs.coef2, t.den]$fTerm)
- if coefs.coef1 ^= 0$R then
+ if coefs.coef1 ~= 0$R then
d := normalizeFracTerm ([coefs.coef1, s.den]$fTerm)
c.whole := c.whole + d.whole
not (null d.fract) => c.fract := append(d.fract,c.fract)
@@ -200,7 +200,7 @@ PartialFraction(R: EuclideanDomain): Cat == Capsule where
e = 1 => l := cons(s,l)
f := nthFactor(s.den,1)
d := degree(sp := padicallyExpand(f,s.num))
- while (sp ^= 0$SUPR) repeat
+ while (sp ~= 0$SUPR) repeat
l := cons([leadingCoefficient sp,nilFactor(f,e-d)]$fTerm, l)
d := degree(sp := reductum sp)
[b.whole, sort(LessThan,l)]$%
@@ -282,7 +282,7 @@ PartialFraction(R: EuclideanDomain): Cat == Capsule where
padicallyExpand(p,qr.quotient)
a = b ==
- a.whole ^= b.whole => false -- must verify this
+ a.whole ~= b.whole => false -- must verify this
(null a.fract) =>
null b.fract => a.whole = b.whole
false
diff --git a/src/algebra/pgcd.spad.pamphlet b/src/algebra/pgcd.spad.pamphlet
index 8cee7ec0..e37aa5d0 100644
--- a/src/algebra/pgcd.spad.pamphlet
+++ b/src/algebra/pgcd.spad.pamphlet
@@ -122,9 +122,9 @@ PolynomialGcdPackage(E,OV,R,P):C == T where
member?(lval,ltry) => "new point"
ltry:=cons(lval,ltry)
uf1:SUP:=completeEval(p1,lvr,lval)
- degree uf1 ^= d1 => "new point"
+ degree uf1 ~= d1 => "new point"
uf2:SUP:= completeEval(p2,lvr,lval)
- degree uf2 ^= d2 => "new point"
+ degree uf2 ~= d2 => "new point"
u:=gcd(uf1,uf2)
du:=degree u
--the univariate gcd is 1
@@ -141,7 +141,7 @@ PolynomialGcdPackage(E,OV,R,P):C == T where
dd=d1 =>
if ^((f:=p2 exquo p1) case "failed") then
return [[u],ltry,p1]$UTerm
- if dd^=d2 then dd:=(dd-1)::NNI
+ if dd~=d2 then dd:=(dd-1)::NNI
dd=d2 =>
if ^((f:=p1 exquo p2) case "failed") then
@@ -183,7 +183,7 @@ PolynomialGcdPackage(E,OV,R,P):C == T where
(gd1,gd2):=(l,l)
ul:=completeEval(l,lvar1,lval)
dl:=degree ul
- if degree gcd(ul,differentiate ul) ^=0 then
+ if degree gcd(ul,differentiate ul) ~=0 then
newchoice:=good(l,lvar1,ltry)
ul:=newchoice.upol
ltry:=newchoice.inval
@@ -195,7 +195,7 @@ PolynomialGcdPackage(E,OV,R,P):C == T where
d:SUP:=gcd(cons(ul,ulist))
if degree d =0 then return gd1
lquo:=(ul exquo d)::SUP
- if degree lquo ^=0 then
+ if degree lquo ~=0 then
lgcd:=gcd(cons(leadingCoefficient l,lcpol))
(gdl:=lift(l,d,lquo,lgcd,lvar1,ldeg,lval)) case "failed" =>
return notCoprime(g,p2,ldeg,lvar1,ltry)
@@ -321,7 +321,7 @@ PolynomialGcdPackage(E,OV,R,P):C == T where
df:=degree f
leadlist:List(P):=[]
- if lgcd^=1 then
+ if lgcd~=1 then
leadpol:=true
f:=lgcd*f
ldeg:=[n0+n1 for n0 in ldeg for n1 in degree(lgcd,lvar)]
@@ -335,7 +335,7 @@ PolynomialGcdPackage(E,OV,R,P):C == T where
"failed"
plist := pl :: List SUPP
(p0:SUPP,p1:SUPP):=(plist.first,plist.2)
- if completeEval(p0,lvar,lval) ^= lg.first then
+ if completeEval(p0,lvar,lval) ~= lg.first then
(p0,p1):=(p1,p0)
^leadpol => p0
p0 exquo content(p0)
diff --git a/src/algebra/pinterp.spad.pamphlet b/src/algebra/pinterp.spad.pamphlet
index d8c1482f..0d3c9a04 100644
--- a/src/algebra/pinterp.spad.pamphlet
+++ b/src/algebra/pinterp.spad.pamphlet
@@ -24,13 +24,13 @@ PolynomialInterpolationAlgorithms(F, P): Cat == Body where
Body ==> add
LagrangeInterpolation(lx, ly) ==
- #lx ^= #ly =>
+ #lx ~= #ly =>
error "Different number of points and values."
ip: P := 0
for xi in lx for yi in ly for i in 0.. repeat
pp: P := 1
xp: F := 1
- for xj in lx for j in 0.. | i ^= j repeat
+ for xj in lx for j in 0.. | i ~= j repeat
pp := pp * (monomial(1,1) - monomial(xj,0))
xp := xp * (xi - xj)
ip := ip + (yi/xp) * pp
diff --git a/src/algebra/pleqn.spad.pamphlet b/src/algebra/pleqn.spad.pamphlet
index 8b0569f3..057c9bc3 100644
--- a/src/algebra/pleqn.spad.pamphlet
+++ b/src/algebra/pleqn.spad.pamphlet
@@ -225,7 +225,7 @@ ParametricLinearEquations(R,Var,Expon,GR):
++ pr2dmp(p) converts p to target domain
hasoln: (Fgb, L GR) -> Rec8
++ hasoln(g, l) tests whether the quasi-algebraic set
- ++ defined by p = 0 for p in g and q ^= 0 for q in l
+ ++ defined by p = 0 for p in g and q ~= 0 for q in l
++ is empty or not and returns a simplified definition
++ of the quasi-algebraic set
-- this is now done in QALGSET package
@@ -325,7 +325,7 @@ ParametricLinearEquations(R,Var,Expon,GR):
w:L GF:=sys.vec
p:V GF:=new(n,0)
pbas:L V GF:=[]
- if k ^= 0 then
+ if k ~= 0 then
augmat:M GF:=zero(k,n+1)
for i in rss for i1 in 1.. repeat
for j in nss for j1 in 1.. repeat
@@ -387,7 +387,7 @@ ParametricLinearEquations(R,Var,Expon,GR):
bsolve (coeff, w, h, outname, mode) ==
r:=nrows coeff
-- n:=ncols coeff
- r ^= #w => error "number of rows unequal on lhs and rhs"
+ r ~= #w => error "number of rows unequal on lhs and rhs"
newfile:FNAME
rksoln:File Rec3
count:I:=0
@@ -613,7 +613,7 @@ ParametricLinearEquations(R,Var,Expon,GR):
for nss in nextSublist(n, k) until found repeat
matsub := mat(rss, nss) pretend SM(j, GR)
detmat := determinant(matsub)
- if detmat ^= 0 then
+ if detmat ~= 0 then
found:= (ground? detmat)
detmat:=sqfree detmat
neweqn:Rec:=construct(detmat,rss,nss)
diff --git a/src/algebra/plot.spad.pamphlet b/src/algebra/plot.spad.pamphlet
index ea92ae66..01877c29 100644
--- a/src/algebra/plot.spad.pamphlet
+++ b/src/algebra/plot.spad.pamphlet
@@ -260,7 +260,7 @@ Plot(): Exports == Implementation where
NUMFUNEVALS := NUMFUNEVALS + 1
t := c := reverse_! c; p := q := reverse_! q
s := (h-l)/(minPoints()::F-1)
- if (first t) ^= l then
+ if (first t) ~= l then
t := c := concat(l,c)
p := q := concat(f l,p)
NUMFUNEVALS := NUMFUNEVALS + 1
diff --git a/src/algebra/plot3d.spad.pamphlet b/src/algebra/plot3d.spad.pamphlet
index 804a1207..575498d5 100644
--- a/src/algebra/plot3d.spad.pamphlet
+++ b/src/algebra/plot3d.spad.pamphlet
@@ -218,7 +218,7 @@ Plot3D(): Exports == Implementation where
NUMFUNEVALS := NUMFUNEVALS + 1
t := c := reverse_! c; p := q := reverse_! q
s := (h-l)/(MINPOINTS::F-1)
- if (first t) ^= l then
+ if (first t) ~= l then
t := c := concat(l,c); p := q := concat(f l,p)
NUMFUNEVALS := NUMFUNEVALS + 1
while not null rest t repeat
diff --git a/src/algebra/poltopol.spad.pamphlet b/src/algebra/poltopol.spad.pamphlet
index b1f1801d..296c0027 100644
--- a/src/algebra/poltopol.spad.pamphlet
+++ b/src/algebra/poltopol.spad.pamphlet
@@ -79,7 +79,7 @@ MPolyCatFunctions3(Vars1,Vars2,E1,E2,R,PR1,PR2): C == T where
up := univariate(p, x1::Vars1)
x2 := f(x1::Vars1)
ans:PR2 := 0
- while up ^= 0 repeat
+ while up ~= 0 repeat
ans := ans + monomial(map(f,leadingCoefficient up),x2,degree up)
up := reductum up
ans
diff --git a/src/algebra/poly.spad.pamphlet b/src/algebra/poly.spad.pamphlet
index ad0206cd..fe9eb615 100644
--- a/src/algebra/poly.spad.pamphlet
+++ b/src/algebra/poly.spad.pamphlet
@@ -54,7 +54,7 @@ FreeModule(R:Ring,S:OrderedSet):
-- one? r => x
(r = 1) => x
--map(r*#1,x)
- [[u.k,a] for u in x | (a:=r*u.c) ^= 0$R]
+ [[u.k,a] for u in x | (a:=r*u.c) ~= 0$R]
if R has EntireRing then
x * r ==
zero? r => 0
@@ -68,7 +68,7 @@ FreeModule(R:Ring,S:OrderedSet):
-- one? r => x
(r = 1) => x
--map(r*#1,x)
- [[u.k,a] for u in x | (a:=u.c*r) ^= 0$R]
+ [[u.k,a] for u in x | (a:=u.c*r) ~= 0$R]
coerce(x) : OutputForm ==
null x => (0$R) :: OutputForm
@@ -288,7 +288,7 @@ PolynomialRing(R:Ring,E:OrderedAbelianMonoid): T == C
-- null p2 => 0
-- zero?(p1.first.k) => p1.first.c * p2
-- one? p2 => p1
--- +/[[[t1.k+t2.k,r]$Term for t2 in p2 | (r:=t1.c*t2.c) ^= 0]
+-- +/[[[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:
-- -- reduces both time and space [Abbott/Bradford/Davenport]
@@ -348,7 +348,7 @@ PolynomialRing(R:Ring,E:OrderedAbelianMonoid): T == C
while not null p1 and p1.first.k > e2 repeat
(rout:=[p1.first,:rout]; p1:=p1.rest) --use PUSH and POP?
null p1 or p1.first.k < e2 => rout:=[[e2,c2],:rout]
- if (u:=p1.first.c + c2) ^= 0 then rout:=[[e2, u],:rout]
+ if (u:=p1.first.c + c2) ~= 0 then rout:=[[e2, u],:rout]
p1:=p1.rest
NRECONC(rout,p1)$Lisp
if R has approximate then
@@ -501,7 +501,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
while not null p1 and p1.first.k > e2 repeat
(rout:=[p1.first,:rout]; p1:=p1.rest) --use PUSH and POP?
null p1 or p1.first.k < e2 => rout:=[[e2,c2],:rout]
- if (u:=p1.first.c + c2) ^= 0 then rout:=[[e2, u],:rout]
+ if (u:=p1.first.c + c2) ~= 0 then rout:=[[e2, u],:rout]
p1:=p1.rest
NRECONC(rout,p1)$Lisp
@@ -600,7 +600,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
while not null p1 and p1.first.k > e2 repeat
(rout:=[p1.first,:rout]; p1:=p1.rest) --use PUSH and POP?
null p1 or p1.first.k < e2 => rout:=[[e2,c2],:rout]
- if (u:=p1.first.c + c2) ^= 0 then rout:=[[e2, u],:rout]
+ if (u:=p1.first.c + c2) ~= 0 then rout:=[[e2, u],:rout]
p1:=p1.rest
NRECONC(rout,p1)$Lisp
pseudoRemainder(p1,p2) ==
@@ -651,7 +651,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
monicDivide(p1:%,p2:%) ==
null p2 => error "monicDivide: division by 0"
- leadingCoefficient p2 ^= 1 => error "Divisor Not Monic"
+ leadingCoefficient p2 ~= 1 => error "Divisor Not Monic"
p2 = 1 => [p1,0]
null p1 => [0,0]
degree p1 < (n:=degree p2) => [0,p1]
@@ -679,7 +679,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
-- p:=pseudoRemainder(p1,p2)
-- co:=1$R;
-- e:= (p1.first.k - p2.first.k):NonNegativeInteger
--- while not null p and p.first.k ^= 0 repeat
+-- while not null p and p.first.k ~= 0 repeat
-- p1:=p2; p2:=p; p:=pseudoRemainder(p1,p2)
-- null p or p.first.k = 0 => "enuf"
-- co:=(p1.first.c ** e exquo co ** max(0, (e-1))::NonNegativeInteger)::R
@@ -727,7 +727,7 @@ SparseUnivariatePolynomial(R:Ring): UnivariatePolynomialCategory(R) with
n:=p2.first.k
p2:=p2.rest
rout:=empty()$List(Term)
- while p1 ^= 0 repeat
+ while p1 ~= 0 repeat
(u:=subtractIfCan(p1.first.k, n)) case "failed" => leave
rout:=[[u, ct * p1.first.c], :rout]
p1:=fmecg(p1.rest, rout.first.k, rout.first.c, p2)
@@ -938,7 +938,7 @@ UnivariatePolynomialSquareFree(RC:IntegralDomain,P):C == T
makeFR(u,[["sqfr",c,1]])
i:NonNegativeInteger:=0; lffe:List FF:=[]
lcp := leadingCoefficient p
- while degree(ci)^=0 repeat
+ while degree(ci)~=0 repeat
ci:=(ci exquo pi)::P
di:=(di exquo pi)::P - differentiate(ci)
pi:=gcd(ci,di)
@@ -960,7 +960,7 @@ UnivariatePolynomialSquareFree(RC:IntegralDomain,P):C == T
di := (p exquo ci)::P
i:NonNegativeInteger:=0; lffe:List FF:=[]
dunit : P := 1
- while degree(di)^=0 repeat
+ while degree(di)~=0 repeat
diprev := di
di := gcd(ci,di)
ci:=(ci exquo di)::P
@@ -1081,7 +1081,7 @@ PolynomialSquareFree(VarSet:OrderedSet,E,RC:GcdDomain,P):C == T where
cont1:=cont1*((unit listfin1)**uexp)
pfaclist:=append(flistfin1,pfaclist)
cont:=cont*cont1
- cont ^= 1 =>
+ cont ~= 1 =>
sqp := squareFree cont
pfaclist:= append (factorList sqp,pfaclist)
makeFR(unit(sqp)*coefficient(unit squf,0),pfaclist)
@@ -1090,7 +1090,7 @@ PolynomialSquareFree(VarSet:OrderedSet,E,RC:GcdDomain,P):C == T where
squareFree(p:P) ==
mv:=mainVariable p
mv case "failed" => makeFR(p,[])$Factored(P)
- characteristic$RC ^=0 => finSqFr(p,variables p)
+ characteristic$RC ~=0 => finSqFr(p,variables p)
up:=univariate(p,mv)
cont := content up
up := (up exquo cont)::SUP
@@ -1098,7 +1098,7 @@ PolynomialSquareFree(VarSet:OrderedSet,E,RC:GcdDomain,P):C == T where
pfaclist:List FF :=
[[u.flg,multivariate(u.fctr,mv),u.xpnt]
for u in factorList squp]
- cont ^= 1 =>
+ cont ~= 1 =>
sqp := squareFree cont
makeFR(unit(sqp)*coefficient(unit squp,0),
append(factorList sqp, pfaclist))
diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet
index bb940038..05ee03f9 100644
--- a/src/algebra/polycat.spad.pamphlet
+++ b/src/algebra/polycat.spad.pamphlet
@@ -361,7 +361,7 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
-- concat(leadingMonomial p, monomials reductum p)
-- replaced by sequential version for efficiency, by WMSIT, 7/30/90
ml:= empty$List(%)
- while p ^= 0 repeat
+ while p ~= 0 repeat
ml:=concat(leadingMonomial p, ml)
p:= reductum p
reverse ml
@@ -408,7 +408,7 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
ground? p => 0
u := univariate(p, mainVariable(p)::VarSet)
d: NonNegativeInteger := 0
- while u ^= 0 repeat
+ while u ~= 0 repeat
d := max(d, degree u + totalDegree leadingCoefficient u)
u := reductum u
d
@@ -418,7 +418,7 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
d: NonNegativeInteger := 0
w: NonNegativeInteger := 0
if member?(v, lv) then w:=1
- while u ^= 0 repeat
+ while u ~= 0 repeat
d := max(d, w*(degree u) + totalDegree(leadingCoefficient u,lv))
u := reductum u
d
@@ -2960,7 +2960,7 @@ UnivariatePolynomialCategory(R:Ring): Category ==
if R has Algebra Fraction Integer then
integrate p ==
ans:% := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
l := leadingCoefficient p
d := 1 + degree p
ans := ans + inv(d::Fraction(Integer)) * monomial(l, d)
@@ -4326,7 +4326,7 @@ UnivariatePolynomialCategoryFunctions2(R,PR,S,PS): Exports == Impl where
Impl ==> add
map(f, p) ==
ans:PS := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
ans := ans + monomial(f leadingCoefficient p, degree p)
p := reductum p
ans
@@ -4365,14 +4365,14 @@ CommuteUnivariatePolynomialCategory(R, UP, UPUP): Exports == Impl where
-- converts P(x,y) to P(y,x)
swap poly ==
ans:UPUP := 0
- while poly ^= 0 repeat
+ while poly ~= 0 repeat
ans := ans + makePoly(leadingCoefficient poly, degree poly)
poly := reductum poly
ans
makePoly(poly, d) ==
ans:UPUP := 0
- while poly ^= 0 repeat
+ while poly ~= 0 repeat
ans := ans +
monomial(monomial(leadingCoefficient poly, d), degree poly)
poly := reductum poly
diff --git a/src/algebra/primelt.spad.pamphlet b/src/algebra/primelt.spad.pamphlet
index baee4e62..cc1d9bf4 100644
--- a/src/algebra/primelt.spad.pamphlet
+++ b/src/algebra/primelt.spad.pamphlet
@@ -93,7 +93,7 @@ PrimitiveElement(F): Exports == Implementation where
ll := nil()$List(UP)
for v in lv repeat
((u := findUniv(l, v, w)) case "failed") or
- (degree(p := univariate(u::P, v)) ^= 1) => return "failed"
+ (degree(p := univariate(u::P, v)) ~= 1) => return "failed"
(bc := extendedEuclidean(univariate leadingCoefficient p, pw,1))
case "failed" => error "Should not happen"
ll := concat(map(#1,
diff --git a/src/algebra/prtition.spad.pamphlet b/src/algebra/prtition.spad.pamphlet
index 6b3cd538..0148ff2d 100644
--- a/src/algebra/prtition.spad.pamphlet
+++ b/src/algebra/prtition.spad.pamphlet
@@ -166,7 +166,7 @@ SymmetricPolynomial(R:Ring) == PolynomialRing(R,Partition) add
zero?(p1.first.k) => p1.first.c * p2
-- one? p2 => p1
(p2 = 1) => p1
- +/[[[t1.k+t2.k,r]$Term for t2 in p2 | (r:=t1.c*t2.c) ^= 0]
+ +/[[[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:
-- reduces both time and space [Abbott/Bradford/Davenport]
diff --git a/src/algebra/pscat.spad.pamphlet b/src/algebra/pscat.spad.pamphlet
index 0c94186a..58d549c6 100644
--- a/src/algebra/pscat.spad.pamphlet
+++ b/src/algebra/pscat.spad.pamphlet
@@ -299,13 +299,13 @@ UnivariateTaylorSeriesCategory(Coef): Category == Definition where
n : NNI ; count : NNI := _$streamCount$Lisp
l : L OUT := empty()
for n in 0..count while not empty? uu repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput(n :: I,frst uu,vv),l)
uu := rst uu
if showAll?() then
for n in (count + 1).. while explicitEntries? uu and _
not eq?(uu,rst uu) repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput(n :: I,frst uu,vv),l)
uu := rst uu
l :=
diff --git a/src/algebra/pseudolin.spad.pamphlet b/src/algebra/pseudolin.spad.pamphlet
index 3eb384b4..fb6d38a5 100644
--- a/src/algebra/pseudolin.spad.pamphlet
+++ b/src/algebra/pseudolin.spad.pamphlet
@@ -96,19 +96,19 @@ PseudoLinearNormalForm(K:Field): Exports == Implementation where
while j <= N and M(i, j) = 0 repeat j := j + 1
if j <= N then
-- expand companionblock by lemma 5
- if j ^= i+1 then
+ if j ~= i+1 then
-- perform first a permutation
E := permutationMatrix(N, i+1, j)
M := changeBase(M, E, sig, der)
B := B*E
Binv := E*Binv
- -- now is M(i, i+1) ^= 0
+ -- now is M(i, i+1) ~= 0
E := mulMatrix(N, i+1, siginv inv M(i,i+1))
M := changeBase(M, E, sig, der)
B := B*E
Binv := inv(E)*Binv
for j in 1..N repeat
- if j ^= i+1 then
+ if j ~= i+1 then
E := addMatrix(N, i+1, j, siginv(-M(i,j)))
M := changeBase(M, E, sig, der)
B := B*E
diff --git a/src/algebra/puiseux.spad.pamphlet b/src/algebra/puiseux.spad.pamphlet
index 3d1f8162..8b4bb665 100644
--- a/src/algebra/puiseux.spad.pamphlet
+++ b/src/algebra/puiseux.spad.pamphlet
@@ -546,13 +546,13 @@ UnivariatePuiseuxSeries(Coef,var,cen): Exports == Implementation where
empty? uu => 0 :: OUT
n : NNI; count : NNI := _$streamCount$Lisp
for n in 0..count while not empty? uu repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput((n :: I) * rat + m,frst uu,xxx),l)
uu := rst uu
if showAll?() then
for n in (count + 1).. while explicitEntries? uu and _
not eq?(uu,rst uu) repeat
- if frst(uu) ^= 0 then
+ if frst(uu) ~= 0 then
l := concat(termOutput((n :: I) * rat + m,frst uu,xxx),l)
uu := rst uu
l :=
diff --git a/src/algebra/qalgset.spad.pamphlet b/src/algebra/qalgset.spad.pamphlet
index 7f5a0371..e6dfe5aa 100644
--- a/src/algebra/qalgset.spad.pamphlet
+++ b/src/algebra/qalgset.spad.pamphlet
@@ -75,7 +75,7 @@ QuasiAlgebraicSet(R, Var,Expon,Dpoly) : C == T
quasiAlgebraicSet: (List Dpoly, Dpoly) -> $
++ quasiAlgebraicSet(pl,q) returns the quasi-algebraic set
++ with defining equations p = 0 for p belonging to the list pl, and
- ++ defining inequation q ^= 0.
+ ++ defining inequation q ~= 0.
status: $ -> Status
++ status(s) returns true if the quasi-algebraic set is empty,
++ false if it is not, and "failed" if not yet known
@@ -151,7 +151,7 @@ QuasiAlgebraicSet(R, Var,Expon,Dpoly) : C == T
q=0$newPoly => 0$Dpoly
dq:newExpon:=degree q
n:NNI:=selectfirst (dq)
- n^=0 => "failed"
+ n~=0 => "failed"
((g:=oldpoly reductum q) case "failed") => "failed"
monomial(leadingCoefficient q,selectsecond dq)$Dpoly + (g::Dpoly)
diff --git a/src/algebra/radix.spad.pamphlet b/src/algebra/radix.spad.pamphlet
index d26f7b52..02fd8169 100644
--- a/src/algebra/radix.spad.pamphlet
+++ b/src/algebra/radix.spad.pamphlet
@@ -193,7 +193,7 @@ RadixExpansion(bb): Exports == Implementation where
radixInt(n,bas) ==
rits: List I := nil()
- while abs n ^= 0 repeat
+ while abs n ~= 0 repeat
qr := divide(n,bas)
n := qr.quotient
rits := concat(qr.remainder,rits)
@@ -226,7 +226,7 @@ RadixExpansion(bb): Exports == Implementation where
ritsi := rits
ritsn := rits; for i in 1..n repeat ritsn := rest ritsn
i := 0
- while first(ritsi) ^= first(ritsn) repeat
+ while first(ritsi) ~= first(ritsn) repeat
ritsi := rest ritsi
ritsn := rest ritsn
i := i + 1
diff --git a/src/algebra/rdeef.spad.pamphlet b/src/algebra/rdeef.spad.pamphlet
index 662c1f27..812a7e44 100644
--- a/src/algebra/rdeef.spad.pamphlet
+++ b/src/algebra/rdeef.spad.pamphlet
@@ -74,7 +74,7 @@ IntegrationTools(R:OrderedSet, F:FunctionSpace R): Exp == Impl where
-- true if x should be considered before y in the tower
better?(x, y) ==
- height(y) ^= height(x) => height(y) < height(x)
+ height(y) ~= height(x) => height(y) < height(x)
has?(operator y, ALGOP) or
(is?(y, "exp"::SE) and not is?(x, "exp"::SE)
and not has?(operator x, ALGOP))
@@ -136,7 +136,7 @@ IntegrationTools(R:OrderedSet, F:FunctionSpace R): Exp == Impl where
if u case ANS then
rc := u::ANS
ans := ans + rc.special
- if rc.integrand ^= 0 then
+ if rc.integrand ~= 0 then
ir0 := intPatternMatch(rc.integrand, x, int, pmint)
ans := ans + ratpart ir0
lg := concat(logpart ir0, lg)
@@ -435,7 +435,7 @@ ElementaryRischDE(R, F): Exports == Implementation where
dc - db
boundAt0(twr, f0, nb, nc, x, t, limitedint) ==
- nb ^= 0 => min(0, nc - min(0, nb))
+ nb ~= 0 => min(0, nc - min(0, nb))
l1 := logdiff(twr, l0 := tower f0)
(if0 := limitedint(f0, [first argument u for u in l1]))
case "failed" => error "Risch's theorem violated"
diff --git a/src/algebra/rderf.spad.pamphlet b/src/algebra/rderf.spad.pamphlet
index 33dcd1dd..f8d8d0b3 100644
--- a/src/algebra/rderf.spad.pamphlet
+++ b/src/algebra/rderf.spad.pamphlet
@@ -117,7 +117,7 @@ TranscendentalRischDE(F, UP): Exports == Implementation where
q:UP := 0
db := (degree bb)::Z
lb := leadingCoefficient bb
- while cc ^= 0 repeat
+ while cc ~= 0 repeat
d < 0 or (n := (degree cc)::Z - db) < 0 or n > d => return [q, true]
r := monomial((leadingCoefficient cc) / lb, n::N)
cc := cc - bb * r - derivation r
@@ -130,7 +130,7 @@ TranscendentalRischDE(F, UP): Exports == Implementation where
-- dtm1 = degree(Dt) - 1
SPDEnocancel2(bb, cc, d, dtm1, lt, derivation) ==
q:UP := 0
- while cc ^= 0 repeat
+ while cc ~= 0 repeat
d < 0 or (n := (degree cc)::Z - dtm1) < 0 or n > d => return [[q, true]]
if n > 0 then
r := monomial((leadingCoefficient cc) / (n * lt), n::N)
@@ -139,7 +139,7 @@ TranscendentalRischDE(F, UP): Exports == Implementation where
q := q + r
else -- n = 0 so solution must have degree 0
db:N := (zero? bb => 0; degree bb);
- db ^= degree(cc) => return [[q, true]]
+ db ~= degree(cc) => return [[q, true]]
zero? db => return [[bb, cc, 0, 1, q]]
r := leadingCoefficient(cc) / leadingCoefficient(bb)
cc := cc - r * bb - derivation(r::UP)
@@ -162,7 +162,7 @@ TranscendentalRischDE(F, UP): Exports == Implementation where
v := polyRDE(u.a, bb, cc, n, differentiate).ans
[v.ans / u.t, v.nosol]
--- return an a bound on the degree of a solution of A P'+ B P = C,A ^= 0
+-- return an a bound on the degree of a solution of A P'+ B P = C,A ~= 0
-- cancellation at infinity is possible
-- base case: F' = 0
getBound(a, b, dc) ==
diff --git a/src/algebra/realzero.spad.pamphlet b/src/algebra/realzero.spad.pamphlet
index 27374130..e6c16ca1 100644
--- a/src/algebra/realzero.spad.pamphlet
+++ b/src/algebra/realzero.spad.pamphlet
@@ -122,7 +122,7 @@ RealZeroPackage(Pol): T == C where
append(append(J, L), K)
PosZero(F : Pol) == --F is square free, primitive
- --and F(0) ^= 0; returns isoList for positive
+ --and F(0) ~= 0; returns isoList for positive
--roots of F
b : Integer := rootBound(F)
@@ -184,7 +184,7 @@ RealZeroPackage(Pol): T == C where
d := degree(F)
cc : Integer := 1
G : Pol := monomial(leadingCoefficient F,d)
- while (F:=reductum(F)) ^= 0 repeat
+ while (F:=reductum(F)) ~= 0 repeat
n := degree(F)
cc := cc*(c**(d-n):NonNegativeInteger)
G := G + monomial(cc * leadingCoefficient(F), n)
@@ -195,7 +195,7 @@ RealZeroPackage(Pol): T == C where
-- --computes Pol G such that G(x) = F(x+1)
-- G : Pol := F
-- n : Integer := 1
--- while (F := differentiate(F)) ^= 0 repeat
+-- while (F := differentiate(F)) ~= 0 repeat
-- if not ((tempF := F exquo n) case "failed") then F := tempF
-- G := G + F
-- n := n + 1
diff --git a/src/algebra/reclos.spad.pamphlet b/src/algebra/reclos.spad.pamphlet
index b0400ad1..82687d55 100644
--- a/src/algebra/reclos.spad.pamphlet
+++ b/src/algebra/reclos.spad.pamphlet
@@ -115,7 +115,7 @@ RealPolynomialUtilitiesPackage(TheField,ThePols) : PUB == PRIV where
sylvesterSequence(p1,p2) ==
res : List(ThePols) := [p1]
- while (p2 ^= 0) repeat
+ while (p2 ~= 0) repeat
res := cons(p2 , res)
(p1 , p2) := (p2 , -(p1 rem p2))
if degree(p1) > 0
@@ -138,7 +138,7 @@ RealPolynomialUtilitiesPackage(TheField,ThePols) : PUB == PRIV where
-- lsg := sign(first(l))
-- for term in l repeat
-- if ^( (sg := sign(term) ) = 0 ) then
--- if (sg ^= lsg) then res := res + 1
+-- if (sg ~= lsg) then res := res + 1
-- lsg := sg
-- res
@@ -261,7 +261,7 @@ RealRootCharacterizationCategory(TheField, ThePols ) : Category == PUB where
defPol := definingPolynomial(rootChar)
d := principalIdeal([defPol,toInv])
zero?(d.generator,rootChar) => "failed"
- if (degree(d.generator) ^= 0 )
+ if (degree(d.generator) ~= 0 )
then
defPol := (defPol exquo (d.generator))::ThePols
d := principalIdeal([defPol,toInv])
@@ -890,7 +890,7 @@ RightOpenIntervalRootCharacterization(TheField,ThePolDom) : PUB == PRIV where
-- lsg := sign(coefficient(p,0))
-- l := [ sign(i) for i in reverse!(coefficients(p))]
-- for sg in l repeat
--- if (sg ^= lsg) then res := res + 1
+-- if (sg ~= lsg) then res := res + 1
-- lsg := sg
-- res
@
diff --git a/src/algebra/rep1.spad.pamphlet b/src/algebra/rep1.spad.pamphlet
index b65c7675..47e3638e 100644
--- a/src/algebra/rep1.spad.pamphlet
+++ b/src/algebra/rep1.spad.pamphlet
@@ -233,7 +233,7 @@ RepresentationPackage1(R): public == private where
symmetricTensors (a : M R, n : PI) ==
m : NNI := nrows a
- m ^= ncols a =>
+ m ~= ncols a =>
error("Input to symmetricTensors is no square matrix")
n = 1 => a
@@ -253,7 +253,7 @@ RepresentationPackage1(R): public == private where
beta := unrankImproperPartitions1(n,m,j-1)$SGCF
g := invContent(beta)
colemanMatrix := nextColeman(alpha,beta,nullMatrix)$SGCF
- while colemanMatrix ^= nullMatrix repeat
+ while colemanMatrix ~= nullMatrix repeat
gamma := inverseColeman(alpha,beta,colemanMatrix)$SGCF
help : R := calcCoef(beta,colemanMatrix)::R
for k in 1..n repeat
diff --git a/src/algebra/rep2.spad.pamphlet b/src/algebra/rep2.spad.pamphlet
index 64fec1fc..01c39568 100644
--- a/src/algebra/rep2.spad.pamphlet
+++ b/src/algebra/rep2.spad.pamphlet
@@ -326,7 +326,7 @@ RepresentationPackage2(R): public == private where
-- will the rank change if we add this nextVector
-- to the basis so far computed?
addedToBasis : M R := vertConcat(basis, nextVector)
- if rank addedToBasis ^= nrows basis then
+ if rank addedToBasis ~= nrows basis then
basis := rowEchelon addedToBasis -- add vector w to basis
updateFurtherElts : L V R := _
[(lm.i*w)::V R for i in 1..maxIndex lm]
@@ -355,7 +355,7 @@ RepresentationPackage2(R): public == private where
-- will the rank change if we add this nextVector
-- to the basis so far computed?
addedToBasis : M R := vertConcat(basis, nextVector)
- if rank addedToBasis ^= nrows basis then
+ if rank addedToBasis ~= nrows basis then
standardBasis := cons(entries w, standardBasis)
basis := rowEchelon addedToBasis -- add vector w to basis
updateFurtherElts : L V R := _
@@ -381,7 +381,7 @@ RepresentationPackage2(R): public == private where
rankOfSubmodule : I := # submodule -- R-Rank of submodule
submoduleRepresentation : L M R := nil()
factormoduleRepresentation : L M R := nil()
- if n ^= rankOfSubmodule then
+ if n ~= rankOfSubmodule then
messagePrint " A proper cyclic submodule is found."
if doSplitting? then -- no else !!
submoduleIndices : L I := [i for i in 1..rankOfSubmodule]
@@ -502,12 +502,12 @@ RepresentationPackage2(R): public == private where
-- test singularity of x0 and x1
rk0 : NNI := rank x0
rk1 : NNI := rank x1
- rk0 ^= rk1 =>
+ rk0 ~= rk1 =>
messagePrint "Dimensions of kernels differ"
foundResult := true
result := false
-- can assume dimensions are equal
- rk0 ^= n - 1 =>
+ rk0 ~= n - 1 =>
-- not of any use here if kernel not one-dimensional
if randomelements then
messagePrint "Random element in generated algebra does"
@@ -528,7 +528,7 @@ RepresentationPackage2(R): public == private where
aG0,kernel0.1)
baseChange1 : M R := standardBasisOfCyclicSubmodule(_
aG1,kernel1.1)
- (ncols baseChange0) ^= (ncols baseChange1) =>
+ (ncols baseChange0) ~= (ncols baseChange1) =>
messagePrint " Dimensions of generated cyclic submodules differ"
foundResult := true
result := false
@@ -539,7 +539,7 @@ RepresentationPackage2(R): public == private where
foundResult := true
result := true
for j in 1..numberOfGenerators while result repeat
- if (aG0.j*transitionM) ^= (transitionM*aG1.j) then
+ if (aG0.j*transitionM) ~= (transitionM*aG1.j) then
result := false
transitionM := zero(1 ,1)
messagePrint " There is no isomorphism, as the only possible one"
@@ -594,7 +594,7 @@ RepresentationPackage2(R): public == private where
messagePrint " one-dimensional kernel"
kernel : L V R := nullSpace x
if n=#cyclicSubmodule(aG, first kernel) then
- result := (irreducibilityTestInternal(aG,x,false)).1 ^= nil()$(L M R)
+ result := (irreducibilityTestInternal(aG,x,false)).1 ~= nil()$(L M R)
-- result := not null? first irreducibilityTestInternal(aG,x,false) -- this down't compile !!
else -- we found a proper submodule
result := false
@@ -690,7 +690,7 @@ RepresentationPackage2(R): public == private where
algebraGenerators.2 , x)
-- test singularity of x
n : NNI := #row(x, 1) -- degree of representation
- if (rank x) ^= n then -- x singular
+ if (rank x) ~= n then -- x singular
if randomelements then
messagePrint "Random element in generated algebra is singular"
else
diff --git a/src/algebra/rf.spad.pamphlet b/src/algebra/rf.spad.pamphlet
index 26220e4c..c8e40f71 100644
--- a/src/algebra/rf.spad.pamphlet
+++ b/src/algebra/rf.spad.pamphlet
@@ -91,8 +91,8 @@ PolynomialCategoryQuotientFunctions(E, V, R, P, F):
mymerge(variables numer f, variables denom f)
isPower f ==
- (den := denom f) ^= 1 =>
- numer f ^= 1 => "failed"
+ (den := denom f) ~= 1 =>
+ numer f ~= 1 => "failed"
(ur := isExpt den) case "failed" => [den::F, -1]
r := ur::Record(var:V, exponent:NonNegativeInteger)
[r.var::P::F, - (r.exponent::Integer)]
@@ -127,7 +127,7 @@ PolynomialCategoryQuotientFunctions(E, V, R, P, F):
concat_!(l::List(F), d)
isPlus f ==
- denom f ^= 1 => "failed"
+ denom f ~= 1 => "failed"
(s := isPlus numer f) case "failed" => "failed"
[x::F for x in s]
diff --git a/src/algebra/riccati.spad.pamphlet b/src/algebra/riccati.spad.pamphlet
index 30485093..877d0403 100644
--- a/src/algebra/riccati.spad.pamphlet
+++ b/src/algebra/riccati.spad.pamphlet
@@ -128,7 +128,7 @@ PrimitiveRatRicDE(F, UP, L, LQ): Exports == Implementation where
lc := leadingDenomRicDE(c, op)
if finite? then lc := select_!(#1.deg <= b, lc)
for rec in lc repeat
- for r in zeros(c, rec.eq) | r ^= 0 repeat
+ for r in zeros(c, rec.eq) | r ~= 0 repeat
rcn := r /$RF (c ** rec.deg)
neweq := changeVar(op, rcn)
sols := padicsol(c, neweq, (rec.deg-1)::N, true, zeros)
@@ -163,7 +163,7 @@ PrimitiveRatRicDE(F, UP, L, LQ): Exports == Implementation where
constantCoefficientOperator(op, m) ==
ans:UP := 0
- while op ^= 0 repeat
+ while op ~= 0 repeat
if degree(p := leadingCoefficient op) = m then
ans := ans + monomial(leadingCoefficient p, degree op)
op := reductum op
@@ -179,7 +179,7 @@ PrimitiveRatRicDE(F, UP, L, LQ): Exports == Implementation where
i := first(rec.ij)
m := i * (d := rec.deg) + nu coefficient(l, i::N)
ans:List(Z) := empty()
- for j in 0..n | (f := coefficient(l, j)) ^= 0 repeat
+ for j in 0..n | (f := coefficient(l, j)) ~= 0 repeat
if ((k := (j * d + nu f)) > m) then return empty()
else if (k = m) then ans := concat(j, ans)
ans
@@ -226,8 +226,8 @@ PrimitiveRatRicDE(F, UP, L, LQ): Exports == Implementation where
innerlb(l, nu) ==
lb:List(IJ) := empty()
n := degree l
- for i in 0..n | (li := coefficient(l, i)) ^= 0repeat
- for j in i+1..n | (lj := coefficient(l, j)) ^= 0 repeat
+ for i in 0..n | (li := coefficient(l, i)) ~= 0repeat
+ for j in i+1..n | (lj := coefficient(l, j)) ~= 0 repeat
u := (nu li - nu lj) exquo (i-j)
if (u case Z) and ((b := u::Z) > 0) then
lb := concat([[i, j], b::N], lb)
@@ -257,7 +257,7 @@ PrimitiveRatRicDE(F, UP, L, LQ): Exports == Implementation where
lc := leadingCoefficientRicDE l
if finite? then lc := select_!(#1.deg <= b, lc)
for rec in lc repeat
- for a in zeros(rec.eq) | a ^= 0 repeat
+ for a in zeros(rec.eq) | a ~= 0 repeat
atn:UP := monomial(a, rec.deg)
neweq := changeVar(l, atn)
sols := polysol(neweq, (rec.deg - 1)::N, true, zeros)
@@ -430,8 +430,8 @@ RationalRicDE(F, UP): Exports == Implementation where
ans:List(POL) := [[0, l]]
empty?(lc := leadingCoefficientRicDE l) => ans
rec := first lc -- one with highest degree
- for a in zeros(rec.eq) | a ^= 0 repeat
- if (p := newtonSolution(l, a, rec.deg, zeros)) ^= 0 then
+ for a in zeros(rec.eq) | a ~= 0 repeat
+ if (p := newtonSolution(l, a, rec.deg, zeros)) ~= 0 then
ans := concat([p, changeVar(l, p)], ans)
ans
@@ -439,7 +439,7 @@ RationalRicDE(F, UP): Exports == Implementation where
reverseUP p ==
ans:UTS := 0
n := degree(p)::Z
- while p ^= 0 repeat
+ while p ~= 0 repeat
ans := ans + monomial(leadingCoefficient p, (n - degree p)::N)
p := reductum p
ans
@@ -454,11 +454,11 @@ RationalRicDE(F, UP): Exports == Implementation where
m:Z := 0
aeq:UPS := 0
op := l
- while op ^= 0 repeat
+ while op ~= 0 repeat
mu := degree(op) * n + degree leadingCoefficient op
op := reductum op
if mu > m then m := mu
- while l ^= 0 repeat
+ while l ~= 0 repeat
c := leadingCoefficient l
d := degree l
s:UTS := monomial(1, (m - d * n - degree c)::N)$UTS * reverseUP c
diff --git a/src/algebra/rinterp.spad.pamphlet b/src/algebra/rinterp.spad.pamphlet
index 41fa6c59..a945c303 100644
--- a/src/algebra/rinterp.spad.pamphlet
+++ b/src/algebra/rinterp.spad.pamphlet
@@ -56,9 +56,9 @@ the denominator.
In fact, we could also leave -- for example -- $k$ unspecified and determine it
as $k=[[#xlist]]-m-1$: I don't know whether this would be better.
<<RINTERP Implementation>>=
- #xlist ^= #ylist =>
+ #xlist ~= #ylist =>
error "Different number of points and values."
- #xlist ^= m+k+1 =>
+ #xlist ~= m+k+1 =>
error "wrong number of points"
@
diff --git a/src/algebra/rule.spad.pamphlet b/src/algebra/rule.spad.pamphlet
index ce3011bc..98e0ee8d 100644
--- a/src/algebra/rule.spad.pamphlet
+++ b/src/algebra/rule.spad.pamphlet
@@ -113,7 +113,7 @@ RewriteRule(Base, R, F): Exports == Implementation where
-- appear?(x, [p1,...,pn]) is true if x appears as a variable in
-- a composite pattern pi.
appear?(x, l) ==
- for p in l | p ^= x repeat
+ for p in l | p ~= x repeat
member?(x, variables p) => return true
false
diff --git a/src/algebra/setorder.spad.pamphlet b/src/algebra/setorder.spad.pamphlet
index 198d8d85..1e62721b 100644
--- a/src/algebra/setorder.spad.pamphlet
+++ b/src/algebra/setorder.spad.pamphlet
@@ -83,7 +83,7 @@ UserDefinedPartialOrdering(S:SetCategory): with
less?(a, b) ==
for x in deref llow repeat
- x = a => return(a ^= b)
+ x = a => return(a ~= b)
x = b => return false
aa := bb := false$Boolean
for x in deref lhigh repeat
@@ -91,7 +91,7 @@ UserDefinedPartialOrdering(S:SetCategory): with
bb => return false
aa := true
if x = b then
- aa => return(a ^= b)
+ aa => return(a ~= b)
bb := true
aa => false
bb => true
diff --git a/src/algebra/sgcf.spad.pamphlet b/src/algebra/sgcf.spad.pamphlet
index b2740766..c871cb18 100644
--- a/src/algebra/sgcf.spad.pamphlet
+++ b/src/algebra/sgcf.spad.pamphlet
@@ -234,7 +234,7 @@ SymmetricGroupCombinatoricFunctions(): public == private where
k < 0 => nonZeros
k >= numberOfImproperPartitions(n,m) => nonZeros
cm : I := m --cm gives the depth of the tree
- while n ^= 0 repeat
+ while n ~= 0 repeat
s : I := 0
cm := cm - 1
for y in n..1 by -1 repeat --determination of the next son
@@ -374,7 +374,7 @@ SymmetricGroupCombinatoricFunctions(): public == private where
vrest : V I := new(ncol,0)
cnull : M I := new(1,1,0)
coleman := copy C
- if coleman ^= cnull then
+ if coleman ~= cnull then
-- look for the first row of "coleman" that has a succeeding
-- partition, this can be atmost row nrow-1
i : NNI := (nrow-1)::NNI
@@ -416,7 +416,7 @@ SymmetricGroupCombinatoricFunctions(): public == private where
nextPartition(gamma:L I,part:V I,number:I) ==
n : NNI := #gamma
vnull : V I := vector(nil()$(L I)) -- empty vector
- if part ^= vnull then
+ if part ~= vnull then
i : NNI := 2
sum := part(1)
while (part(i) = gamma(i)) or (sum = 0) repeat
diff --git a/src/algebra/sign.spad.pamphlet b/src/algebra/sign.spad.pamphlet
index a9c3a5c3..627b6c36 100644
--- a/src/algebra/sign.spad.pamphlet
+++ b/src/algebra/sign.spad.pamphlet
@@ -186,7 +186,7 @@ RationalFunctionSign(R:GcdDomain): Exports == Implementation where
listSign(l, s) ==
for term in l repeat
(u := termSign term) case "failed" => return "failed"
- u::Integer ^= s => return "failed"
+ u::Integer ~= s => return "failed"
s
termSign term ==
diff --git a/src/algebra/smith.spad.pamphlet b/src/algebra/smith.spad.pamphlet
index 8c89d9ef..dd3ff8ca 100644
--- a/src/algebra/smith.spad.pamphlet
+++ b/src/algebra/smith.spad.pamphlet
@@ -99,7 +99,7 @@ SmithNormalForm(R,Row,Col,M) : Exports == Implementation where
m1:= nrows m
n1:= ncols m
for i in 1..m1 repeat
- for j in 1..n1 | (j ^= i) repeat
+ for j in 1..n1 | (j ~= i) repeat
if not zero?(m(i,j)) then return false
true
@@ -111,14 +111,14 @@ SmithNormalForm(R,Row,Col,M) : Exports == Implementation where
m
-- elementary operation of second kind: add to row i--
- -- a*row j (i^=j) --
+ -- a*row j (i~=j) --
elRow2(m : M,a:R,i:I,j:I) : M ==
vec:= map(a*#1,row(m,j))
vec:=map("+",row(m,i),vec)
setRow!(m,i,vec)
m
-- elementary operation of second kind: add to column i --
- -- a*column j (i^=j) --
+ -- a*column j (i~=j) --
elColumn2(m : M,a:R,i:I,j:I) : M ==
vec:= map(a*#1,column(m,j))
vec:=map("+",column(m,i),vec)
@@ -157,7 +157,7 @@ SmithNormalForm(R,Row,Col,M) : Exports == Implementation where
lastStep(sf : SmithForm) : SmithForm ==
m:=sf.Smith
m1:=min(nrows m,ncols m)
- for i in 1..m1 while (mii:=m(i,i)) ^=0 repeat
+ for i in 1..m1 while (mii:=m(i,i)) ~=0 repeat
for j in i+1..m1 repeat
if (m(j,j) exquo mii) case "failed" then return
lastStep(ijDivide(sf,i,j))
diff --git a/src/algebra/solvefor.spad.pamphlet b/src/algebra/solvefor.spad.pamphlet
index 7095d4e1..faf51c7d 100644
--- a/src/algebra/solvefor.spad.pamphlet
+++ b/src/algebra/solvefor.spad.pamphlet
@@ -131,7 +131,7 @@ PolynomialSolveByFormulas(UP, F): PSFcat == PSFdef where
error concat("Polynomial must be of degree ", n::String)
needLcoef(cn: F): Boolean ==
- cn ^= 0 => true
+ cn ~= 0 => true
error "Leading coefficient must not be 0."
needChar0(): Boolean ==
@@ -253,7 +253,7 @@ PolynomialSolveByFormulas(UP, F): PSFcat == PSFdef where
-- t0 := the cubic resolvent of x**3-p*x**2-4*r*x+4*p*r-q**2
-- The roots of the translated polynomial are those of
-- two quadratics. (What about rt=0 ?)
- -- rt=0 can be avoided by picking a root ^= p of the cubic
+ -- rt=0 can be avoided by picking a root ~= p of the cubic
-- polynomial above. This is always possible provided that
-- the input is squarefree. In this case the two other roots
-- are +(-) 2*r**(1/2).
diff --git a/src/algebra/solvelin.spad.pamphlet b/src/algebra/solvelin.spad.pamphlet
index 9c35d201..4700ce1a 100644
--- a/src/algebra/solvelin.spad.pamphlet
+++ b/src/algebra/solvelin.spad.pamphlet
@@ -213,7 +213,7 @@ LinearSystemPolynomialPackage(R, E, OV, P): Cat == Capsule where
poly2vect(p : P, vs : List OV) : Record(coefvec: V F, reductum: F) ==
coefs := new(#vs, 0)$(V F)
- for v in vs for i in 1.. while p ^= 0 repeat
+ for v in vs for i in 1.. while p ~= 0 repeat
u := univariate(p, v)
degree u = 0 => "next v"
coefs.i := (c := leadingCoefficient u)::F
diff --git a/src/algebra/solverad.spad.pamphlet b/src/algebra/solverad.spad.pamphlet
index 59e92725..ee9e0b68 100644
--- a/src/algebra/solverad.spad.pamphlet
+++ b/src/algebra/solverad.spad.pamphlet
@@ -165,7 +165,7 @@ RadicalSolvePackage(R): Cat == Capsule where
lv1:L Kernel(RE):=[kernel rlv.first]
rlv1:=rlv.rest
p1:=par.rest
- while p1^=[] repeat
+ while p1~=[] repeat
res1:=cons(eval(p1.first,lv1,res1),res1)
p1:=p1.rest
lv1:=cons(kernel rlv1.first,lv1)
@@ -199,7 +199,7 @@ RadicalSolvePackage(R): Cat == Capsule where
rpRes:=[reverse res for res in parRes]
listGen:= [res for res in rpRes|isGeneric?(res,rlv)]
result:L L RE:=[]
- if listGen^=[] then
+ if listGen~=[] then
result:="append"/[findGenZeros(res,rlv) for res in listGen]
for res in listGen repeat
rpRes:=delete(rpRes,position(res,rpRes))
diff --git a/src/algebra/space.spad.pamphlet b/src/algebra/space.spad.pamphlet
index 1f1235d2..3d269880 100644
--- a/src/algebra/space.spad.pamphlet
+++ b/src/algebra/space.spad.pamphlet
@@ -616,7 +616,7 @@ ThreeSpace(R:Ring):Exports == Implementation where
numCurves := numCurves + 1
(#kid = 2) and _
(#children first kid = 1) and _
- (#children first rest kid ^= 1) =>
+ (#children first rest kid ~= 1) =>
numPolys := numPolys + 1
numConstructs := numConstructs + 1
-- otherwise, a mathematical surface is assumed
diff --git a/src/algebra/special.spad.pamphlet b/src/algebra/special.spad.pamphlet
index 1765eebd..bb41d3df 100644
--- a/src/algebra/special.spad.pamphlet
+++ b/src/algebra/special.spad.pamphlet
@@ -381,7 +381,7 @@ NumberTheoreticPolynomialFunctions(R: CommutativeRing): Exports == Impl where
cyclotomic(k, x) ==
p: SUP(I) := cyclotomic(k)
r: R := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
d := degree p
c := leadingCoefficient p
p := reductum p
@@ -392,7 +392,7 @@ NumberTheoreticPolynomialFunctions(R: CommutativeRing): Exports == Impl where
eulerE(k, x) ==
p: SUP(RN) := euler(k)
r: R := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
d := degree p
c := leadingCoefficient p
p := reductum p
@@ -401,7 +401,7 @@ NumberTheoreticPolynomialFunctions(R: CommutativeRing): Exports == Impl where
bernoulliB(k, x) ==
p: SUP(RN) := bernoulli(k)
r: R := 0
- while p ^= 0 repeat
+ while p ~= 0 repeat
d := degree p
c := leadingCoefficient p
p := reductum p
diff --git a/src/algebra/stream.spad.pamphlet b/src/algebra/stream.spad.pamphlet
index 4edd8509..8bd55a61 100644
--- a/src/algebra/stream.spad.pamphlet
+++ b/src/algebra/stream.spad.pamphlet
@@ -1031,7 +1031,7 @@ Stream(S): Exports == Implementation where
not empty? x and frst x = first l and x = rst x
x0 := x
for s in l repeat
- empty? x or s ^= frst x => return false
+ empty? x or s ~= frst x => return false
x := rst x
eq?(x,x0)
diff --git a/src/algebra/string.spad.pamphlet b/src/algebra/string.spad.pamphlet
index d881d0a6..09adfaf7 100644
--- a/src/algebra/string.spad.pamphlet
+++ b/src/algebra/string.spad.pamphlet
@@ -599,17 +599,17 @@ the coercion.
n := maxIndex pattern
p := position(dontcare, pattern, m := minIndex pattern)::N
p = m-1 => pattern = target
- (p ^= m) and not prefix?(pattern(m..p-1), target) => false
+ (p ~= m) and not prefix?(pattern(m..p-1), target) => false
i := p -- index into target
q := position(dontcare, pattern, p + 1)::N
- while q ^= m-1 repeat
+ while q ~= m-1 repeat
s := pattern(p+1..q-1)
i := position(s, target, i)::N
i = m-1 => return false
i := i + #s
p := q
q := position(dontcare, pattern, q + 1)::N
- (p ^= n) and not suffix?(pattern(p+1..n), target) => false
+ (p ~= n) and not suffix?(pattern(p+1..n), target) => false
true
@
diff --git a/src/algebra/sttaylor.spad.pamphlet b/src/algebra/sttaylor.spad.pamphlet
index 27a16ec0..a16e32ce 100644
--- a/src/algebra/sttaylor.spad.pamphlet
+++ b/src/algebra/sttaylor.spad.pamphlet
@@ -465,7 +465,7 @@ StreamTaylorSeriesOperations(A): Exports == Implementation where
powerre: (A,ST A,ST A) -> ST A
powerre(s,x,c) == delay
empty? x => zro()
- frst x^=1 => error "**:constant coefficient should be 1"
+ frst x~=1 => error "**:constant coefficient should be 1"
concat(frst x,finteg((s+1)*(c*deriv x))-rst x * c)
power(s,x) == YS(powerre(s,x,#1))
diff --git a/src/algebra/sum.spad.pamphlet b/src/algebra/sum.spad.pamphlet
index e6b315bc..e866dc11 100644
--- a/src/algebra/sum.spad.pamphlet
+++ b/src/algebra/sum.spad.pamphlet
@@ -55,7 +55,7 @@ InnerPolySum(E, V, R, P): Exports == Impl where
up := univariate(p, v)
lp := nil()$List(SUP P)
ld := nil()$List(Z)
- while up ^= 0 repeat
+ while up ~= 0 repeat
ud := degree up; uc := leadingCoefficient up
up := reductum up
rec := pmul(uc, 1 / (ud+1) * bernoulli(ud+1))
@@ -186,12 +186,12 @@ GosperSummationMethod(E, V, R, P, Q): Exports == Impl where
dz := degree zron
mat: Matrix RQ := zero(dz+1, (k+1)::NonNegativeInteger)
vec: Vector RQ := new(dz+1, 0)
- while zron ^= 0 repeat
+ while zron ~= 0 repeat
cz := leadingCoefficient zron
dz := degree zron
zron := reductum zron
mz := univariate(cz, mv)
- while mz ^= 0 repeat
+ while mz ~= 0 repeat
cmz := leadingCoefficient(mz)::RQ
dmz := degree mz
mz := reductum mz
@@ -259,7 +259,7 @@ GosperSummationMethod(E, V, R, P, Q): Exports == Impl where
not monomial? nom =>
error "pCoef requires a monomial 2nd arg"
vlist := variables nom
- for v in vlist while p ^= 0 repeat
+ for v in vlist while p ~= 0 repeat
unom:= univariate(nom,v)
pow:=degree unom
nom:=leadingCoefficient unom
@@ -269,13 +269,13 @@ GosperSummationMethod(E, V, R, P, Q): Exports == Impl where
linearAndNNIntRoot(mp, v) ==
p := univariate(mp, v)
- degree p ^= 1 => "failed"
+ degree p ~= 1 => "failed"
(p1 := retractIfCan(coefficient(p, 1))@Union(RN,"failed"))
case "failed" or
(p0 := retractIfCan(coefficient(p, 0))@Union(RN,"failed"))
case "failed" => "failed"
rt := -(p0::RN)/(p1::RN)
- rt < 0 or denom rt ^= 1 => "failed"
+ rt < 0 or denom rt ~= 1 => "failed"
numer rt
@
diff --git a/src/algebra/symbol.spad.pamphlet b/src/algebra/symbol.spad.pamphlet
index cde5e9ac..cb29a702 100644
--- a/src/algebra/symbol.spad.pamphlet
+++ b/src/algebra/symbol.spad.pamphlet
@@ -191,7 +191,7 @@ Symbol(): Exports == Implementation where
-- Scripts ==> Record(sub:L,sup:L,presup:L,presub:L,args:L)
latex e ==
s : String := (PNAME(name e)$Lisp) pretend String
- if #s > 1 and s.1 ^= char "\" then
+ if #s > 1 and s.1 ~= char "\" then
s := concat("\mbox{\it ", concat(s, "}")$String)$String
not scripted? e => s
ss : Scripts := scripts e
diff --git a/src/algebra/syssolp.spad.pamphlet b/src/algebra/syssolp.spad.pamphlet
index 2a7f1250..ef019257 100644
--- a/src/algebra/syssolp.spad.pamphlet
+++ b/src/algebra/syssolp.spad.pamphlet
@@ -146,13 +146,13 @@ SystemSolvePackage(R): Cat == Cap where
push:=PushVariables(R,DP,OV,dmp)
lq : L dmp
lvv:L OV:=[variable(vv)::OV for vv in lv]
- lq:=[pushup(df::dmp,lvv)$push for f in lf|(df:=denom f)^=1]
+ lq:=[pushup(df::dmp,lvv)$push for f in lf|(df:=denom f)~=1]
lp:=[pushup(numer(f)::dmp,lvv)$push for f in lf]
parRes:=groebSolve(lp,lvv)$GroebnerSolve(lv,P R,R)
- if lq^=[] then
+ if lq~=[] then
gb:=GroebnerInternalPackage(P R,DirectProduct(#lv,NNI),OV,dmp)
parRes:=[pr for pr in parRes|
- and/[(redPol(fq,pr pretend List(dmp))$gb) ^=0
+ and/[(redPol(fq,pr pretend List(dmp))$gb) ~=0
for fq in lq]]
[[retract pushdown(pf,lvv)$push for pf in pr] for pr in parRes]
@@ -199,7 +199,7 @@ SystemSolvePackage(R): Cat == Cap where
rec.particular case "failed" => "failed"
rhs := rec.particular :: V F
zeron:V F:=zero(#lv)
- for p in rec.basis | p ^= zeron repeat
+ for p in rec.basis | p ~= zeron repeat
sym := newInF(1)
for i in 1..#lv repeat
rhs.i := rhs.i + sym*p.i
diff --git a/src/algebra/taylor.spad.pamphlet b/src/algebra/taylor.spad.pamphlet
index 7fa64c04..2005597a 100644
--- a/src/algebra/taylor.spad.pamphlet
+++ b/src/algebra/taylor.spad.pamphlet
@@ -97,7 +97,7 @@ InnerTaylorSeries(Coef): Exports == Implementation where
n : I := _$streamCount$Lisp
for i in 0..n repeat
empty? st => return true
- frst st ^= 0 => return false
+ frst st ~= 0 => return false
st := rst st
empty? st
@@ -332,7 +332,7 @@ UnivariateTaylorSeries(Coef,var,cen): Exports == Implementation where
while not empty? u and n > 0 repeat
u := rst u
n := (n - 1) :: NNI
- empty? u or n ^= 0 => 0
+ empty? u or n ~= 0 => 0
frst u
elt(x:%,n:NNI) == coefficient(x,n)
diff --git a/src/algebra/tex.spad.pamphlet b/src/algebra/tex.spad.pamphlet
index 7577e3f4..adc11106 100644
--- a/src/algebra/tex.spad.pamphlet
+++ b/src/algebra/tex.spad.pamphlet
@@ -424,19 +424,19 @@ TexFormat(): public == private where
args := rest args
null args => concat(form)$S
tmp : S := formatTex(first args, minPrec)
- if (tmp ^= "") and (tmp ^= "{}") and (tmp ^= " ") then
+ if (tmp ~= "") and (tmp ~= "{}") and (tmp ~= " ") then
form := append(form,[" \sb ",group tmp])$(List S)
-- superscripts
args := rest args
null args => group concat(form)$S
tmp : S := formatTex(first args, minPrec)
- if (tmp ^= "") and (tmp ^= "{}") and (tmp ^= " ") then
+ if (tmp ~= "") and (tmp ~= "{}") and (tmp ~= " ") then
form := append(form,[" \sp ",group tmp])$(List S)
-- presuperscripts
args := rest args
null args => group concat(form)$S
tmp : S := formatTex(first args, minPrec)
- if (tmp ^= "") and (tmp ^= "{}") and (tmp ^= " ") then
+ if (tmp ~= "") and (tmp ~= "{}") and (tmp ~= " ") then
form := append([" \sp ",group tmp],form)$(List S)
prescript := true
-- presubscripts
@@ -446,7 +446,7 @@ TexFormat(): public == private where
prescript => cons("{}",form)
form
tmp : S := formatTex(first args, minPrec)
- if (tmp ^= "") and (tmp ^= "{}") and (tmp ^= " ") then
+ if (tmp ~= "") and (tmp ~= "{}") and (tmp ~= " ") then
form := append([" \sb ",group tmp],form)$(List S)
prescript := true
group concat
@@ -469,7 +469,7 @@ TexFormat(): public == private where
p < 1 => error "unknown Tex unary op"
opPrec := plexPrecs.p
n : I := #args
- (n ^= 2) and (n ^= 3) => error "wrong number of arguments for plex"
+ (n ~= 2) and (n ~= 3) => error "wrong number of arguments for plex"
s : S :=
op = "SIGMA" => "\sum"
op = "SIGMA2" => "\sum"
@@ -480,12 +480,12 @@ TexFormat(): public == private where
"????"
hold := formatTex(first args,minPrec)
args := rest args
- if op ^= "INDEFINTEGRAL" then
- if hold ^= "" then
+ if op ~= "INDEFINTEGRAL" then
+ if hold ~= "" then
s := concat [s," \sb",group concat ["\displaystyle ",hold]]
if not null rest args then
hold := formatTex(first args,minPrec)
- if hold ^= "" then
+ if hold ~= "" then
s := concat [s," \sp",group concat ["\displaystyle ",hold]]
args := rest args
s := concat [s," ",formatTex(first args,minPrec)]
diff --git a/src/algebra/transsolve.spad.pamphlet b/src/algebra/transsolve.spad.pamphlet
index 168619fa..e9071b02 100644
--- a/src/algebra/transsolve.spad.pamphlet
+++ b/src/algebra/transsolve.spad.pamphlet
@@ -347,7 +347,7 @@ TransSolvePackage(R) : Exports == Implementation where
exprtable:Table(RE,RE):=table()
(isPlus(expr)) case "failed" => expr
ans:RE:=0
- while expr ^= 0 repeat
+ while expr ~= 0 repeat
loopexpr:RE:=leadingMonomial(numer(expr))::RE
if testLog(loopexpr,Y) and (#tableXkernels(loopexpr,Y)=1) then
exprr:=buildnexpr(loopexpr,Y)
diff --git a/src/algebra/tree.spad.pamphlet b/src/algebra/tree.spad.pamphlet
index 5a82ba59..27b0d061 100644
--- a/src/algebra/tree.spad.pamphlet
+++ b/src/algebra/tree.spad.pamphlet
@@ -261,13 +261,13 @@ Tree(S: SetCategory): T==C where
cyclicEqual?(t1, t2) ==
cp1 := cyclicParents t1
cp2 := cyclicParents t2
- #cp1 ^= #cp2 or null cp1 => t1 = t2
+ #cp1 ~= #cp2 or null cp1 => t1 = t2
cyclicEqual4?(t1, t2, cp1, cp2)
cyclicEqual4?(t1, t2, cp1, cp2) ==
t1 case empty => t2 case empty
t2 case empty => false
- 0 ^= (k := eqMemberIndex(t1, cp1, 0)) => eq?(t2, cp2 . k)
+ 0 ~= (k := eqMemberIndex(t1, cp1, 0)) => eq?(t2, cp2 . k)
value t1 = value t2 and
"and"/[cyclicEqual4?(x,y,cp1,cp2)
for x in children t1 for y in children t2]
diff --git a/src/algebra/twofact.spad.pamphlet b/src/algebra/twofact.spad.pamphlet
index f3e99f53..541157b7 100644
--- a/src/algebra/twofact.spad.pamphlet
+++ b/src/algebra/twofact.spad.pamphlet
@@ -43,7 +43,7 @@ NormRetractPackage(F, ExtF, SUEx, ExtP, n):C == T where
Frobenius(ff:ExtP):ExtP ==
fft:ExtP:=0
- while ff^=0 repeat
+ while ff~=0 repeat
fft:=fft + monomial(map(Frobenius, leadingCoefficient ff),
degree ff)
ff:=reductum ff
@@ -51,10 +51,10 @@ NormRetractPackage(F, ExtF, SUEx, ExtP, n):C == T where
retractIfCan(ff:ExtP):Union(P, "failed") ==
fft:P:=0
- while ff ^= 0 repeat
+ while ff ~= 0 repeat
lc : SUEx := leadingCoefficient ff
plc: SUP F := 0
- while lc ^= 0 repeat
+ while lc ~= 0 repeat
lclc:ExtF := leadingCoefficient lc
(retlc := retractIfCan lclc) case "failed" => return "failed"
plc := plc + monomial(retlc::F, degree lc)
@@ -159,7 +159,7 @@ TwoFactorize(F) : C == T
pfaclist)
unitPart := unit(nfacs)**uexp * unitPart
pfaclist := cons(u,pfaclist)
- cont ^= 1 =>
+ cont ~= 1 =>
sqp := squareFree cont
contlist:=[[w.flg,(w.fctr)::P,w.xpnt] for w in factorList sqp]
pfaclist:= append(contlist, pfaclist)
@@ -229,7 +229,7 @@ TwoFactorize(F) : C == T
i:=i+1
zero? elt(lcm, vval) => "next value"
umv := map(elt(#1,vval), m)$UPCF2(R, P, F, R)
- degree(gcd(umv,differentiate umv))^=0 => "next val"
+ degree(gcd(umv,differentiate umv))~=0 => "next val"
n := 1
look := false
extField:=FiniteFieldExtension(F,n)
@@ -237,7 +237,7 @@ TwoFactorize(F) : C == T
TP:=SparseUnivariatePolynomial SUEx
mm:TP:=0
m1:=m
- while m1^=0 repeat
+ while m1~=0 repeat
mm:=mm+monomial(map(coerce,leadingCoefficient m1)$UPCF2(F,R,
extField,SUEx),degree m1)
m1:=reductum m1
@@ -252,7 +252,7 @@ TwoFactorize(F) : C == T
i:=i+1
elt(lcmm,val)=0 => "next value"
umex := map(elt(#1,val), mm)$UPCF2(SUEx, TP, extField, SUEx)
- degree(gcd(umex,differentiate umex))^=0 => "next val"
+ degree(gcd(umex,differentiate umex))~=0 => "next val"
look:=false
prime:SUEx:=monomial(1,1)-monomial(val,0)
fumex:=factor(umex)$DistinctDegreeFactorize(extField,SUEx)
@@ -273,7 +273,7 @@ TwoFactorize(F) : C == T
while not empty? lfacth repeat
ff := first lfacth
lfacth := rest lfacth
- if (c:=leadingCoefficient leadingCoefficient ff) ^=1 then
+ if (c:=leadingCoefficient leadingCoefficient ff) ~=1 then
ff:=((inv c)::SUEx)* ff
not ((ffu:= retractIfCan(ff)$Normp) case "failed") =>
lfactk := cons(ffu::P, lfactk)
diff --git a/src/algebra/unifact.spad.pamphlet b/src/algebra/unifact.spad.pamphlet
index 672a3c69..1e9f19d8 100644
--- a/src/algebra/unifact.spad.pamphlet
+++ b/src/algebra/unifact.spad.pamphlet
@@ -110,13 +110,13 @@ UnivariateFactorize(ZP) : public == private where
lead := leadingCoefficient m
trail := lead
m := reductum m
- while m ^= 0 repeat
+ while m ~= 0 repeat
trail := leadingCoefficient m
m:= reductum m
fc := factor(c) :: Factored(Z)
for r in factors fc repeat
- if (r.exponent = 1) and (0 ^= (lead rem r.factor)) and
- (0 ^= (trail rem (r.factor ** 2))) then return true
+ if (r.exponent = 1) and (0 ~= (lead rem r.factor)) and
+ (0 ~= (trail rem (r.factor ** 2))) then return true
false
negShiftz(n: Z,Modulus:PI): Z ==
@@ -136,7 +136,7 @@ UnivariateFactorize(ZP) : public == private where
nm := (degree m)::NNI
nmq2:NNI := nm quo 2
norm: Z := sqroot(+/[coefficient(m,k)**2 for k in 0..nm])
- if nmq2^=1 then nm := (nmq2-1):NNI
+ if nmq2~=1 then nm := (nmq2-1):NNI
else nm := nmq2
bin0 := nm
cbound := (bin0*norm+lcm)::PI
@@ -173,7 +173,7 @@ UnivariateFactorize(ZP) : public == private where
q:=nextPrime(q)$IntegerPrimesPackage(Z) pretend PI
(rr:=lcm rem q) = 0$Z => "next prime"
disc:=gcd(m,differentiate m,q)
- (degree disc)^=0 => "next prime"
+ (degree disc)~=0 => "next prime"
k := k+1
newdd := ddFact(m,q)
((n := numFactors(newdd)) < 9) =>
@@ -216,11 +216,11 @@ UnivariateFactorize(ZP) : public == private where
d,d2: Z
d := coefficient(m,1)**2-4*coefficient(m,0)*coefficient(m,2)
d2 := sqroot(d)
- (d-d2**2)^=0 => [m]
+ (d-d2**2)~=0 => [m]
alpha: Z := coefficient(m,1)+d2
beta: Z := 2*coefficient(m,2)
d := gcd(alpha,beta)
- if d ^=1 then
+ if d ~=1 then
alpha := alpha quo d
beta := beta quo d
m0: ZP := monomial(beta,1)+monomial(alpha,0)
diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet
index 0406479e..04833f55 100644
--- a/src/algebra/vector.spad.pamphlet
+++ b/src/algebra/vector.spad.pamphlet
@@ -68,7 +68,7 @@ VectorCategory(R:Type): Category == OneDimensionalArrayAggregate R with
add
if R has AbelianSemiGroup then
u + v ==
- (n := #u) ^= #v => error "Vectors must be of the same length"
+ (n := #u) ~= #v => error "Vectors must be of the same length"
map(_+ , u, v)
if R has AbelianMonoid then
@@ -85,13 +85,13 @@ VectorCategory(R:Type): Category == OneDimensionalArrayAggregate R with
if R has Ring then
dot(u, v) ==
- #u ^= #v => error "Vectors must be of the same length"
+ #u ~= #v => error "Vectors must be of the same length"
_+/[qelt(u, i) * qelt(v, i) for i in minIndex u .. maxIndex u]
outerProduct(u, v) ==
matrix [[qelt(u, i) * qelt(v,j) for i in minIndex u .. maxIndex u] _
for j in minIndex v .. maxIndex v]
cross(u, v) ==
- #u ^= 3 or #v ^= 3 => error "Vectors must be of length 3"
+ #u ~= 3 or #v ~= 3 => error "Vectors must be of length 3"
construct [qelt(u, 2)*qelt(v, 3) - qelt(u, 3)*qelt(v, 2) , _
qelt(u, 3)*qelt(v, 1) - qelt(u, 1)*qelt(v, 3) , _
qelt(u, 1)*qelt(v, 2) - qelt(u, 2)*qelt(v, 1) ]
diff --git a/src/algebra/view2D.spad.pamphlet b/src/algebra/view2D.spad.pamphlet
index 858de376..a318364c 100644
--- a/src/algebra/view2D.spad.pamphlet
+++ b/src/algebra/view2D.spad.pamphlet
@@ -283,7 +283,7 @@ GraphImage (): Exports == Implementation where
listOfListsOfPoints := [ l for l in listOfListsOfPoints | ^null l ]
if (null listOfListsOfPoints) then
error "GraphImage was given a list that contained no valid point lists"
- if ((len := #listOfListsOfPoints) ^= givenLen) then
+ if ((len := #listOfListsOfPoints) ~= givenLen) then
sayBrightly([" Warning: Ignoring pointless point list"::E]$List(E))$Lisp
graf.llPoints := listOfListsOfPoints
-- do point colors
@@ -308,7 +308,7 @@ GraphImage (): Exports == Implementation where
doOptions(graf)
(s := #(graf.llPoints)) = 0 =>
error "You are trying to make a graph with no points"
- key graf ^= 0 =>
+ key graf ~= 0 =>
error "You are trying to draw over an existing graph"
transform := coord(graf.optionsField,cartesian$COORDSYS)$DrawOptionFunctions0
graf.llPoints:= putColorInfo(graf.llPoints,graf.pointColors)
@@ -818,7 +818,7 @@ TwoDimensionalViewport ():Exports == Implementation where
move(viewport,xLoc,yLoc) ==
viewport.moveTo := [xLoc,yLoc]
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,MOVE)$Lisp
checkViewport viewport =>
@@ -827,7 +827,7 @@ TwoDimensionalViewport ():Exports == Implementation where
getI(VIEW)$Lisp -- acknowledge
update(viewport,graph,slot) ==
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,putGraph2D)$Lisp
checkViewport viewport =>
@@ -837,7 +837,7 @@ TwoDimensionalViewport ():Exports == Implementation where
resize(viewport,xSize,ySize) ==
viewport.size := [xSize,ySize]
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,RESIZE)$Lisp
checkViewport viewport =>
@@ -852,7 +852,7 @@ TwoDimensionalViewport ():Exports == Implementation where
error "Referring to a graph with too big an index"
viewport.graphStatesField.graphIndex.deltaX := xTranslate
viewport.graphStatesField.graphIndex.deltaY := yTranslate
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,TRANSLATE2D)$Lisp
checkViewport viewport =>
@@ -868,7 +868,7 @@ TwoDimensionalViewport ():Exports == Implementation where
error "Referring to a graph with too big an index"
viewport.graphStatesField.graphIndex.scaleX := xScale -- check union (undefined?)
viewport.graphStatesField.graphIndex.scaleY := yScale -- check union (undefined?)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,SCALE2D)$Lisp
checkViewport viewport =>
@@ -932,7 +932,7 @@ TwoDimensionalViewport ():Exports == Implementation where
title(viewport,Title) ==
viewport.title := Title
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,TITLE)$Lisp
checkViewport viewport =>
@@ -940,7 +940,7 @@ TwoDimensionalViewport ():Exports == Implementation where
getI(VIEW)$Lisp -- acknowledge
reset viewport ==
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,SPADBUTTONPRESS)$Lisp
checkViewport viewport =>
@@ -955,7 +955,7 @@ TwoDimensionalViewport ():Exports == Implementation where
else
status := no
viewport.graphStatesField.graphIndex.axes := status -- check union (undefined?)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,axesOnOff2D)$Lisp
checkViewport viewport =>
@@ -967,7 +967,7 @@ TwoDimensionalViewport ():Exports == Implementation where
if (graphIndex > maxGRAPHS) then
error "Referring to a graph with too big an index"
viewport.graphStatesField.graphIndex.axesColor := color
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,axesColor2D)$Lisp
checkViewport viewport =>
@@ -984,7 +984,7 @@ TwoDimensionalViewport ():Exports == Implementation where
else
status := no
viewport.graphStatesField.graphIndex.units := status -- check union (undefined?)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,unitsOnOff2D)$Lisp
checkViewport viewport =>
@@ -996,7 +996,7 @@ TwoDimensionalViewport ():Exports == Implementation where
if (graphIndex > maxGRAPHS) then
error "Referring to a graph with too big an index"
viewport.graphStatesField.graphIndex.unitsColor := color
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,unitsColor2D)$Lisp
checkViewport viewport =>
@@ -1013,7 +1013,7 @@ TwoDimensionalViewport ():Exports == Implementation where
else
status := 0$I
viewport.graphStatesField.graphIndex.connect := status -- check union (undefined?)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,connectOnOff)$Lisp
checkViewport viewport =>
@@ -1029,7 +1029,7 @@ TwoDimensionalViewport ():Exports == Implementation where
else
status := 0$I
viewport.graphStatesField.graphIndex.points := status -- check union (undefined?)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,pointsOnOff)$Lisp
checkViewport viewport =>
@@ -1045,7 +1045,7 @@ TwoDimensionalViewport ():Exports == Implementation where
else
status := 0$I
viewport.graphStatesField.graphIndex.spline := status -- check union (undefined?)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,spline2D)$Lisp
checkViewport viewport =>
@@ -1061,7 +1061,7 @@ TwoDimensionalViewport ():Exports == Implementation where
else
status := 0$I
viewport.graphStatesField.graphIndex.showing := status -- check union (undefined?)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,showing2D)$Lisp
checkViewport viewport =>
@@ -1072,7 +1072,7 @@ TwoDimensionalViewport ():Exports == Implementation where
controlPanel (viewport,onOff) ==
if onOff = "on" then viewport.flags.showCP := yes
else viewport.flags.showCP := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,hideControl2D)$Lisp
checkViewport viewport =>
@@ -1080,7 +1080,7 @@ TwoDimensionalViewport ():Exports == Implementation where
getI(VIEW)$Lisp -- acknowledge
close viewport ==
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,closeAll2D)$Lisp
checkViewport viewport =>
@@ -1101,7 +1101,7 @@ TwoDimensionalViewport ():Exports == Implementation where
write(viewport:$,Filename:STR,thingsToWrite:L STR) ==
stringToSend : STR := ""
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW2D)$Lisp
sendI(VIEW,writeView)$Lisp
checkViewport viewport =>
diff --git a/src/algebra/view3D.spad.pamphlet b/src/algebra/view3D.spad.pamphlet
index 226145a6..25f1f30c 100644
--- a/src/algebra/view3D.spad.pamphlet
+++ b/src/algebra/view3D.spad.pamphlet
@@ -596,7 +596,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
viewport.lighting.lightX := convert(Xlight)@SF
viewport.lighting.lightY := convert(Ylight)@SF
viewport.lighting.lightZ := convert(Zlight)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,lightDef)$Lisp
checkViewport viewport =>
@@ -608,7 +608,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
axes (viewport,onOff) ==
if onOff = "on" then viewport.flags.axesOn := yes
else viewport.flags.axesOn := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,axesOnOff)$Lisp
checkViewport viewport =>
@@ -618,7 +618,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
diagonals (viewport,onOff) ==
if onOff = "on" then viewport.flags.diagonalsOn := yes
else viewport.flags.diagonalsOn := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,diagOnOff)$Lisp
checkViewport viewport =>
@@ -628,7 +628,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
outlineRender (viewport,onOff) ==
if onOff = "on" then viewport.flags.outlineRenderOn := yes
else viewport.flags.outlineRenderOn := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,outlineOnOff)$Lisp
checkViewport viewport =>
@@ -638,7 +638,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
controlPanel (viewport,onOff) ==
if onOff = "on" then viewport.flags.showCP := yes
else viewport.flags.showCP := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,hideControl)$Lisp
checkViewport viewport =>
@@ -655,14 +655,14 @@ ThreeDimensionalViewport(): Exports == Implementation where
else if (how = "smooth") then -- smooth
viewport.flags.style := smooth
else viewport.flags.style := wireMesh
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,viewport.flags.style)$Lisp
checkViewport viewport =>
getI(VIEW)$Lisp -- acknowledge
reset viewport ==
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,SPADBUTTONPRESS)$Lisp
checkViewport viewport =>
@@ -670,7 +670,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
getI(VIEW)$Lisp -- acknowledge
close viewport ==
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,closeAll)$Lisp
checkViewport viewport =>
@@ -678,7 +678,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
viewport.key := 0$I
viewpoint (viewport:%):V ==
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,queryVIEWPOINT)$Lisp
checkViewport viewport =>
@@ -698,7 +698,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
viewpoint (viewport:%, viewpt:V):Void ==
viewport.viewpoint := viewpt
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,changeVIEWPOINT)$Lisp
checkViewport viewport =>
@@ -744,7 +744,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
title (viewport,Title) ==
viewport.title := Title
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,TITLE)$Lisp
checkViewport viewport =>
@@ -753,7 +753,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
colorDef (viewport,HueOffset,HueNumber) ==
viewport.colors := [h := (hue HueOffset),(hue HueNumber) - h]
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,COLORDEF)$Lisp
checkViewport viewport =>
@@ -767,7 +767,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
move(viewport,xLoc,yLoc) ==
viewport.moveTo := [xLoc,yLoc]
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,MOVE)$Lisp
checkViewport viewport =>
@@ -777,7 +777,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
resize(viewport,xSize,ySize) ==
viewport.size := [xSize,ySize]
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,RESIZE)$Lisp
checkViewport viewport =>
@@ -800,7 +800,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
rotate(viewport:%,Theta:F,Phi:F) ==
viewport.viewpoint.theta := convert(Theta)@SF
viewport.viewpoint.phi := convert(Phi)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,ROTATE)$Lisp
checkViewport viewport =>
@@ -810,7 +810,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
zoom(viewport:%,Scale:F) ==
viewport.viewpoint.scale := convert(Scale)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,ZOOM)$Lisp
checkViewport viewport =>
@@ -821,7 +821,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
viewport.viewpoint.scaleX := convert(ScaleX)@SF
viewport.viewpoint.scaleY := convert(ScaleY)@SF
viewport.viewpoint.scaleZ := convert(ScaleZ)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,zoomx)$Lisp
checkViewport viewport =>
@@ -833,7 +833,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
translate(viewport,DeltaX,DeltaY) ==
viewport.viewpoint.deltaX := convert(DeltaX)@SF
viewport.viewpoint.deltaY := convert(DeltaY)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,TRANSLATE)$Lisp
checkViewport viewport =>
@@ -845,7 +845,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
if (Amount < 0$F) or (Amount > 1$F) then
error "The intensity must be a value between 0 and 1, inclusively."
viewport.lighting.translucence := convert(Amount)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,translucenceDef)$Lisp
checkViewport viewport =>
@@ -860,7 +860,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
write(viewport:%,Filename:S,thingsToWrite:L S) ==
stringToSend : S := ""
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,writeView)$Lisp
checkViewport viewport =>
@@ -879,7 +879,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
perspective (viewport,onOff) ==
if onOff = "on" then viewport.perspective.perspectiveField := yes
else viewport.perspective.perspectiveField := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,perspectiveOnOff)$Lisp
checkViewport viewport =>
@@ -889,7 +889,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
showRegion (viewport,onOff) ==
if onOff = "on" then viewport.flags.showRegionField := yes
else viewport.flags.showRegionField := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,region3D)$Lisp
checkViewport viewport =>
@@ -899,7 +899,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
showClipRegion (viewport,onOff) ==
if onOff = "on" then viewport.volume.clipRegionField := yes
else viewport.volume.clipRegionField := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,clipRegionOnOff)$Lisp
checkViewport viewport =>
@@ -909,7 +909,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
clipSurface (viewport,onOff) ==
if onOff = "on" then viewport.volume.clipSurfaceField := yes
else viewport.volume.clipSurfaceField := no
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,clipSurfaceOnOff)$Lisp
checkViewport viewport =>
@@ -918,7 +918,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
eyeDistance(viewport:%,EyeDistance:F) ==
viewport.perspective.eyeDistance := convert(EyeDistance)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,eyeDistanceData)$Lisp
checkViewport viewport =>
@@ -927,7 +927,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
hitherPlane(viewport:%,HitherPlane:F) ==
viewport.perspective.hitherPlane := convert(HitherPlane)@SF
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,hitherPlaneData)$Lisp
checkViewport viewport =>
@@ -937,7 +937,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
modifyPointData(viewport,anIndex,aPoint) ==
(n := dimension aPoint) < 3 => error "The point should have dimension of at least 3"
viewport.space3D := modifyPointData(viewport.space3D,anIndex,aPoint)
- (key(viewport) ^= 0$I) =>
+ (key(viewport) ~= 0$I) =>
sendI(VIEW,typeVIEW3D)$Lisp
sendI(VIEW,modifyPOINT)$Lisp
checkViewport viewport =>
@@ -950,7 +950,7 @@ ThreeDimensionalViewport(): Exports == Implementation where
getI(VIEW)$Lisp -- acknowledge
-- print viewport ==
--- (key(viewport) ^= 0$I) =>
+-- (key(viewport) ~= 0$I) =>
-- sendI(VIEW,typeVIEW3D)$Lisp
-- sendI(VIEW,printViewport)$Lisp
-- checkViewport viewport =>
diff --git a/src/algebra/wtpol.spad.pamphlet b/src/algebra/wtpol.spad.pamphlet
index c3ee8d28..af1414e0 100644
--- a/src/algebra/wtpol.spad.pamphlet
+++ b/src/algebra/wtpol.spad.pamphlet
@@ -55,14 +55,14 @@ WeightedPolynomials(R:Ring,VarSet: OrderedSet, E:OrderedAbelianMonoidSup,
changeWeightLevel(n) ==
wtlevel:=n
lookupList:List Record(var:VarSet, weight:NonNegativeInteger)
- if #vl ^= #wl then error "incompatible length lists in WeightedPolynomial"
+ if #vl ~= #wl then error "incompatible length lists in WeightedPolynomial"
lookupList:=[[v,n] for v in vl for n in wl]
-- local operation
innercoerce:(p,z) -> $
lookup:Varset -> NonNegativeInteger
lookup v ==
l:=lookupList
- while l ^= [] repeat
+ while l ~= [] repeat
v = l.first.var => return l.first.weight
l:=l.rest
0
diff --git a/src/algebra/xlpoly.spad.pamphlet b/src/algebra/xlpoly.spad.pamphlet
index c863ac2f..6d79566d 100644
--- a/src/algebra/xlpoly.spad.pamphlet
+++ b/src/algebra/xlpoly.spad.pamphlet
@@ -243,7 +243,7 @@ LyndonWord(VarSet:OrderedSet):Public == Private where
lyndon? w ==
w = 1$OFMON => false
f: OFMON := rest w
- while f ^= 1$OFMON repeat
+ while f ~= 1$OFMON repeat
not lexico(w,f) => return false
f := rest f
true
@@ -594,7 +594,7 @@ LiePolynomial(VarSet:OrderedSet, R:CommutativeRing) : Public == Private where
LiePolyIfCan p == -- inefficace a cause de la rep. de XDPOLY
not quasiRegular? p => "failed"
p1: XDPOLY := p ; r:$ := 0
- while p1 ^= 0 repeat
+ while p1 ~= 0 repeat
t: Record(k:WORD, c:R) := mindegTerm p1
w: WORD := t.k; coef:R := t.c
(l := lyndonIfCan(w)$LWORD) case "failed" => return "failed"
@@ -770,7 +770,7 @@ PoincareBirkhoffWittLyndonBasis(VarSet: OrderedSet): Public == Private where
null x.rest
retract x ==
- #x ^= 1 => error "cannot convert to Lyndon word"
+ #x ~= 1 => error "cannot convert to Lyndon word"
x.first
retractIfCan x ==
@@ -958,7 +958,7 @@ XPBWPolynomial(VarSet:OrderedSet,R:CommutativeRing): XDPcat == XDPdef where
p.last.k = 1$BASIS => p.last.c
0$R
- quasiRegular? p == (p=0) or (p.last.k ^= 1$BASIS)
+ quasiRegular? p == (p=0) or (p.last.k ~= 1$BASIS)
quasiRegular p ==
p = 0 => p
p.last.k = 1$BASIS => delete(p, maxIndex p)
diff --git a/src/algebra/xpoly.spad.pamphlet b/src/algebra/xpoly.spad.pamphlet
index 6ff416b1..160ee646 100644
--- a/src/algebra/xpoly.spad.pamphlet
+++ b/src/algebra/xpoly.spad.pamphlet
@@ -107,7 +107,7 @@ OrderedFreeMonoid(S: OrderedSet): OFMcategory == OFMdefinition where
x: List REC := listOfMonoms(w)$Rep
null x => "failed"
fx: REC := first x
- fx.gen ^= l => "failed"
+ fx.gen ~= l => "failed"
fx.exp = 1 => makeMulti rest(x)
makeMulti [[fx.gen, (fx.exp - 1)::NNI ]$REC, :rest x]
@@ -288,7 +288,7 @@ FreeModule1(R:Ring,S:OrderedSet): FMcat == FMdef where
monomials x == [ monom (t.k, t.c) for t in x]
retractIfCan x ==
- numberOfMonomials(x) ^= 1 => "failed"
+ numberOfMonomials(x) ~= 1 => "failed"
x.first.c = 1 => x.first.k
"failed"
@@ -578,7 +578,7 @@ XPolynomialRing(R:Ring,E:OrderedMonoid): T == C where
constant? p == (p = 0) or (maxdeg(p) = 1$E)
constant p == coef(p,1$E)
- quasiRegular? p == (p=0) or (last p).k ^= 1$E
+ quasiRegular? p == (p=0) or (last p).k ~= 1$E
quasiRegular p ==
quasiRegular?(p) => p
[t for t in p | not(t.k = 1$E)]
@@ -746,10 +746,10 @@ XDistributedPolynomial(vl:OrderedSet,R:Ring): XDPcat == XDPdef where
x * shw(rest w1,w2) + y * shw(w1,rest w2)
lquo(p:%,q:%):% ==
- +/ [r * t.c for t in q | (r := lquo(p,t.k)) ^= 0]
+ +/ [r * t.c for t in q | (r := lquo(p,t.k)) ~= 0]
rquo(p:%,q:%):% ==
- +/ [r * t.c for t in q | (r := rquo(p,t.k)) ^= 0]
+ +/ [r * t.c for t in q | (r := rquo(p,t.k)) ~= 0]
coef(p:%,q:%):R ==
p = 0 => 0$R
@@ -839,14 +839,14 @@ XRecursivePolynomial(VarSet:OrderedSet,R:Ring): Xcat == Xdef where
p2 case R => p1 * p2::R
p1 case R => p1 * p2.c0
x:REGPOLY := construct [[t.k, a]$TERM for t in ListOfTerms(p1.reg) _
- | (a:= rquo(t.c,p2)) ^= 0$% ]$LTERMS
+ | (a:= rquo(t.c,p2)) ~= 0$% ]$LTERMS
simplifie [coef(p1,p2) , x]$VPOLY
trunc(p,n) ==
n = 0 or (p case R) => (constant p)::%
n1: NNI := (n-1)::NNI
lt: LTERMS := [[t.k, r]$TERM for t in ListOfTerms p.reg _
- | (r := trunc(t.c, n1)) ^= 0]$LTERMS
+ | (r := trunc(t.c, n1)) ~= 0]$LTERMS
x: REGPOLY := construct lt
simplifie [constant p, x]$VPOLY
@@ -854,7 +854,7 @@ XRecursivePolynomial(VarSet:OrderedSet,R:Ring): Xcat == Xdef where
constant? p => (constant p)::%
vl: List VarSet := sort(#1 > #2, varList p)
x : REGPOLY := _
- construct [[v, unexpand r]$TERM for v in vl| (r:=lquo(p,v)) ^= 0]
+ construct [[v, unexpand r]$TERM for v in vl| (r:=lquo(p,v)) ~= 0]
[constant p, x]$VPOLY
if R has CommutativeRing then
@@ -999,7 +999,7 @@ XRecursivePolynomial(VarSet:OrderedSet,R:Ring): Xcat == Xdef where
rquo(p:%, v:VarSet):% ==
p case R => 0
x:REGPOLY := construct [[t.k, a]$TERM for t in ListOfTerms(p.reg)
- | (a:= rquo(t.c,v)) ^= 0 ]
+ | (a:= rquo(t.c,v)) ~= 0 ]
simplifie [constant(coefficient(p.reg,v)) , x]$VPOLY
rquo(p:%, w:WORD):% ==
@@ -1026,7 +1026,7 @@ XRecursivePolynomial(VarSet:OrderedSet,R:Ring): Xcat == Xdef where
p case R =>
p = 0 => error "XRPOLY.mindeg: polynome nul !!"
1$WORD
- p.c0 ^= 0 => 1$WORD
+ p.c0 ~= 0 => 1$WORD
"min"/[(t.k) *$WORD mindeg(t.c) for t in ListOfTerms p.reg]
maxdeg p ==
@@ -1042,7 +1042,7 @@ XRecursivePolynomial(VarSet:OrderedSet,R:Ring): Xcat == Xdef where
map(fn,p) ==
p case R => fn(p::R)
x:REGPOLY := construct [[t.k,a]$TERM for t in ListOfTerms p.reg
- |(a := map(fn,t.c)) ^= 0$R]
+ |(a := map(fn,t.c)) ~= 0$R]
simplifie [fn(p.c0),x]$VPOLY
varList p ==