Martin Rubey <[EMAIL PROTECTED]> writes:

> Gabriel Dos Reis <[EMAIL PROTECTED]> writes:
> 
> > The use of operator ^ for logical negation is discontinued, starting
> > from release 1.3.0.  
> 
> This is an extremely good idea!  It made compilation of SPAD files an
> adventure, because who would think that the compiler would interpret ^ as
> negation...
> 
> Can we have this in FriCAS too, please!

Oh, I just realised that it's an algebra change.  Anyone against applying the
patch (taken from Open-Axiom using svn diff, not yet tested) below?

Martin

Index: src/algebra/listgcd.spad.pamphlet
===================================================================
--- src/algebra/listgcd.spad.pamphlet   (Revision 768)
+++ 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 not (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/modgcd.spad.pamphlet
===================================================================
--- src/algebra/modgcd.spad.pamphlet    (Revision 768)
+++ 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/pgcd.spad.pamphlet
===================================================================
--- src/algebra/pgcd.spad.pamphlet      (Revision 768)
+++ 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
@@ -338,7 +338,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/solverad.spad.pamphlet
===================================================================
--- src/algebra/solverad.spad.pamphlet  (Revision 768)
+++ 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/ddfact.spad.pamphlet
===================================================================
--- src/algebra/ddfact.spad.pamphlet    (Revision 768)
+++ 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/aggcat.spad.pamphlet
===================================================================
--- src/algebra/aggcat.spad.pamphlet    (Revision 768)
+++ src/algebra/aggcat.spad.pamphlet    (Arbeitskopie)
@@ -2684,9 +2684,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}.
@@ -2705,7 +2702,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/gaussfac.spad.pamphlet
===================================================================
--- src/algebra/gaussfac.spad.pamphlet  (Revision 768)
+++ 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/gbintern.spad.pamphlet
===================================================================
--- src/algebra/gbintern.spad.pamphlet  (Revision 768)
+++ 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/color.spad.pamphlet
===================================================================
--- src/algebra/color.spad.pamphlet     (Revision 768)
+++ 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/newpoint.spad.pamphlet
===================================================================
--- src/algebra/newpoint.spad.pamphlet  (Revision 768)
+++ 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/mfinfact.spad.pamphlet
===================================================================
--- src/algebra/mfinfact.spad.pamphlet  (Revision 768)
+++ 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/multsqfr.spad.pamphlet
===================================================================
--- src/algebra/multsqfr.spad.pamphlet  (Revision 768)
+++ 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/radeigen.spad.pamphlet
===================================================================
--- src/algebra/radeigen.spad.pamphlet  (Revision 768)
+++ 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/ghensel.spad.pamphlet
===================================================================
--- src/algebra/ghensel.spad.pamphlet   (Revision 768)
+++ 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/multfact.spad.pamphlet
===================================================================
--- src/algebra/multfact.spad.pamphlet  (Revision 768)
+++ 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/idecomp.spad.pamphlet
===================================================================
--- src/algebra/idecomp.spad.pamphlet   (Revision 768)
+++ 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
@@ -162,7 +162,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?  ----
@@ -176,7 +176,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
@@ -227,7 +227,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
@@ -301,13 +301,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
 
@@ -355,7 +355,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
@@ -384,7 +384,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/fortran.spad.pamphlet
===================================================================
--- src/algebra/fortran.spad.pamphlet   (Revision 768)
+++ src/algebra/fortran.spad.pamphlet   (Arbeitskopie)
@@ -974,7 +974,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)
@@ -990,7 +990,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
@@ -998,7 +998,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
@@ -1010,7 +1010,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
@@ -1101,7 +1101,7 @@
         kLength2 := mat2Dims.3
 
         -- check that the dimensions are the same
-        (^(iLength1 = iLength2) or ^(jLength1 = jLength2) or ^(kLength1 = 
kLength2))_
+        (not (iLength1 = iLength2) or not (jLength1 = jLength2) or 
not(kLength1 = kLength2))_
          => error "error the matrices are different sizes"
 
         sum : R
@@ -1133,10 +1133,10 @@
 
       --first check that the matrix is in the correct form
       for subList in listRep repeat
-        ^((#subList)$(L L R) = jLength) => error_
+        not((#subList)$(L L R) = jLength) => error_
  "can not have an irregular shaped matrix"
         for subSubList in subList repeat
-          ^((#(subSubList))$(L R) = kLength) => error_
+          not((#(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/groebsol.spad.pamphlet
===================================================================
--- src/algebra/groebsol.spad.pamphlet  (Revision 768)
+++ src/algebra/groebsol.spad.pamphlet  (Arbeitskopie)
@@ -137,7 +137,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
@@ -175,7 +175,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)
@@ -200,7 +200,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/boolean.spad.pamphlet
===================================================================
--- src/algebra/boolean.spad.pamphlet   (Revision 768)
+++ src/algebra/boolean.spad.pamphlet   (Arbeitskopie)
@@ -356,7 +356,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:
@@ -367,8 +367,6 @@
       ++ true is a logical constant.
     false: %
       ++ false is a logical constant.
-    _^    : % -> %
-      ++ ^ n returns the negation of n.
     xor    : (%, %) -> %
       ++ xor(a,b) returns the logical exclusive {\em or}
       ++ of Boolean \spad{a} and b.
@@ -388,7 +386,6 @@
     false         == NIL$Lisp
     sample()      == true
     not b         == (b => false; true)
-    _^ b          == (b => false; true)
     _~ b          == (b => false; true)
     _and(a, b)    == (a => b; false)
     _/_\(a, b)    == (a => b; false)
Index: src/algebra/space.spad.pamphlet
===================================================================
--- src/algebra/space.spad.pamphlet     (Revision 768)
+++ 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/indexedp.spad.pamphlet
===================================================================
--- src/algebra/indexedp.spad.pamphlet  (Revision 768)
+++ 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/rep2.spad.pamphlet
===================================================================
--- src/algebra/rep2.spad.pamphlet      (Revision 768)
+++ 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/ideal.spad.pamphlet
===================================================================
--- src/algebra/ideal.spad.pamphlet     (Revision 768)
+++ 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/npcoef.spad.pamphlet
===================================================================
--- src/algebra/npcoef.spad.pamphlet    (Revision 768)
+++ 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/gbeuclid.spad.pamphlet
===================================================================
--- src/algebra/gbeuclid.spad.pamphlet  (Revision 768)
+++ 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/pleqn.spad.pamphlet
===================================================================
--- src/algebra/pleqn.spad.pamphlet     (Revision 768)
+++ 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/permgrps.spad.pamphlet
===================================================================
--- src/algebra/permgrps.spad.pamphlet  (Revision 768)
+++ 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
@@ -372,8 +372,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/qalgset.spad.pamphlet
===================================================================
--- src/algebra/qalgset.spad.pamphlet   (Revision 768)
+++ 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/view2D.spad.pamphlet
===================================================================
--- src/algebra/view2D.spad.pamphlet    (Revision 768)
+++ 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


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to