aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2010-06-29 04:23:10 +0000
committerdos-reis <gdr@axiomatics.org>2010-06-29 04:23:10 +0000
commit77a6173c9fe922e29a8a4df966a204cf14cc9267 (patch)
tree52233057d0fb51d71b7e6ae72e20936461166202 /src/algebra
parentcf1ea01dcda480d3f9dc1dc53cf2ec7d0cfbf68e (diff)
downloadopen-axiom-77a6173c9fe922e29a8a4df966a204cf14cc9267.tar.gz
* algebra/catdef.spad.pamphlet (OrderedType): New category.
Extend BasicType.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.pamphlet3
-rw-r--r--src/algebra/catdef.spad.pamphlet42
-rw-r--r--src/algebra/exposed.lsp.pamphlet1
3 files changed, 44 insertions, 2 deletions
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index c776844e..ac8b758f 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -297,6 +297,7 @@ $(OUT)/DIFFMOD.$(FASLEXT): $(OUT)/DIFFSPC.$(FASLEXT)
$(OUT)/PDDOM.$(FASLEXT): $(OUT)/TYPE.$(FASLEXT)
$(OUT)/PDSPC.$(FASLEXT): $(OUT)/PDDOM.$(FASLEXT)
$(OUT)/DSEXT.$(FASLEXT): $(OUT)/DIFFSPC.$(FASLEXT) $(OUT)/PDSPC.$(FASLEXT)
+$(OUT)/ORDTYPE.$(FASLEXT): $(OUT)/BASTYPE.$(FASLEXT)
axiom_algebra_layer_0 = \
AHYP ATTREG CFCAT ELTAB KOERCE KONVERT \
@@ -324,7 +325,7 @@ axiom_algebra_layer_0 = \
LIST DIFFDOM DIFFDOM- DIFFSPC DIFFSPC- DIFFMOD \
LINEXP PATMAB REAL CHARZ LOGIC LOGIC- \
RTVALUE SYSPTR PDDOM PDDOM- PDSPC PDSPC- \
- DSEXT DSEXT-
+ DSEXT DSEXT- ORDTYPE ORDTYPE-
axiom_algebra_layer_0_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_0))
diff --git a/src/algebra/catdef.spad.pamphlet b/src/algebra/catdef.spad.pamphlet
index 4b0eb27e..b67de306 100644
--- a/src/algebra/catdef.spad.pamphlet
+++ b/src/algebra/catdef.spad.pamphlet
@@ -227,6 +227,45 @@ BasicType(): Category == Type with
@
+\section{Ordered Types}
+
+<<category ORDTYPE OrderedType>>=
+)abbrev category ORDTYPE OrderedType
+++ Author: Gabriel Dos Reis
+++ Date Created: June 28, 2010
+++ Date Last Modified: June 28, 2010
+++ See Also: OrderedSet
+++ Description:
+++ Category of types equipped with a total ordering.
+++ Axioms:
+++ forall(x,y)
+++ x > y = y < x
+++ x <= y = not(y > x)
+++ x >= y = not(x < y)
+OrderedType(): Category == BasicType with
+ < : (%,%) -> Boolean
+ ++ \spad{x < y} holds if \spad{x} is less than \spad{y} in the
+ ++ current domain.
+ > : (%,%) -> Boolean
+ ++ \spad{x > y} holds if \spad{x} is greater than \spad{y} in the
+ ++ current domain.
+ <= : (%,%) -> Boolean
+ ++ \spad{x <= y} holds if \spad{x} is less or equal than \spad{y}
+ ++ in the current domain.
+ >= : (%,%) -> Boolean
+ ++ \spad{x <= y} holds if \spad{x} is greater or equal than \spad{y}
+ ++ in the current domain.
+ add
+ import %before?: (%,%) -> Boolean from Foreign Builtin
+ x < y == %before?(x,y)
+ x > y == y < x
+ x <= y == not(y < x)
+ x >= y == not(x < y)
+ x = y == not(x < y) and not(y < x)
+
+@
+
+
\section{category BMODULE BiModule}
<<category BMODULE BiModule>>=
@@ -1971,7 +2010,7 @@ VectorSpace(S:Field): Category == Module(S) with
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
---Copyright (C) 2007-2009, Gabriel Dos Reis.
+--Copyright (C) 2007-2010, Gabriel Dos Reis.
--All rights reversed.
--
--Redistribution and use in source and binary forms, with or without
@@ -2006,6 +2045,7 @@ VectorSpace(S:Field): Category == Module(S) with
<<license>>
<<category BASTYPE BasicType>>
+<<category ORDTYPE OrderedType>>
<<category SETCAT SetCategory>>
<<category STEP StepThrough>>
<<category SGROUP SemiGroup>>
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index 89d16fa8..66f6278f 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -733,6 +733,7 @@
(|OrderedMultisetAggregate| . OMSAGG)
(|OrderedRing| . ORDRING)
(|OrderedSet| . ORDSET)
+ (|OrderedType| . ORDTYPE)
(|OutputByteConduit| . OUTBCON)
(|PAdicIntegerCategory| . PADICCT)
(|PartialDifferentialDomain| . PDDOM)