diff options
author | dos-reis <gdr@axiomatics.org> | 2010-05-30 20:06:08 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-05-30 20:06:08 +0000 |
commit | b34d97dda5ce8c88d31412d11b1ad67da058480e (patch) | |
tree | 55222ea664797f046a2e7a8f807d36fb59438419 /src/algebra/integer.spad.pamphlet | |
parent | ded226fca8f3a75d33602a7fbbc941c55e985fdf (diff) | |
download | open-axiom-b34d97dda5ce8c88d31412d11b1ad67da058480e.tar.gz |
* interp/c-util.boot (middleEndExpand): Tidy.
* interp/g-util.boot (expandToVMForm): Likewise.
(expandStore): Refine store to pair components.
* algebra/any.spad.pamphlet (Scope): Use builtin operators.
(Environment): Likewise.
* algebra/domain.spad.pamphlet (FunctionDescriptor): Likewise.
(ConstructorCall): Likewise.
(FunctorData): Likewise.
(OperatorSignature): Likewise.
(Category): Likewise.
(Domain): Likewise.
* algebra/integer.spad.pamphlet (Integer): Likewise.
(NonNegativeInteger): Likewise.
* algebra/outform.spad.pamphlet: Likewise.
* algebra/si.spad.pamphlet (SingleInteger): Likewise.
* algebra/syntax.spad.pamphlet (Syntax): Likewise.
Diffstat (limited to 'src/algebra/integer.spad.pamphlet')
-rw-r--r-- | src/algebra/integer.spad.pamphlet | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet index c2bcb16f..2ca80be3 100644 --- a/src/algebra/integer.spad.pamphlet +++ b/src/algebra/integer.spad.pamphlet @@ -174,29 +174,30 @@ Integer: Join(IntegerNumberSystem, ConvertibleTo String, OpenMath) with Record(mat:Matrix(Integer), vec:Vector(Integer)) == [m pretend Matrix(Integer), vec pretend Vector(Integer)] - abs(x) == ABS(x)$Lisp + abs(x) == %iabs(x)$Foreign(Builtin) random() == random()$Lisp random(x) == RANDOM(x)$Lisp - x = y == EQL(x,y)$Lisp - x < y == (x<y)$Lisp - x > y == (x > y)$Lisp -- Don't rely on default; help the inliner - x <= y == (x <= y)$Lisp -- Ditto - x >= y == (x >= y)$Lisp -- Ditto + x = y == %ieq(x,y)$Foreign(Builtin) + x < y == %ilt(x,y)$Foreign(Builtin) + x > y == %igt(x,y)$Foreign(Builtin) + x <= y == %ile(x,y)$Foreign(Builtin) + x >= y == %ige(x,y)$Foreign(Builtin) - x == (-x)$Lisp - x + y == (x+y)$Lisp - x - y == (x-y)$Lisp - x * y == (x*y)$Lisp - (m:Integer) * (y:%) == (m*y)$Lisp -- for subsumption problem - x ** n == EXPT(x,n)$Lisp - odd? x == ODDP(x)$Lisp - max(x,y) == MAX(x,y)$Lisp - min(x,y) == MIN(x,y)$Lisp + x + y == %iadd(x,y)$Foreign(Builtin) + x - y == %isub(x,y)$Foreign(Builtin) + x * y == %imul(x,y)$Foreign(Builtin) + (m:Integer) * (y:%) == + %imul(m,y)$Foreign(Builtin) -- for subsumption problem + x ** n == %ipow(x,n)$Foreign(Builtin) + odd? x == %iodd?(x)$Foreign(Builtin) + max(x,y) == %imax(x,y)$Foreign(Builtin) + min(x,y) == %imin(x,y)$Foreign(Builtin) divide(x,y) == DIVIDE2(x,y)$Lisp x quo y == QUOTIENT2(x,y)$Lisp x rem y == REMAINDER2(x,y)$Lisp shift(x, y) == ASH(x,y)$Lisp recip(x) == if one? x or x=-1 then x else "failed" - gcd(x,y) == GCD(x,y)$Lisp + gcd(x,y) == %igcd(x,y)$Foreign(Builtin) UCA ==> Record(unit:%,canonical:%,associate:%) unitNormal x == x < 0 => [-1,-x,-1]$UCA @@ -271,7 +272,7 @@ NonNegativeInteger: Join(OrderedAbelianMonoidSup,Monoid) with == SubDomain(Integer,#1 >= 0) add x,y:% - sup(x,y) == MAX(x,y)$Lisp + sup(x,y) == %imax(x,y)$Foreign(Builtin) shift(x:%, n:Integer):% == ASH(x,n)$Lisp subtractIfCan(x, y) == c:Integer := rep x - rep y |