diff options
author | dos-reis <gdr@axiomatics.org> | 2011-03-12 01:01:24 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-03-12 01:01:24 +0000 |
commit | 4a92a0cc2bca6807ea4362797cfe6939bad4889b (patch) | |
tree | 5394491ae9aa1433eb2d3d8971205875ec557750 /src/algebra | |
parent | 6672aec6078bc810e4fb018168a8ea1d9959a186 (diff) | |
download | open-axiom-4a92a0cc2bca6807ea4362797cfe6939bad4889b.tar.gz |
* algebra/catdef.spad.pamphlet (OrderedAbelianGroup): Export
negative?, abs, sign, with default implementations.
(OrderedAbelianMonoid): Export positive?, with default.
(OrderedRing): Don't export them.
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/Makefile.in | 10 | ||||
-rw-r--r-- | src/algebra/catdef.spad.pamphlet | 55 |
2 files changed, 34 insertions, 31 deletions
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 554fbf18..2441b559 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -388,7 +388,8 @@ strap-1/TRANFUN.$(FASLEXT): strap-1/TRIGCAT.$(FASLEXT) \ strap-1/ATRIG.$(FASLEXT) strap-1/HYPCAT.$(FASLEXT) \ strap-1/AHYP.$(FASLEXT) strap-1/INS.$(FASLEXT): strap-1/DFLOAT.$(FASLEXT) -strap-1/DFLOAT.$(FASLEXT): strap-1/FPS.$(FASLEXT) strap-1/TRANFUN.$(FASLEXT) +strap-1/DFLOAT.$(FASLEXT): strap-1/FPS.$(FASLEXT) \ + strap-1/TRANFUN.$(FASLEXT) strap-1/SEXCAT.$(FASLEXT): strap-1/KVTFROM.$(FASLEXT) strap-1/POLYCAT.$(FASLEXT): strap-1/SEXCAT.$(FASLEXT) strap-1/QFCAT.$(FASLEXT): strap-1/FEVALAB.$(FASLEXT) \ @@ -407,7 +408,7 @@ strap-1/FSAGG.$(FASLEXT): strap-1/DIAGG.$(FASLEXT) strap-1/CHAR.$(FASLEXT): strap-1/FSAGG.$(FASLEXT) strap-1/STRING.$(FASLEXT): strap-1/SRAGG.$(FASLEXT) strap-1/CHAR.$(FASLEXT) \ strap-1/ISTRING.$(FASLEXT) -strap-1/INT.$(FASLEXT): strap-1/STRING.$(FASLEXT) +strap-1/INT.$(FASLEXT): strap-1/STRING.$(FASLEXT) strap-1/ORDRING.$(FASLEXT) strap-1/SINT.$(FASLEXT): strap-1/INT.$(FASLEXT) strap-1/ORDFIN.$(FASLEXT) \ strap-1/BOOLE.$(FASLEXT) strap-1/LIST.$(FASLEXT): strap-1/ILIST.$(FASLEXT) strap-1/STRING.$(FASLEXT) @@ -823,7 +824,8 @@ axiom_algebra_layer_0 = \ BMODULE BASTYPE BASTYPE- STEP LMODULE \ RMODULE ALGEBRA ALGEBRA- SGROUP SGROUP- ABELSG \ ABELSG- ORDSET OASGP FILECAT SEXCAT \ - MODULE MODULE- PID OAGROUP OCAMON OAMON \ + MODULE MODULE- PID OAGROUP OAGROUP- OCAMON \ + OAMON OAMON- \ RNG ORDFIN LLINSET RLINSET LINSET OAMONS \ MKBCFUNC MKRECORD MKUCFUNC DROPT1 PLOT1 ITFUN2 \ ITFUN3 STREAM1 STREAM2 STREAM3 ANY1 SEGBIND2 \ @@ -915,7 +917,7 @@ axiom_algebra_layer_1 = \ GCDDOM GCDDOM- UFD UFD- ES ES- \ PATAB PPCURVE PSCURVE CACHSET RESLATC \ IDENT OUTFORM BINDING BOOLEAN \ - ORDRING ORDRING- FEVALAB FEVALAB- IARRAY1 \ + ORDRING FEVALAB FEVALAB- IARRAY1 \ OSGROUP MAYBE DATAARY PROPLOG HOMOTOP BYTEORD \ FIELD FIELD- VECTCAT VECTCAT- \ PROPERTY ARITY OPERCAT OPERCAT- PAIR STREAM \ diff --git a/src/algebra/catdef.spad.pamphlet b/src/algebra/catdef.spad.pamphlet index 7dfc10fc..fdb915fa 100644 --- a/src/algebra/catdef.spad.pamphlet +++ b/src/algebra/catdef.spad.pamphlet @@ -1271,7 +1271,7 @@ Monoid(): Category == SemiGroup with )abbrev category OAGROUP OrderedAbelianGroup ++ Author: ++ Date Created: -++ Date Last Updated: +++ Date Last Updated: March 10, 2011 ++ Basic Functions: ++ Related Constructors: ++ Also See: @@ -1283,9 +1283,26 @@ Monoid(): Category == SemiGroup with ++ the ordering. OrderedAbelianGroup(): Category == - Join(OrderedCancellationAbelianMonoid, AbelianGroup) - + Join(OrderedCancellationAbelianMonoid, AbelianGroup) with + negative?: % -> Boolean + ++ \spad{negative?(x)} holds when \spad{x} is less than \spad{0}. + sign: % -> Integer + ++ \spad{sign(x)} is \spad{1} if \spad{x} is positive, + ++ \spad{-1} if \spad{x} is negative, and \spad{0} otherwise. + abs: % -> % + ++ \spad{abs(x)} returns the absolute value of \spad{x}. + add + negative? x == x < 0 + sign x == + positive? x => 1 + negative? x => -1 + 0 + abs x == + positive? x => x + negative? x => -x + 0 @ + \section{category OAMON OrderedAbelianMonoid} <<category OAMON OrderedAbelianMonoid>>= )abbrev category OAMON OrderedAbelianMonoid @@ -1303,7 +1320,12 @@ OrderedAbelianGroup(): Category == ++ preserves the ordering. OrderedAbelianMonoid(): Category == - Join(OrderedAbelianSemiGroup, AbelianMonoid) + Join(OrderedAbelianSemiGroup, AbelianMonoid) with + positive?: % -> Boolean + ++ \spad{positive?(x)} holds when \spad{x} is greater + ++ than \spad{0}. + add + positive? x == 0 < x @ \section{category OAMONS OrderedAbelianMonoidSup} @@ -1456,7 +1478,7 @@ OrderedMonoid(): Category == Join(OrderedSemiGroup, Monoid) )abbrev category ORDRING OrderedRing ++ Author: ++ Date Created: -++ Date Last Updated: +++ Date Last Updated: March 10, 2011 ++ Basic Functions: ++ Related Constructors: ++ Also See: @@ -1470,28 +1492,7 @@ OrderedMonoid(): Category == Join(OrderedSemiGroup, Monoid) ++ Axiom: ++ \spad{0<a and b<c => ab< ac} -OrderedRing(): Category == Join(OrderedAbelianGroup,Ring,Monoid) with - positive?: % -> Boolean - ++ positive?(x) tests whether x is strictly greater than 0. - negative?: % -> Boolean - ++ negative?(x) tests whether x is strictly less than 0. - sign : % -> Integer - ++ sign(x) is 1 if x is positive, -1 if x is negative, 0 if x equals 0. - abs : % -> % - ++ abs(x) returns the absolute value of x. - add - positive? x == x>0 - negative? x == x<0 - sign x == - positive? x => 1 - negative? x => -1 - zero? x => 0 - error "x satisfies neither positive?, negative? or zero?" - abs x == - positive? x => x - negative? x => -x - zero? x => 0 - error "x satisfies neither positive?, negative? or zero?" +OrderedRing(): Category == Join(OrderedAbelianGroup,Ring,Monoid) @ |