Re: [open-axiom-devel] [fricas-devel] Re: [open-axiom-patches] Use of ^ as logical negation discont
A system for computer algebra and symbolic mathematics
Brought to you by:
dos-reis
From: Martin R. <mar...@un...> - 2008-09-04 09:22:23
|
I have now finished building and testing. I will check in two patches, 1) first one that only touches the algebra, and still allows ^ as prefix operator. However, it removes support for ^ also in formula, mathml and tex. Where appropriate, I replaced not (... = ...) by (... ~= ...). then 2) a patch that discontinues ^ also in boot. Note that I did not check all routines where ^ is handled whether they could deal with prefix ^ exclusively. These places can be found easily using grep "\^[^=]" *.boot it's only a page or so. I did *not* replace not (... = ...) by (... ~= ...) here. Below are the patches, since sourceforge is down today, I'll check them in tomorrow. I think it is desirable to do replace ^= by ~= everywhere, to be consistent. By the way, it's not even defined in the algebra... Gaby: you missed a few (one or two) places in the algebra, you might want to check the patch below. Martin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% first patch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Index: src/algebra/aggcat.spad.pamphlet =================================================================== --- src/algebra/aggcat.spad.pamphlet (Revision 348) +++ src/algebra/aggcat.spad.pamphlet (Arbeitskopie) @@ -2567,9 +2567,6 @@ "not": % -> % ++ not(b) returns the logical {\em not} of bit aggregate ++ \axiom{b}. - "^" : % -> % - ++ ^ b returns the logical {\em not} of bit aggregate - ++ \axiom{b}. nand : (%, %) -> % ++ nand(a,b) returns the logical {\em nand} of bit aggregates \axiom{a} ++ and \axiom{b}. @@ -2588,7 +2585,6 @@ add not v == map(_not, v) - _^ v == map(_not, v) _~(v) == map(_~, v) _/_\(v, u) == map(_/_\, v, u) _\_/(v, u) == map(_\_/, v, u) Index: src/algebra/algfact.spad.pamphlet =================================================================== --- src/algebra/algfact.spad.pamphlet (Revision 348) +++ src/algebra/algfact.spad.pamphlet (Arbeitskopie) @@ -62,7 +62,7 @@ nn := pnorm f --newval:RN:=1 --pert:=false - --if ^ SqFr? nn then + --if not SqFr? nn then -- pert:=true -- newterm:=perturb(f) -- newf:=newterm.ppol Index: src/algebra/boolean.spad.pamphlet =================================================================== --- src/algebra/boolean.spad.pamphlet (Revision 348) +++ src/algebra/boolean.spad.pamphlet (Arbeitskopie) @@ -84,7 +84,7 @@ ++ Author: Stephen M. Watt ++ Date Created: ++ Change History: -++ Basic Operations: true, false, not, and, or, xor, nand, nor, implies, ^ +++ Basic Operations: true, false, not, and, or, xor, nand, nor, implies ++ Related Constructors: ++ Keywords: boolean ++ Description: \spadtype{Boolean} is the elementary logic with 2 values: @@ -95,8 +95,6 @@ ++ true is a logical constant. false : constant -> % ++ false is a logical constant. - _^ : % -> % - ++ ^ n returns the negation of n. _not : % -> % ++ not n returns the negation of n. _and : (%, %) -> % @@ -126,7 +124,6 @@ false == NIL$Lisp sample() == true not b == (test b => false; true) - _^ b == (test b => false; true) _~ b == (test b => false; true) _and(a, b) == (test a => b; false) _/_\(a, b) == (test a => b; false) Index: src/algebra/color.spad.pamphlet =================================================================== --- src/algebra/color.spad.pamphlet (Revision 348) +++ src/algebra/color.spad.pamphlet (Arbeitskopie) @@ -74,7 +74,9 @@ if (xHueSmaller:= (diff < 0)) then diff := -diff if (moreThanHalf:=(diff > totalHues quo 2)) then diff := totalHues-diff offset : I := wholePart(round (diff::SF/(2::SF)**(x.weight/y.weight)) ) - if (xHueSmaller and ^moreThanHalf) or (^xHueSmaller and moreThanHalf) then + if (xHueSmaller and not moreThanHalf) + or (not xHueSmaller and moreThanHalf) + then ans := x.hue + offset else ans := x.hue - offset Index: src/algebra/ddfact.spad.pamphlet =================================================================== --- src/algebra/ddfact.spad.pamphlet (Revision 348) +++ src/algebra/ddfact.spad.pamphlet (Arbeitskopie) @@ -191,7 +191,7 @@ degree fprod = d => ris := cons(fprod,ris) aux:=[fprod] setPoly fprod - while ^(empty? aux) repeat + while not (empty? aux) repeat t := ranpol(2*d) if charF then t:=trace2PowMod(t,(n1*d-1)::NNI,fprod) else t:=exptMod(tracePowMod(t,(d-1)::NNI,fprod), Index: src/algebra/formula.spad.pamphlet =================================================================== --- src/algebra/formula.spad.pamphlet (Revision 348) +++ src/algebra/formula.spad.pamphlet (Arbeitskopie) @@ -102,8 +102,8 @@ splitChars : S := " <>[](){}+*=,-%" - unaryOps : L S := ["-","^"]$(L S) - unaryPrecs : L I := [700,260]$(L I) + unaryOps : L S := ["-"]$(L S) + unaryPrecs : L I := [700]$(L I) -- the precedence of / in the following is relatively low because -- the bar obviates the need for parentheses. Index: src/algebra/fortran.spad.pamphlet =================================================================== --- src/algebra/fortran.spad.pamphlet (Revision 348) +++ src/algebra/fortran.spad.pamphlet (Arbeitskopie) @@ -961,7 +961,7 @@ -- the first argument must be a symbol, which is either i,j or k -- to specify the direction in which the concatenation is to take place matrixConcat3D(dir : Symbol,mat1 : $,mat2 : $) : $ == - ^((dir = (i::Symbol)) or (dir = (j::Symbol)) or (dir = (k::Symbol)))_ + not ((dir = (i::Symbol)) or (dir = (j::Symbol)) or (dir = (k::Symbol)))_ => error "the axis of concatenation must be i,j or k" mat1Dim := matrixDimensions(mat1) mat2Dim := matrixDimensions(mat2) @@ -977,7 +977,7 @@ if (dir = (i::Symbol)) then -- j,k dimensions must agree - if (^((jDim1 = jDim2) and (kDim1=kDim2))) + if (not ((jDim1 = jDim2) and (kDim1=kDim2))) then error "jxk do not agree" else @@ -985,7 +985,7 @@ if (dir = (j::Symbol)) then -- i,k dimensions must agree - if (^((iDim1 = iDim2) and (kDim1=kDim2))) + if (not ((iDim1 = iDim2) and (kDim1=kDim2))) then error "ixk do not agree" else @@ -997,7 +997,7 @@ if (dir = (k::Symbol)) then temp : (PA PA R) -- i,j dimensions must agree - if (^((iDim1 = iDim2) and (jDim1=jDim2))) + if (not ((iDim1 = iDim2) and (jDim1=jDim2))) then error "ixj do not agree" else @@ -1088,7 +1088,7 @@ kLength2 := mat2Dims.3 -- check that the dimensions are the same - (^(iLength1 = iLength2) or ^(jLength1 = jLength2) or ^(kLength1 = kLength2))_ + ((iLength1 ~= iLength2) or (jLength1 ~= jLength2) or (kLength1 ~= kLength2))_ => error "error the matrices are different sizes" sum : R @@ -1120,10 +1120,10 @@ --first check that the matrix is in the correct form for subList in listRep repeat - ^((#subList)$(L L R) = jLength) => error_ + ((#subList)$(L L R) ~= jLength) => error_ "can not have an irregular shaped matrix" for subSubList in subList repeat - ^((#(subSubList))$(L R) = kLength) => error_ + ((#(subSubList))$(L R) ~= kLength) => error_ "can not have an irregular shaped matrix" row1 : (PA R) := new(kLength,((listRep.1).1).1)$(PA R) Index: src/algebra/gaussfac.spad.pamphlet =================================================================== --- src/algebra/gaussfac.spad.pamphlet (Revision 348) +++ src/algebra/gaussfac.spad.pamphlet (Arbeitskopie) @@ -72,7 +72,7 @@ q1:=q-1 r:=q1 r1:=r exquo 4 - while ^(r1 case "failed") repeat + while not (r1 case "failed") repeat r:=r1::Z r1:=r exquo 2 s : FMod := reduce(1,q) Index: src/algebra/gbeuclid.spad.pamphlet =================================================================== --- src/algebra/gbeuclid.spad.pamphlet (Revision 348) +++ src/algebra/gbeuclid.spad.pamphlet (Arbeitskopie) @@ -189,7 +189,7 @@ H:= Pol Pol1:= rest(Pol1) D:= nil - while ^null Pol1 repeat + while not null Pol1 repeat h:= first(Pol1) Pol1:= rest(Pol1) en:= degree(h) @@ -214,7 +214,7 @@ -------- loop - while ^null D repeat + while not null D repeat D0:= first D ep:=esPol(D0) D:= rest(D) @@ -235,7 +235,7 @@ #2.lcmfij) or (( #1.lcmfij = #2.lcmfij ) and ( sizeLess?(#1.lcmcij,#2.lcmcij)) ), dd1)), ecritBonD(eh,D)) Pol:= cons(eh,eupdatF(eh,Pol)) - ^ecrithinH(eh,H) or + not ecrithinH(eh,H) or ((e = degree(first(H))) and (leadingCoefficient(eh) = leadingCoefficient(first(H)) ) ) => if xx2 = 1 then ala:= prindINFO(D0,ep,eh,#H, #D, xx) @@ -420,15 +420,15 @@ true ---------------------------- - --- crit B - true, if eik is a multiple of eh and eik ^equal - --- lcm(eh,ei) and eik ^equal lcm(eh,ek) + --- crit B - true, if eik is a multiple of eh and eik not equal + --- lcm(eh,ei) and eik not equal lcm(eh,ek) ecritB(eh:Expon, ch: Dom, ei:Expon, ci: Dom, ek:Expon, ck: Dom) == eik:= sup(ei, ek) cik:= lcm(ci, ck) ecritM(eh, ch, eik, cik) and - ^ecritM(eik, cik, sup(ei, eh), lcm(ci, ch)) and - ^ecritM(eik, cik, sup(ek, eh), lcm(ck, ch)) + not ecritM(eik, cik, sup(ei, eh), lcm(ci, ch)) and + not ecritM(eik, cik, sup(ek, eh), lcm(ck, ch)) ------------------------------- Index: src/algebra/gbintern.spad.pamphlet =================================================================== --- src/algebra/gbintern.spad.pamphlet (Revision 348) +++ src/algebra/gbintern.spad.pamphlet (Arbeitskopie) @@ -124,7 +124,7 @@ basPols:= updatF(hMonic(first Pol1),virtualDegree(first Pol1),[]) Pol1:= rest(Pol1) D:= nil - while _^ null Pol1 repeat + while not null Pol1 repeat h:= hMonic(first(Pol1)) Pol1:= rest(Pol1) toth := virtualDegree h @@ -137,7 +137,7 @@ -------- loop redPols := [x.pol for x in basPols] - while _^ null D repeat + while not null D repeat D0:= first D s:= hMonic(sPol(D0)) D:= rest(D) @@ -261,7 +261,7 @@ redPo(s: Dpol, F: List(Dpol)) == m:Dom := 1 Fh := F - while _^ ( s = 0 or null F ) repeat + while not ( s = 0 or null F ) repeat f1:= first(F) s1:= degree(s) e: Union(Expon, "failed") @@ -291,8 +291,8 @@ ---------------------------- - --- crit B - true, if eik is a multiple of eh and eik ^equal - --- lcm(eh,ei) and eik ^equal lcm(eh,ek) + --- crit B - true, if eik is a multiple of eh and eik not equal + --- lcm(eh,ei) and eik not 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)) Index: src/algebra/ghensel.spad.pamphlet =================================================================== --- src/algebra/ghensel.spad.pamphlet (Revision 348) +++ src/algebra/ghensel.spad.pamphlet (Arbeitskopie) @@ -79,7 +79,7 @@ maxd := +/[degree f for f in fln] quo 2 auxfl:List List TP := [] for poly in fln while factlist^=[] repeat - factlist := [term for term in factlist | ^member?(poly,term)] + factlist := [term for term in factlist | not member?(poly,term)] dp := degree poly for term in factlist repeat (+/[degree f for f in term]) + dp > maxd => "next term" @@ -148,9 +148,9 @@ dfn := degree m aux := [] for poly in fln repeat - ^member?(poly,auxl) => aux := cons(poly,aux) - auxfl := [term for term in auxfl | ^member?(poly,term)] - factlist := [term for term in factlist |^member?(poly,term)] + not member?(poly,auxl) => aux := cons(poly,aux) + auxfl := [term for term in auxfl | not member?(poly,term)] + factlist := [term for term in factlist | not member?(poly,term)] fln := aux factlist := auxfl if dfn > 0 then finallist := cons(m,finallist) Index: src/algebra/gpgcd.spad.pamphlet =================================================================== --- src/algebra/gpgcd.spad.pamphlet (Revision 348) +++ src/algebra/gpgcd.spad.pamphlet (Arbeitskopie) @@ -323,12 +323,12 @@ --JHD --JHD --test if one of the polynomials is the gcd --JHD dd=d1 => ---JHD if ^((f:=p2 exquo p1) case "failed") then +--JHD if not ((f:=p2 exquo p1) case "failed") then --JHD return [[u],lval,p1]$UTerm --JHD if dd^=d2 then dd:=(dd-1)::NNI --JHD --JHD dd=d2 => ---JHD if ^((f:=p1 exquo p2) case "failed") then +--JHD if not ((f:=p1 exquo p2) case "failed") then --JHD return [[u],lval,p2]$UTerm --JHD dd:=(dd-1)::NNI --JHD return uterm @@ -506,7 +506,7 @@ --JHD --deg = 0$NNI => 1$P --JHD --deg = degree(p1,mvar) => --JHD -- (p2 exquo p1) case P => abs(p1) -- already know that ---JHD -- ^(p1 exquo p2) +--JHD -- not (p1 exquo p2) --JHD -- internal(p2,p1,mvar) --JHD --cheapPrs?(p1,p2,deg,mvar) => --JHD -- g:= gcdPrs(p1,p2,deg,mvar) @@ -561,7 +561,7 @@ --JHD (p0:P,p1:P):=(plist.first,plist.2) --JHD if univariate eval(p0,rest lvar,lval) ^= lg.first then --JHD (p0,p1):=(p1,p0) ---JHD ^leadpol => p0 +--JHD not leadpol => p0 --JHD cprim:=contprim([p0]) --JHD cprim.first.prim --JHD Index: src/algebra/groebsol.spad.pamphlet =================================================================== --- src/algebra/groebsol.spad.pamphlet (Revision 348) +++ src/algebra/groebsol.spad.pamphlet (Arbeitskopie) @@ -133,7 +133,7 @@ findCompon(leq:L HDPoly,lvar:L OV):L L DPoly == teq:=totolex(leq) #teq = #lvar => [teq] - -- ^((teq1:=testGenPos(teq,lvar)) case "failed") => [teq1::L DPoly] + -- not ((teq1:=testGenPos(teq,lvar)) case "failed") => [teq1::L DPoly] gp:=genPos(teq,lvar) lgp:= gp.polys g:HDPoly:=gp.univp @@ -171,7 +171,7 @@ lnp:=[dmpToHdmp(f) for f in leq] leq1:=groebner lnp #(leq1) = 1 and first(leq1) = 1 => list empty() - ^(zeroDim?(leq1,lvar)) => + not (zeroDim?(leq1,lvar)) => error "system does not have a finite number of solutions" -- add computation of dimension, for a more useful error basis:=computeBasis(leq1) @@ -196,7 +196,7 @@ testDim(leq : L HDPoly,lvar : L OV) : Union(L HDPoly,"failed") == leq1:=groebner leq #(leq1) = 1 and first(leq1) = 1 => empty() - ^(zeroDim?(leq1,lvar)) => "failed" + not (zeroDim?(leq1,lvar)) => "failed" leq1 @ Index: src/algebra/ideal.spad.pamphlet =================================================================== --- src/algebra/ideal.spad.pamphlet (Revision 348) +++ src/algebra/ideal.spad.pamphlet (Arbeitskopie) @@ -196,7 +196,7 @@ n:= # leastVars #fullVars < n => error "wrong vars" n=0 => fullVars - append([vv for vv in fullVars| ^member?(vv,leastVars)],leastVars) + append([vv for vv in fullVars| not member?(vv,leastVars)],leastVars) isMonic?(f:DPoly,x:VarSet) : Boolean == ground? leadingCoefficient univariate(f,x) @@ -220,7 +220,7 @@ ldif:List VarSet:= lv for mvset in monvar while ldif ^=[] repeat ldif:=setDifference(mvset,subs) - if ^(empty? ldif) then return #subs + if not (empty? ldif) then return #subs 0 -- Exported Functions ---- @@ -244,7 +244,7 @@ ---- groebner base for an Ideal ---- groebner(I:Ideal) : Ideal == I.isGr => - "or"/[^zero? f for f in I.idl] => I + "or"/[not zero? f for f in I.idl] => I [empty(),true] [groebner I.idl ,true] @@ -314,7 +314,7 @@ J = [1] => false n:NNI := # lvar #J < n => false - for f in J while ^empty?(lvar) repeat + for f in J while not empty?(lvar) repeat x:=(mainVariable f)::VarSet if isMonic?(f,x) then lvar:=delete(lvar,position(x,lvar)) empty?(lvar) @@ -336,7 +336,8 @@ empty?(I.idl) => # lvar element?(1,I) => -1 truelist:="setUnion"/[variables f for f in I.idl] - "or"/[^member?(vv,lvar) for vv in truelist] => error "wrong variables" + "or"/[not member?(vv,lvar) for vv in truelist] => + error "wrong variables" truelist:=setDifference(lvar,setDifference(lvar,truelist)) ed:Z:=#lvar - #truelist leadid:=leadingIdeal(I) Index: src/algebra/idecomp.spad.pamphlet =================================================================== --- src/algebra/idecomp.spad.pamphlet (Revision 348) +++ src/algebra/idecomp.spad.pamphlet (Arbeitskopie) @@ -121,7 +121,7 @@ nvint1:=(#lvint-1)::NNI deleteunit(lI: List FIdeal) : List FIdeal == - [I for I in lI | _^ element?(1$DPoly,I)] + [I for I in lI | not element?(1$DPoly,I)] rearrange(vlist:List OV) :List OV == vlist=[] => vlist @@ -163,7 +163,7 @@ f:DPoly:=s I:=groebner I J:=generators(JJ:= (saturate(I,s))) - while _^ in?(ideal([f*g for g in J]),I) repeat f:=s*f + while not in?(ideal([f*g for g in J]),I) repeat f:=s*f [f,JJ] ---- is the ideal zerodimensional? ---- @@ -177,7 +177,7 @@ f := Jd.first Jd:=Jd.rest if ((y:=mainVariable f) case "failed") or (y::OV ^=x ) - or _^ (ismonic (f,x)) then return false + or not (ismonic (f,x)) then return false while Jd^=[] and (mainVariable Jd.first)::OV=x repeat Jd:=Jd.rest if Jd=[] and position(x,truelist)<n then return false true @@ -228,7 +228,7 @@ for ef in lfact repeat g:DPoly:=(ef.factor)**(ef.exponent::NNI) J1:= groebnerIdeal(groebner cons(g,Jd)) - if _^ (is0dimprimary (J1,truelist)) then + if not (is0dimprimary (J1,truelist)) then return zeroPrimDecomp(I,truelist) ris:=cons(groebner backGenPos(J1,lval,truelist),ris) ris @@ -302,13 +302,13 @@ (i case "failed") => return true JR:=(reverse Jd);JM:=groebnerIdeal([JR.first]);JP:List(DPoly):=[] for f in JR.rest repeat - if _^ ismonic(f,truelist.i) then - if _^ inRadical?(f,JM) then return false + if not ismonic(f,truelist.i) then + if not inRadical?(f,JM) then return false JP:=cons(f,JP) else x:=truelist.i i:=(i-1)::NNI - if _^ testPower(univariate(f,x),x,JM) then return false + if not testPower(univariate(f,x),x,JM) then return false JM :=groebnerIdeal(append(cons(f,JP),generators JM)) true @@ -357,7 +357,7 @@ Jd:=generators J #Jd^=n => false for f in Jd repeat - if _^ ismonic(f,lvint.i) then return false + if not ismonic(f,lvint.i) then return false if i<n and (degree univariate(f,lvint.i))^=1 then return false i:=i+1 g:=Jd.n @@ -386,7 +386,8 @@ n:= # lvar #fullVars < n => error "wrong vars" n=0 => I - newVars:= append([vv for vv in fullVars| ^member?(vv,lvar)]$List(OV),lvar) + newVars:= append([vv for vv in fullVars + | not member?(vv,lvar)]$List(OV),lvar) subsVars := [monomial(1,vv,1)$DPoly1 for vv in newVars] lJ:= [eval(g,fullVars,subsVars) for g in Id] J := groebner(lJ) Index: src/algebra/indexedp.spad.pamphlet =================================================================== --- src/algebra/indexedp.spad.pamphlet (Revision 348) +++ src/algebra/indexedp.spad.pamphlet (Arbeitskopie) @@ -64,7 +64,7 @@ s: S --define x = y == - while not null x and _^ null y repeat + while not null x and not null y repeat x.first.k ^= y.first.k => return false x.first.c ^= y.first.c => return false x:=x.rest Index: src/algebra/listgcd.spad.pamphlet =================================================================== --- src/algebra/listgcd.spad.pamphlet (Revision 348) +++ src/algebra/listgcd.spad.pamphlet (Arbeitskopie) @@ -68,7 +68,7 @@ myNextPrime(val:Z,bound:NNI) : Z == nextPrime(val)$IntegerPrimesPackage(Z) - constNotZero(f : BP ) : Boolean == (degree f = 0) and ^(zero? f) + constNotZero(f : BP ) : Boolean == (degree f = 0) and not (zero? f) negShiftz(n:Z,Modulus:PI):Z == n < 0 => n:= n+Modulus @@ -100,7 +100,7 @@ member?(1,lval) => 1$Z lval:=sort(#1<#2,lval) val:=lval.first - for val1 in lval.rest while ^(val=1) repeat val:=gcd(val,val1) + for val1 in lval.rest while val ~= 1 repeat val:=gcd(val,val1) val --content for a list of univariate polynomials @@ -149,9 +149,9 @@ --local function for the gcd among n PRIMITIVE univariate polynomials localgcd(listf:List BP ):List BP == - hgt:="min"/[height(f) for f in listf|^zero? f] + hgt:="min"/[height(f) for f in listf| not zero? f] answr:=2+2*hgt - minf := "mindegpol"/[f for f in listf|^zero? f] + minf := "mindegpol"/[f for f in listf| not zero? f] (result := testDivide(listf, minf)) case List(BP) => cons(minf, result::List BP) if degree minf < 100 then for k in 1..10 repeat Index: src/algebra/mathml.spad.pamphlet =================================================================== --- src/algebra/mathml.spad.pamphlet (Revision 348) +++ src/algebra/mathml.spad.pamphlet (Arbeitskopie) @@ -394,8 +394,8 @@ maxPrec : I := 1000000 minPrec : I := 0 - unaryOps : L S := ["-","^"]$(L S) - unaryPrecs : L I := [700,260]$(L I) + unaryOps : L S := ["-"]$(L S) + unaryPrecs : L I := [700]$(L I) -- the precedence of / in the following is relatively low because -- the bar obviates the need for parentheses. Index: src/algebra/mfinfact.spad.pamphlet =================================================================== --- src/algebra/mfinfact.spad.pamphlet (Revision 348) +++ src/algebra/mfinfact.spad.pamphlet (Arbeitskopie) @@ -388,7 +388,7 @@ 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) + testp and leadtest and not polCase(lffc1*clc,#plist,leadcomp1) => range:=range+1 Dnewm := differentiate newm D2newm := map(differentiate, newm) @@ -418,7 +418,7 @@ -- polCase if leadtest or ((norm unifact > norm [ff.factor for ff in lunivf]) and - (^testp or polCase(lffc1*clc,#plist,leadcomp1))) then + (not testp or polCase(lffc1*clc,#plist,leadcomp1))) then unifact:=[uf.factor for uf in lunivf] int:=lval lffc:=lffc1 @@ -435,10 +435,10 @@ nfatt := nf nfatt>nf => -- for the previous values there were more factors - if testp then leadtest:=^polCase(lffc*clc,#plist,leadcomp) + if testp then leadtest := not polCase(lffc*clc,#plist,leadcomp) else leadtest:= false -- if polCase=true we can consider the univariate decomposition - if ^leadtest then + if not leadtest then unifact:=[uf.factor for uf in lunivf] lffc:=lffc1 if testp then leadcomp:=leadcomp1 Index: src/algebra/modgcd.spad.pamphlet =================================================================== --- src/algebra/modgcd.spad.pamphlet (Revision 348) +++ src/algebra/modgcd.spad.pamphlet (Arbeitskopie) @@ -77,7 +77,7 @@ modularGcdPrimitive(listf : List BP) :BP == empty? listf => 0$BP g := first listf - for f in rest listf | ^zero? f while degree g > 0 repeat + for f in rest listf | not zero? f while degree g > 0 repeat g:=modGcdPrimitive(g,f) g @@ -159,8 +159,8 @@ dp:=gcd(fp,gp) dgp :=euclideanSize dp if dgp =0 then return 1$BP - if dgp=dg and ^(f exquo g case "failed") then return g - if dgp=df and ^(g exquo f case "failed") then return f + if dgp=dg and not (f exquo g case "failed") then return g + if dgp=df and not (g exquo f case "failed") then return f dgp > testdeg => "next prime" ldp:FP:= ((lcdp:=leadingCoefficient(dp::BP)) = 1) => @@ -184,7 +184,7 @@ soFarModulus:=prime soFar:=dp::BP testdeg:=dgp - if ^zeroChar and euclideanSize(prime)>1 then + if not zeroChar and euclideanSize(prime)>1 then result:=dp::BP test(f,g,result) => return result -- this is based on the assumption that the caller of this package, Index: src/algebra/multfact.spad.pamphlet =================================================================== --- src/algebra/multfact.spad.pamphlet (Revision 348) +++ src/algebra/multfact.spad.pamphlet (Arbeitskopie) @@ -223,7 +223,7 @@ 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) + testp and leadtest and not polCase(lffc1*clc,#plist,leadcomp1) => range:=2*range degree(gcd [newm,differentiate(newm)])^=0 => range:=2*range luniv:=ufactor(newm) @@ -243,7 +243,7 @@ -- polCase if leadtest or ((localNorm unifact > localNorm [ff.factor for ff in lunivf]) - and (^testp or polCase(lffc1*clc,#plist,leadcomp1))) then + and (not testp or polCase(lffc1*clc,#plist,leadcomp1))) then unifact:=[uf.factor for uf in lunivf] int:=lval lffc:=lffc1 @@ -260,10 +260,10 @@ nfatt := nf nfatt>nf => -- for the previous values there were more factors - if testp then leadtest:=^polCase(lffc*clc,#plist,leadcomp) + if testp then leadtest:= not polCase(lffc*clc,#plist,leadcomp) else leadtest:= false -- if polCase=true we can consider the univariate decomposition - if ^leadtest then + if not leadtest then unifact:=[uf.factor for uf in lunivf] lffc:=lffc1 if testp then leadcomp:=leadcomp1 Index: src/algebra/multsqfr.spad.pamphlet =================================================================== --- src/algebra/multsqfr.spad.pamphlet (Revision 348) +++ src/algebra/multsqfr.spad.pamphlet (Arbeitskopie) @@ -292,7 +292,7 @@ lcd:P:=leadingCoefficient ud leadlist:List(P):=empty() - if ^ground?(leadingCoefficient ud) then + if not ground?(leadingCoefficient ud) then leadpol:=true ud:=lcoef*ud lcg0:R:=leadingCoefficient g0 Index: src/algebra/newpoint.spad.pamphlet =================================================================== --- src/algebra/newpoint.spad.pamphlet (Revision 348) +++ src/algebra/newpoint.spad.pamphlet (Arbeitskopie) @@ -326,7 +326,7 @@ leaf? space == empty? children space root? space == (space.levelField = 0$NNI) - internal? space == ^(root? space and leaf? space) + internal? space == not (root? space and leaf? space) new() == [point(empty())$POINT,0,new()$PROP,empty(),empty(),0,_ @@ -551,7 +551,7 @@ extractPoint space == node := space - while ^root? node repeat node := parent node + while not root? node repeat node := parent node (node.pointDataField).(space.index) extractIndex space == space.index extractClosed space == closed? space.property Index: src/algebra/npcoef.spad.pamphlet =================================================================== --- src/algebra/npcoef.spad.pamphlet (Revision 348) +++ src/algebra/npcoef.spad.pamphlet (Arbeitskopie) @@ -66,7 +66,7 @@ while changed and ndet^=1 repeat changed :=false dt:=#tablecoef - for i in 1..dt while ^changed repeat + for i in 1..dt while not changed repeat (cf:=check(tablecoef.i,ulist)) case "failed" => "next i" ltochange:=cons(i,ltochange) celtf:Detc:=cf::Detc @@ -143,7 +143,7 @@ modify(tablecoef:TCoef,cfter:Detc) : TCoef == cfexp:=cfter.valexp;cfcoef:=cfter.valcoef;cfpos:=cfter.posit lterase:List(NNI):=empty() - for cterm in tablecoef | ^empty?(ctdet:=cterm.detfacts) repeat + for cterm in tablecoef | not empty?(ctdet:=cterm.detfacts) repeat (+/[term.expt for term in ctdet.first])<cfexp => "next term" for celt in ctdet repeat if celt.cfpos.expt=cfexp then Index: src/algebra/permgrps.spad.pamphlet =================================================================== --- src/algebra/permgrps.spad.pamphlet (Revision 348) +++ src/algebra/permgrps.spad.pamphlet (Arbeitskopie) @@ -244,10 +244,10 @@ point := orbit.orb.1 outlist := nil()$(L NNI) entryLessZero : B := false - while ^entryLessZero repeat + while not entryLessZero repeat entry := schreierVector.(actelt.point) entryLessZero := (entry < 0) - if ^entryLessZero then + if not entryLessZero then actelt := times(group.entry, actelt) if wordProblem then outlist := append ( words.(entry::NNI) , outlist ) [ actelt , reverse outlist ] @@ -262,7 +262,7 @@ workList := orbitList.pos for j in #workList..1 by -1 repeat newList := cons ( eval ( gen , workList.j ) , newList ) - if ^member?( newList , orbitList ) then + if not member?( newList , orbitList ) then orbitList := cons ( newList , orbitList ) pos := pos + 1 pos := pos - 1 @@ -318,7 +318,7 @@ for i in 1..#newGroup repeat newPoint := orbit.position newPoint := newGroup.i.newPoint - if ^ member? ( newPoint , orbit ) then + if not member? ( newPoint , orbit ) then orbit := cons ( newPoint , orbit ) position := position + 1 schreierVector.newPoint := i @@ -368,8 +368,8 @@ ran := ranelt ( group , words , maxLoops ) str := strip ( ran.elt , ort , group , words ) el2 := str.elt - if ^ testIdentity el2 then - if ^ member?(el2,group2) then + if not testIdentity el2 then + if not member?(el2,group2) then group2 := cons ( el2 , group2 ) if wordProblem then help : L NNI := append ( reverse str.lst , ran.lst ) Index: src/algebra/pgcd.spad.pamphlet =================================================================== --- src/algebra/pgcd.spad.pamphlet (Revision 348) +++ src/algebra/pgcd.spad.pamphlet (Arbeitskopie) @@ -139,12 +139,12 @@ --test if one of the polynomials is the gcd dd=d1 => - if ^((f:=p2 exquo p1) case "failed") then + if not ((f:=p2 exquo p1) case "failed") then return [[u],ltry,p1]$UTerm if dd^=d2 then dd:=(dd-1)::NNI dd=d2 => - if ^((f:=p1 exquo p2) case "failed") then + if not ((f:=p1 exquo p2) case "failed") then return [[u],ltry,p2]$UTerm dd:=(dd-1)::NNI return uterm @@ -337,7 +337,7 @@ (p0:SUPP,p1:SUPP):=(plist.first,plist.2) if completeEval(p0,lvar,lval) ^= lg.first then (p0,p1):=(p1,p0) - ^leadpol => p0 + not leadpol => p0 p0 exquo content(p0) -- Gcd for two multivariate polynomials Index: src/algebra/pleqn.spad.pamphlet =================================================================== --- src/algebra/pleqn.spad.pamphlet (Revision 348) +++ src/algebra/pleqn.spad.pamphlet (Arbeitskopie) @@ -449,7 +449,7 @@ test:=hasoln(zro, [rc.det]) -- zroideal:=ideal(zro) -- inRadical? (p, zroideal) => "incompatible or covered" - ^test.sysok => "incompatible or covered" + not test.sysok => "incompatible or covered" -- The next line is WRONG! cannot replace zro by test.z0 -- zro:=groebner$gb (cons(*/test.n0, test.z0)) zro:=groebner$gb (cons(p,zro)) @@ -549,7 +549,7 @@ zro:=groebner$gb [*/x for x in psbf] inconsistent? zro => [false, zro, nzro] nzro:=[redPol$rp (p,zro) for p in nzro] - nzro:=[p for p in nzro | ^(ground? p)] + nzro:=[p for p in nzro | not (ground? p)] [true, zro, nzro] @@ -596,7 +596,7 @@ minset lset == empty? lset => lset - [x for x in lset | ^(overset?(x,lset))] + [x for x in lset | not (overset?(x,lset))] sqfree p == */[j.factor for j in factors(squareFree p)] Index: src/algebra/qalgset.spad.pamphlet =================================================================== --- src/algebra/qalgset.spad.pamphlet (Revision 348) +++ src/algebra/qalgset.spad.pamphlet (Arbeitskopie) @@ -189,7 +189,7 @@ minset lset == empty? lset => lset - [s for s in lset | ^(overset?(s,lset))] + [s for s in lset | not (overset?(s,lset))] overset?(p,qlist) == empty? qlist => false Index: src/algebra/radeigen.spad.pamphlet =================================================================== --- src/algebra/radeigen.spad.pamphlet (Revision 348) +++ src/algebra/radeigen.spad.pamphlet (Arbeitskopie) @@ -176,7 +176,7 @@ ---- orthogonal basis for a symmetric matrix ---- orthonormalBasis(A:M):List(MRE) == - ^symmetric?(A) => error "the matrix is not symmetric" + not symmetric?(A) => error "the matrix is not symmetric" basis:List(MRE):=[] lvec:List(MRE) := [] alglist:List(RadicalForm):=radicalEigenvectors(A) Index: src/algebra/reclos.spad.pamphlet =================================================================== --- src/algebra/reclos.spad.pamphlet (Revision 348) +++ src/algebra/reclos.spad.pamphlet (Arbeitskopie) @@ -137,7 +137,7 @@ -- res : N := 0 -- lsg := sign(first(l)) -- for term in l repeat --- if ^( (sg := sign(term) ) = 0 ) then +-- if (sg := sign(term) ) ~= 0 then -- if (sg ^= lsg) then res := res + 1 -- lsg := sg -- res @@ -723,7 +723,7 @@ -- varStar(q) = 0 => false q := invert(q) hasVars(addOne(q)) --- ^(varStar(addOne(q)) = 0) +-- (varStar(addOne(q)) ~= 0) coerce(rootChar:$):O == commaSeparate([ hconcat("[" :: O , (rootChar.low)::O), Index: src/algebra/rep2.spad.pamphlet =================================================================== --- src/algebra/rep2.spad.pamphlet (Revision 348) +++ src/algebra/rep2.spad.pamphlet (Arbeitskopie) @@ -320,7 +320,7 @@ --will be checked whether they are in the span of the vectors --computed so far. Of course we stop if we have got the whole --space. - while (^null furtherElts) and (nrows basis < #v) repeat + while (not null furtherElts) and (nrows basis < #v) repeat w : V R := first furtherElts nextVector : M R := matrix list entries w -- normalizing the vector -- will the rank change if we add this nextVector @@ -349,7 +349,7 @@ --will be checked whether they are in the span of the vectors --computed so far. Of course we stop if we have got the whole --space. - while (^null furtherElts) and (nrows basis < #v) repeat + while (not null furtherElts) and (nrows basis < #v) repeat w : V R := first furtherElts nextVector : M R := matrix list entries w -- normalizing the vector -- will the rank change if we add this nextVector Index: src/algebra/solverad.spad.pamphlet =================================================================== --- src/algebra/solverad.spad.pamphlet (Revision 348) +++ src/algebra/solverad.spad.pamphlet (Arbeitskopie) @@ -261,7 +261,7 @@ for f in factors repeat ff:=f.factor - ^ member?(v, variables (ff)) => + not member?(v, variables (ff)) => constants := cons(ff, constants) u := univariate(ff, v) t := reduce u Index: src/algebra/space.spad.pamphlet =================================================================== --- src/algebra/space.spad.pamphlet (Revision 348) +++ src/algebra/space.spad.pamphlet (Arbeitskopie) @@ -587,25 +587,25 @@ space lp space == - if ^space.converted then space := convertSpace space + if not space.converted then space := convertSpace space space.rep3DField.lp lllip space == - if ^space.converted then space := convertSpace space + if not space.converted then space := convertSpace space space.rep3DField.llliPt -- lllp space == --- if ^space.converted then space := convertSpace space +-- if not space.converted then space := convertSpace space -- space.rep3DField.lllPt llprop space == - if ^space.converted then space := convertSpace space + if not space.converted then space := convertSpace space space.rep3DField.llProp lprop space == - if ^space.converted then space := convertSpace space + if not space.converted then space := convertSpace space space.rep3DField.lProp -- this function is just to see how this representation really -- does work objects space == - if ^space.converted then space := convertSpace space + if not space.converted then space := convertSpace space numPts := 0$NNI numCurves := 0$NNI numPolys := 0$NNI @@ -628,13 +628,13 @@ [numPts,numCurves,numPolys,numConstructs] check(s) == - ^s.converted => convertSpace s + not s.converted => convertSpace s s subspace(s) == s.subspaceField coerce(s) == - if ^s.converted then s := convertSpace s + if not s.converted then s := convertSpace s hconcat(["3-Space with "::O, _ (sizo:=#(s.rep3DField.llliPt))::O, _ (sizo=1=>" component"::O;" components"::O)]) Index: src/algebra/special2.spad.pamphlet =================================================================== --- src/algebra/special2.spad.pamphlet (Revision 348) +++ src/algebra/special2.spad.pamphlet (Arbeitskopie) @@ -60,7 +60,7 @@ s*(exp(-l)::(Complex Float)) Gamma(z : Complex Float) : Complex Float == - ^(base()$Float = 2) => + (base()$Float ~= 2) => error "Gamma can only handle base 2 Float-s" l0 := bits() l := max(l0 + 5, 20) @@ -108,7 +108,7 @@ logGamma(z : Complex Float) : Complex Float == - ^(base()$Float = 2) => + (base()$Float ~= 2) => error "Gamma can only handle base 2 Float-s" l0 := bits() l := max(l0 + 5, 20) Index: src/algebra/tex.spad.pamphlet =================================================================== --- src/algebra/tex.spad.pamphlet (Revision 348) +++ src/algebra/tex.spad.pamphlet (Arbeitskopie) @@ -147,8 +147,8 @@ maxPrec : I := 1000000 minPrec : I := 0 - unaryOps : L S := ["-","^"]$(L S) - unaryPrecs : L I := [700,260]$(L I) + unaryOps : L S := ["-"]$(L S) + unaryPrecs : L I := [700]$(L I) -- the precedence of / in the following is relatively low because -- the bar obviates the need for parentheses. Index: src/algebra/vector.spad.pamphlet =================================================================== --- src/algebra/vector.spad.pamphlet (Revision 348) +++ src/algebra/vector.spad.pamphlet (Arbeitskopie) @@ -376,7 +376,7 @@ x = y == for i in 1..dim repeat - ^(qelt(x,i)$Rep = qelt(y,i)$Rep) => return false + (qelt(x,i)$Rep ~= qelt(y,i)$Rep) => return false true -- _and/[qelt(x,i)$Rep = qelt(y,i)$Rep for i in 1..dim] Index: src/algebra/view2D.spad.pamphlet =================================================================== --- src/algebra/view2D.spad.pamphlet (Revision 348) +++ src/algebra/view2D.spad.pamphlet (Arbeitskopie) @@ -280,7 +280,7 @@ plotLists(graf:Rep,listOfListsOfPoints:L L P,listOfPointColors:L PAL,listOfLineColors:L PAL,listOfPointSizes:L PI):$ == givenLen := #listOfListsOfPoints -- take out point lists that are actually empty - listOfListsOfPoints := [ l for l in listOfListsOfPoints | ^null l ] + listOfListsOfPoints := [ l for l in listOfListsOfPoints | not null l ] if (null listOfListsOfPoints) then error "GraphImage was given a list that contained no valid point lists" if ((len := #listOfListsOfPoints) ^= givenLen) then %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% second patch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Index: src/interp/c-util.boot =================================================================== --- src/interp/c-util.boot (Revision 348) +++ src/interp/c-util.boot (Arbeitskopie) @@ -133,7 +133,7 @@ --$ie:= e'' this line is for debugging purposes only deltaContour([[c,:cl],:el],[[c',:cl'],:el']) == - ^el=el' => systemError '"deltaContour" --a cop out for now + not el=el' => systemError '"deltaContour" --a cop out for now eliminateDuplicatePropertyLists contourDifference(c,c') where contourDifference(c,c') == [first x for x in tails c while (x^=c')] eliminateDuplicatePropertyLists contour == Index: src/interp/compiler.boot =================================================================== --- src/interp/compiler.boot (Revision 348) +++ src/interp/compiler.boot (Arbeitskopie) @@ -115,7 +115,7 @@ m is ["Mapping",:.] => compWithMappingMode(x,m,e) m is ["QUOTE",a] => (x=a => [x,m,$e]; nil) STRINGP m => (atom x => (m=x or m=STRINGIMAGE x => [m,m,e]; nil); nil) - ^x or atom x => compAtom(x,m,e) + not x or atom x => compAtom(x,m,e) op:= first x getmode(op,e) is ["Mapping",:ml] and (u:= applyMapping(x,m,e,ml)) => u op=":" => compColon(x,m,e) @@ -821,7 +821,7 @@ ,mmList] mmList.(0) [sig,[pred,val]]:= modemap - #sig^=2 and ^val is ["elt",:.] => nil --what does the second clause do ???? + #sig^=2 and not val is ["elt",:.] => nil --what does the second clause do ???? --+ val := genDeltaEntry [opOf anOp,:modemap] convert([["call",val],first rest sig,E], m) --implies fn calls used to access constants @@ -1234,7 +1234,7 @@ path := pathname args pathnameType path ^= '"spad" => throwKeyedMsg("S2IZ0082", nil) - ^PROBE_-FILE path => throwKeyedMsg("S2IL0003",[namestring args]) + not PROBE_-FILE path => throwKeyedMsg("S2IL0003",[namestring args]) SETQ(_/EDITFILE, path) updateSourceFiles path Index: src/interp/database.boot =================================================================== --- src/interp/database.boot (Revision 348) +++ src/interp/database.boot (Arbeitskopie) @@ -126,8 +126,8 @@ ----- (isDomain *1 ..) for pred in oldList repeat ((pred is [op,pvar,.] and MEMQ(op,'(isDomain ofCategory)) - and pvar=first sig and ^(pvar in rest sig)) or - (^skip and pred is ['isDomain,pvar,.] and pvar="*1")) => + and pvar=first sig and not (pvar in rest sig)) or + (not skip and pred is ['isDomain,pvar,.] and pvar="*1")) => oldList:=delete(pred,oldList) lastPreds:=[pred,:lastPreds] --sayBrightlyNT "lastPreds=" @@ -277,7 +277,7 @@ pred := substitute(patVar,value,pred) patternAlist := nsubst(patVar,value,patternAlist) domainPredicates := substitute(patVar,value,domainPredicates) - if ^MEMQ(value,$FormalMapVariableList) then + if not MEMQ(value,$FormalMapVariableList) then domainPredicates := [["isDomain",patVar,value],:domainPredicates] everything := [pred,patternAlist,domainPredicates] for var in $FormalMapVariableList repeat Index: src/interp/define.boot =================================================================== --- src/interp/define.boot (Revision 348) +++ src/interp/define.boot (Arbeitskopie) @@ -841,7 +841,7 @@ -- those that don't get declarations put into e for a in argl for m in rest sig repeat m1:= getArgumentMode(a,e) => - ^modeEqual(m1,m) => + not modeEqual(m1,m) => stack:= [" ",:bright a,'"must have type ",m, '" not ",m1,'%l,:stack] e:= put(a,'mode,m,e) @@ -1049,7 +1049,7 @@ first u constructMacro (form is [nam,[lam,vl,body]]) == - ^(and/[atom x for x in vl]) => + not (and/[atom x for x in vl]) => stackSemanticError(["illegal parameters for macro: ",vl],nil) ["XLAM",vl':= [x for x in vl | IDENTP x],body] @@ -1357,7 +1357,7 @@ ["DomainSubstitutionMacro",parameters,x] mustInstantiate D == - D is [fn,:.] and ^(MEMQ(fn,$DummyFunctorNames) or GETL(fn,"makeFunctionList")) + D is [fn,:.] and not (MEMQ(fn,$DummyFunctorNames) or GETL(fn,"makeFunctionList")) DomainSubstitutionFunction(parameters,body) == --see optFunctorBody Index: src/interp/g-error.boot =================================================================== --- src/interp/g-error.boot (Revision 348) +++ src/interp/g-error.boot (Arbeitskopie) @@ -147,7 +147,7 @@ TOPLEVEL() returnToReader() == - ^$ReadingFile => returnToTopLevel() + not $ReadingFile => returnToTopLevel() sayBrightly ['" Continuing to read the file...", '%l] THROW('SPAD__READER, nil) Index: src/interp/i-analy.boot =================================================================== --- src/interp/i-analy.boot (Revision 348) +++ src/interp/i-analy.boot (Arbeitskopie) @@ -250,7 +250,7 @@ argModeSetList:= [bottomUp x for x in argl] - if ^tar and opName = "*" and nargs = 2 then + if not tar and opName = "*" and nargs = 2 then [[t1],[t2]] := argModeSetList tar := computeTypeWithVariablesTarget(t1, t2) tar => @@ -462,7 +462,7 @@ -- modesets are the same $genValue and - ^(opName = "=" and argModeSetList is [[m],[=m]] and m is ['Union,:.]) and + not (opName = "=" and argModeSetList is [[m],[=m]] and m is ['Union,:.]) and (u := bottomUpFormUntaggedUnionRetract(t,op,opName,argl,argModeSetList)) => u lookForIt and (u := bottomUpFormTuple(t, op, opName, argl, argModeSetList)) => u @@ -753,15 +753,15 @@ newOps := [mkAtreeNode "elt", mkAtreeNode "apply"] u := nil - while ^u for newOp in newOps repeat + while not u for newOp in newOps repeat newArgs := [op,:argl] if selectMms(newOp, newArgs, target) then RPLAC(CDR form, newArgs) RPLAC(CAR form, newOp) u := bottomUp form - while ^u and ( "and"/[retractAtree(a) for a in newArgs] ) repeat - while ^u for newOp in newOps repeat + while not u and ( "and"/[retractAtree(a) for a in newArgs] ) repeat + while not u for newOp in newOps repeat newArgs := [op,:argl] if selectMms(newOp, newArgs, target) then RPLAC(CDR form, newArgs) Index: src/interp/i-coerce.boot =================================================================== --- src/interp/i-coerce.boot (Revision 348) +++ src/interp/i-coerce.boot (Arbeitskopie) @@ -1030,7 +1030,7 @@ val' := objValUnwrap object predicate := NIL targetType:= NIL - for typ in doms for pred in predList while ^targetType repeat + for typ in doms for pred in predList while not targetType repeat evalSharpOne(pred,val') => predicate := pred targetType := typ @@ -1083,7 +1083,7 @@ u1 := deconstructT t1 1 = #u1 => NIL CAAR u1 ^= CAAR u2 => nil -- constructors not equal - ^valueArgsEqual?(t1, t2) => NIL + not valueArgsEqual?(t1, t2) => NIL -- CAR u1 ^= CAR u2 => NIL top := CAAR u1 u1 := underDomainOf t1 @@ -1131,11 +1131,11 @@ value := true for a1 in CDR t1 for a2 in CDR t2 for cs in coSig for m1 in tl1 for m2 in tl2 while not done repeat - ^cs => + not cs => trip := objNewWrap(a1, m1) newVal := coerceInt(trip, m2) null newVal => (done := true; value := false) - ^algEqual(a2, objValUnwrap newVal, m2) => + not algEqual(a2, objValUnwrap newVal, m2) => (done := true; value := false) value Index: src/interp/i-coerfn.boot =================================================================== --- src/interp/i-coerfn.boot (Revision 348) +++ src/interp/i-coerfn.boot (Arbeitskopie) @@ -1564,7 +1564,7 @@ Un2E(x,source,target) == ['Union,:branches] := source x = '_$fromCoerceable_$ => - and/[canCoerce(t, target) for t in branches | ^ STRINGP t] + and/[canCoerce(t, target) for t in branches | not STRINGP t] coerceUn2E(x,source) --% Variable Index: src/interp/i-funsel.boot =================================================================== --- src/interp/i-funsel.boot (Revision 348) +++ src/interp/i-funsel.boot (Arbeitskopie) @@ -1142,7 +1142,7 @@ not containsVars sig => isFreeFunctionFromMmCond mmC and (m := evalMmFreeFunction(op,tar,sig,mmC)) => mS:= nconc(m,mS) - "or"/[^isValidType(arg) for arg in sig] => nil + "or"/[not isValidType(arg) for arg in sig] => nil [dc,t,:args]:= sig $Coerce or null tar or tar=t => mS:= nconc(findFunctionInDomain(op,dc,t,args,args,NIL,'T),mS) @@ -1625,8 +1625,8 @@ s1=s2 => SL if s1 is ['_:,x,.] then s1:= x if s2 is ['_:,x,.] then s2:= x - if ^atom s1 and CAR s1 = '_# then s1:= LENGTH CADR s1 - if ^atom s2 and CAR s2 = '_# then s2:= LENGTH CADR s2 + if not atom s1 and CAR s1 = '_# then s1:= LENGTH CADR s1 + if not atom s2 and CAR s2 = '_# then s2:= LENGTH CADR s2 s1=s2 => SL isPatternVar s1 => unifyStructVar(s1,s2,SL) isPatternVar s2 => unifyStructVar(s2,s1,SL) Index: src/interp/i-map.boot =================================================================== --- src/interp/i-map.boot (Revision 348) +++ src/interp/i-map.boot (Arbeitskopie) @@ -399,7 +399,7 @@ simplifyMapPattern (x,alias) == for a in alias - for m in $FormalMapVariableList | a and ^CONTAINED(a,x) repeat + for m in $FormalMapVariableList | a and not CONTAINED(a,x) repeat x:= substitute(a,m,x) [lhs,:rhs]:= x rhs := simplifyMapConstructorRefs rhs Index: src/interp/i-output.boot =================================================================== --- src/interp/i-output.boot (Revision 348) +++ src/interp/i-output.boot (Arbeitskopie) @@ -318,7 +318,7 @@ ['PAREN,["|",['AGGLST,:l],pred]] op='Tuple => ['PAREN,['AGGLST,:l]] op='LISTOF => ['AGGLST,:l] - IDENTP op and ^(op in '(_* _*_*) ) and char("*") = (PNAME op).0 => + IDENTP op and not (op in '(_* _*_*) ) and char("*") = (PNAME op).0 => mkSuperSub(op,l) [outputTran op,:l] @@ -484,7 +484,7 @@ firstTime:= true for arg in rest u repeat op:= keyp arg - if ^firstTime and (needBlankForRoot(lastOp,op,arg) or + if not firstTime and (needBlankForRoot(lastOp,op,arg) or needStar(wasSimple,wasQuotient,wasNumber,arg,op) or wasNumber and op = 'ROOT and subspan arg = 1) then d:= APP(BLANK,x,y,d) @@ -585,7 +585,7 @@ wasQuotient or isQuotient op => true wasSimple => atom cur or keyp cur="SUB" or isRationalNumber cur or op="**" or op = "^" or - (atom op and ^NUMBERP op and ^GETL(op,"APP")) + (atom op and not NUMBERP op and not GETL(op,"APP")) wasNumber => NUMBERP(cur) or isRationalNumber cur or ((op="**" or op ="^") and NUMBERP(CADR cur)) @@ -599,7 +599,7 @@ w:= 0 for arg in rest u repeat op:= keyp arg - if ^firstTime and needStar(wasSimple,wasQuotient,wasNumber,arg,op) then + if not firstTime and needStar(wasSimple,wasQuotient,wasNumber,arg,op) then w:= w+1 if infixArgNeedsParens(arg, rightPrec, "left") then w:= w+2 w:= w+WIDTH arg @@ -907,20 +907,20 @@ -- deleteAssoc no longer exists $MatrixList := delete(u,$MatrixList) maPrin ['EQUATNUM,n,rest u] - if ^$collectOutput then TERPRI $algebraOutputStream + if not $collectOutput then TERPRI $algebraOutputStream maPrin x maPrin x -- above line added JHD 13/2/93 since otherwise x gets lost maprinRows matrixList == - if ^$collectOutput then TERPRI($algebraOutputStream) + if not $collectOutput then TERPRI($algebraOutputStream) while matrixList repeat y:=NREVERSE matrixList --Makes the matrices come out in order, since CONSed on backwards matrixList:=nil firstName := first first y for [name,:m] in y for n in 0.. repeat - if ^$collectOutput then TERPRI($algebraOutputStream) + if not $collectOutput then TERPRI($algebraOutputStream) andWhere := (name = firstName => '"where "; '"and ") line := STRCONC(andWhere, PNAME name) maprinChk ["=",line,m] @@ -1245,16 +1245,16 @@ spadPrint(x,m) == m = $NoValueMode => x - if ^$collectOutput then TERPRI $algebraOutputStream + if not $collectOutput then TERPRI $algebraOutputStream output(x,m) - if ^$collectOutput then TERPRI $algebraOutputStream + if not $collectOutput then TERPRI $algebraOutputStream formulaFormat expr == sff := '(ScriptFormulaFormat) formatFn := getFunctionFromDomain("coerce",sff,[$OutputForm]) displayFn := getFunctionFromDomain("display",sff,[sff]) SPADCALL(SPADCALL(expr,formatFn),displayFn) - if ^$collectOutput then + if not $collectOutput then TERPRI $algebraOutputStream FORCE_-OUTPUT $formulaOutputStream NIL @@ -1306,7 +1306,7 @@ if $formulaFormat then formulaFormat x if $fortranFormat then dispfortexp x - if ^$collectOutput then TERPRI $fortranOutputStream + if not $collectOutput then TERPRI $fortranOutputStream FORCE_-OUTPUT $fortranOutputStream if $algebraFormat then mathprintWithNumber x @@ -1403,7 +1403,7 @@ printMap1(x,initialFlag and x is [[n],:.] and n=1) for y in l repeat (printBasic " , "; printMap1(y,initialFlag)) printBasic specialChar 'rbrk - if ^$collectOutput then TERPRI $algebraOutputStream + if not $collectOutput then TERPRI $algebraOutputStream isInitialMap u == u is [[[n],.],:l] and INTEGERP n and @@ -1423,7 +1423,7 @@ PRIN0(x,$algebraOutputStream) charybdis(u,start,linelength) == - EQ(keyp u,'EQUATNUM) and ^(CDDR u) => + EQ(keyp u,'EQUATNUM) and not (CDDR u) => charybdis(['PAREN,u.1],start,linelength) charyTop(u,start,linelength) @@ -1553,7 +1553,7 @@ m:= rest v WIDTH v.1 > linelength-2 => charybdis(v.1,start+2,linelength-2) - ^(CDDR v) => '" " + not (CDDR v) => '" " dm:= CDDR v ddm:= rest dm split2(u,dm,ddm,start,linelength) @@ -1580,7 +1580,7 @@ charyElse(u,v,start,linelength) == charybdis(v.1,start+3,linelength-3) - ^(CDDR u) => '" " + not (CDDR u) => '" " prnd(start,'",") charybdis(['ELSE,:CDDR v],start,linelength) '" " @@ -1603,7 +1603,7 @@ absym x == (NUMBERP x) and (MINUSP x) => -x - ^(atom x) and (keyp(x) = '_-) => CADR x + not (atom x) and (keyp(x) = '_-) => CADR x x agg(n,u) == @@ -1671,7 +1671,7 @@ true => appargs(rest u, 1 + temp, y, temparg2) apprpar(x, y, y1, y2, d) == - (^(_*TALLPAR) or (y2 - y1 < 2)) => APP('")", x, y, d) + (not (_*TALLPAR) or (y2 - y1 < 2)) => APP('")", x, y, d) true => APP('")", x, y2, apprpar1(x, y, y1, y2 - 1, d)) apprpar1(x, y, y1, y2, d) == @@ -1679,7 +1679,7 @@ true => APP('")", x, y2, apprpar1(x, y, y1, y2 - 1, d)) applpar(x, y, y1, y2, d) == - (^(_*TALLPAR) or (y2 - y1 < 2)) => APP('"(", x, y, d) + (not (_*TALLPAR) or (y2 - y1 < 2)) => APP('"(", x, y, d) true => APP('"(", x, y2, applpar1(x, y, y1, y2 - 1, d)) applpar1(x, y, y1, y2, d) == @@ -1711,7 +1711,7 @@ temp := 1 + WIDTH agg(2,u) + WIDTH agg(3,u) n := MAX(WIDTH CADR u, WIDTH agg(4,u), temp) if EQCAR(first(z := agg(5,u)), 'EXT) and - (EQ(n,3) or (n > 3 and ^(atom z)) ) then + (EQ(n,3) or (n > 3 and not (atom z)) ) then n := 1 + n d := APP(z, x + n, y, d) @@ -1721,7 +1721,7 @@ syminusp x == NUMBERP x => MINUSP x - ^(atom x) and EQ(keyp x,'_-) + not (atom x) and EQ(keyp x,'_-) appsum(u, x, y, d) == null u => d @@ -1844,7 +1844,7 @@ y := first x u := remWidth(REVERSEWOC(CONS('" ", rest x))) charybdis(u, i, n) - if ^$collectOutput then TERPRI $algebraOutputStream + if not $collectOutput then TERPRI $algebraOutputStream charybdis(CONS('ELSE, LIST y), i, n) '" " @@ -2132,7 +2132,7 @@ WIDTH u.1 + sumWidthA CDDR u sumWidthA u == - ^u => 0 + not u => 0 ( member(keyp absym first u,'(_+ _-)) => 5; true => 3) + WIDTH absym first u + sumWidthA rest u @@ -2300,7 +2300,7 @@ binomialWidth u == 2 + MAX(WIDTH u.1, WIDTH u.2) mathPrint u == - if ^$collectOutput then TERPRI $algebraOutputStream + if not $collectOutput then TERPRI $algebraOutputStream (u := STRINGP mathPrint1(mathPrintTran u, nil) => PSTRING u; nil) @@ -2312,9 +2312,9 @@ u mathPrint1(x,fg) == - if fg and ^$collectOutput then TERPRI $algebraOutputStream + if fg and not $collectOutput then TERPRI $algebraOutputStream maPrin x - if fg and ^$collectOutput then TERPRI $algebraOutputStream + if fg and not $collectOutput then TERPRI $algebraOutputStream maPrin u == null u => nil @@ -2327,9 +2327,9 @@ sayKeyedMsg("S2IX0009",NIL) u is ['EQUATNUM,num,form] or u is [['EQUATNUM,:.],num,form] => charybdis(['EQUATNUM,num], $MARGIN, $LINELENGTH) - if ^$collectOutput then + if not $collectOutput then TERPRI $algebraOutputStream PRETTYPRINT(form,$algebraOutputStream) form - if ^$collectOutput then PRETTYPRINT(u,$algebraOutputStream) + if not $collectOutput then PRETTYPRINT(u,$algebraOutputStream) nil Index: src/interp/i-resolv.boot =================================================================== --- src/interp/i-resolv.boot (Revision 348) +++ src/interp/i-resolv.boot (Arbeitskopie) @@ -176,7 +176,7 @@ t2 isnt ['Union,:doms2] => ud := nil bad := nil - for d in doms while ^bad repeat + for d in doms while not bad repeat d = '"failed" => ud := [d,:ud] null (d' := resolveTT(d,t2)) => bad := true ud := [d',:ud] @@ -184,7 +184,7 @@ ['Union,:REMDUP reverse ud] ud := nil bad := nil - for d in doms2 while ^bad repeat + for d in doms2 while not bad repeat d = '"failed" => ud := append(ud,[d]) null (d' := resolveTTUnion(t1,d)) => bad := true ud := append(ud,CDR d') @@ -577,7 +577,7 @@ ums := REMDUP spliceTypeListForEmptyMode(uts,ums) bad := nil doms := nil - for ut in uts while ^bad repeat + for ut in uts while not bad repeat (m' := resolveTMUnion(ut,['Union,:ums])) => doms := append(CDR m',doms) bad := true Index: src/interp/i-spec1.boot =================================================================== --- src/interp/i-spec1.boot (Revision 348) +++ src/interp/i-spec1.boot (Arbeitskopie) @@ -989,7 +989,7 @@ tar is ['Record,:types] => upRecordConstruct(op,l,tar) isTaggedUnion tar => upTaggedUnionConstruct(op,l,tar) aggs := '(List) - if tar and PAIRP(tar) and ^isPartialMode(tar) then + if tar and PAIRP(tar) and not isPartialMode(... [truncated message content] |