aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-06-18 00:47:44 +0000
committerdos-reis <gdr@axiomatics.org>2013-06-18 00:47:44 +0000
commit5d68f2651a08223febcc172a6cb49a6e92899034 (patch)
treedfea7ee6418af2cb05fd0747facf7ff92b4fa1c9 /src/algebra
parent7db3376a614a5aeacc114c38002ea65e57046dc5 (diff)
downloadopen-axiom-5d68f2651a08223febcc172a6cb49a6e92899034.tar.gz
* algebra/catdef.spad.pamphlet (CommutativeOperatorCategory): New.
(CommutativeOperation): Likewise. * algebra/Makefile.am (oa_algebra_layer_0): Include them.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.am6
-rw-r--r--src/algebra/Makefile.in15
-rw-r--r--src/algebra/catdef.spad.pamphlet35
-rw-r--r--src/algebra/exposed.lsp.pamphlet2
4 files changed, 48 insertions, 10 deletions
diff --git a/src/algebra/Makefile.am b/src/algebra/Makefile.am
index 7a9e12eb..62706b10 100644
--- a/src/algebra/Makefile.am
+++ b/src/algebra/Makefile.am
@@ -1654,9 +1654,13 @@ $(OUT)/SYMBOL.$(FASLEXT): $(OUT)/ORDSET.$(FASLEXT) \
strap-2/PRIMARR.$(FASLEXT) strap-2/REF.$(FASLEXT) \
strap-2/STRING.$(FASLEXT)
+$(OUT)/COMOPC.$(FASLEXT): $(OUT)/BINOPC.$(FASLEXT)
+
+$(OUT)/COMOP.$(FASLEXT): $(OUT)/COMOPC.$(FASLEXT) $(OUT)/KOERCE.$(FASLEXT)
+
oa_algebra_layer_0 = \
TYPE BINOPC BINOP IDEMOPC SGPOPC SGPOP \
- MONOPC FUNCTOR \
+ MONOPC FUNCTOR COMOPC COMOP \
BASTYPE BASTYPE- SETCAT SETCAT- SGROUP SGROUP- \
LLINSET RLINSET LINSET ABELSG ABELSG- CHARNZ \
ABELGRP ABELGRP- ABELMON ABELMON- ORDTYPE ORDTYPE- \
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index 7b6df916..7a245f7c 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -683,7 +683,6 @@ SPADFILES = \
$(OUTSRC)/sign.spad $(OUTSRC)/si.spad $(OUTSRC)/smith.spad \
$(OUTSRC)/solvedio.spad $(OUTSRC)/solvefor.spad $(OUTSRC)/solvelin.spad \
$(OUTSRC)/solverad.spad $(OUTSRC)/sortpak.spad $(OUTSRC)/space.spad \
- $(srcdir)/spad-parser.spad \
$(OUTSRC)/special.spad $(OUTSRC)/sregset.spad $(OUTSRC)/s.spad \
$(OUTSRC)/stream.spad $(OUTSRC)/string.spad $(OUTSRC)/sttaylor.spad \
$(OUTSRC)/sttf.spad $(OUTSRC)/sturm.spad $(OUTSRC)/suchthat.spad \
@@ -699,7 +698,7 @@ SPADFILES = \
$(OUTSRC)/utsode.spad \
$(OUTSRC)/variable.spad $(OUTSRC)/vector.spad $(OUTSRC)/view2D.spad \
$(OUTSRC)/view3D.spad $(OUTSRC)/viewDef.spad $(OUTSRC)/viewpack.spad \
- $(OUTSRC)/void.spad \
+ $(OUTSRC)/void.spad $(OUTSRC)/parsers.spad \
$(OUTSRC)/weier.spad $(OUTSRC)/wtpol.spad \
$(OUTSRC)/xlpoly.spad $(OUTSRC)/xpoly.spad \
$(OUTSRC)/ystream.spad \
@@ -708,7 +707,7 @@ SPADFILES = \
TESTS = $(INPUT)/INTHEORY.input $(INPUT)/VIEW2D.input $(INPUT)/TESTFR.input
oa_algebra_layer_0 = \
TYPE BINOPC BINOP IDEMOPC SGPOPC SGPOP \
- MONOPC FUNCTOR \
+ MONOPC FUNCTOR COMOPC COMOP \
BASTYPE BASTYPE- SETCAT SETCAT- SGROUP SGROUP- \
LLINSET RLINSET LINSET ABELSG ABELSG- CHARNZ \
ABELGRP ABELGRP- ABELMON ABELMON- ORDTYPE ORDTYPE- \
@@ -3034,6 +3033,10 @@ $(OUT)/SYMBOL.$(FASLEXT): $(OUT)/ORDSET.$(FASLEXT) \
strap-2/PRIMARR.$(FASLEXT) strap-2/REF.$(FASLEXT) \
strap-2/STRING.$(FASLEXT)
+$(OUT)/COMOPC.$(FASLEXT): $(OUT)/BINOPC.$(FASLEXT)
+
+$(OUT)/COMOP.$(FASLEXT): $(OUT)/COMOPC.$(FASLEXT) $(OUT)/KOERCE.$(FASLEXT)
+
$(OUT)/VOID.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT)
$(OUT)/HOMOTOP.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/KRCFROM.$(FASLEXT)
$(OUT)/ITUPLE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/STREAM.$(FASLEXT)
@@ -3325,12 +3328,6 @@ $(builddir)/%.tex: $(srcdir)/%.pamphlet
$(oa_build_texdir)/diagrams.tex: $(oa_src_docdir)/diagrams.tex
@cp -p $< $@
-SPADPRSR.NRLIB/code.$(FASLEXT): spad-parser.spad
- $(COMPILE_SPAD)
-
-PARSER.NRLIB/code.$(FASLEXT): script-parser.spad
- $(COMPILE_SPAD)
-
$(INPUT)/TESTFR.input: $(srcdir)/fr.spad.pamphlet
$(oa_hammer) --tangle='TEST FR' --output=$@ $<
diff --git a/src/algebra/catdef.spad.pamphlet b/src/algebra/catdef.spad.pamphlet
index b2daad4e..9e6a8102 100644
--- a/src/algebra/catdef.spad.pamphlet
+++ b/src/algebra/catdef.spad.pamphlet
@@ -42,6 +42,39 @@ BinaryOperation(T: Type): Join(BinaryOperatorCategory T, SetCategory) with
@
+\section{Commutative Operations}
+
+<<category COMOPC CommutativeOperatorCategory>>=
+)abbrev category COMOPC CommutativeOperatorCategory
+++ Author: Gabriel Dos Reis
+++ Date Created: June 17, 2013
+++ Date Last Modified: June 17, 2013
+++ Description:
+++ This is the category of all domains that implement commutative operations.
+CommutativeOperatorCategory(T: BasicType): Category ==
+ BinaryOperatorCategory T with
+ assume commutativity ==
+ forall(f: %, x: T, y: T) . f(x,y) = f(y,x)
+@
+
+<<domain COMOP CommutativeOperation>>=
+)abbrev domain COMOP CommutativeOperation
+++ Author: Gabriel Dos Reis
+++ Date Created: June 17, 2013
+++ Date Last Modified: June 17, 2013
+++ Description:
+++ This domain implements commutative operations.
+CommutativeOperation(T: BasicType): Public == Private where
+ Public == Join(CommutativeOperatorCategory T, CoercibleTo BinaryOperation T)
+ with
+ commutativeOperation: ((T,T) -> T) -> %
+ ++ \spad{commutativeOperation f} constructs a commutative operation
+ ++ over \spad{T}, thus asserting a commutativity property.
+ Private == BinaryOperation T add
+ commutativeOperation f == per binaryOperation f
+ coerce(x: %): BinaryOperation T == rep x
+@
+
\section{Idempotent operations}
@@ -2255,6 +2288,8 @@ Functorial(S: Type): Category == Type with
<<category FUNCTOR Functorial>>
<<category BINOPC BinaryOperatorCategory>>
<<domain BINOP BinaryOperation>>
+<<category COMOPC CommutativeOperatorCategory>>
+<<domain COMOP CommutativeOperation>>
<<category IDEMOPC IdempotentOperatorCategory>>
<<category SGPOPC SemiGroupOperatorCategory>>
<<domain SGPOP SemiGroupOperation>>
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index 983557ab..011793db 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -96,6 +96,7 @@
(|Color| . COLOR)
(|CommaAst| . COMMAAST)
(|CommonDenominator| . CDEN)
+ (|CommutativeOperation| . COMOP)
(|Commutator| . COMM)
(|Complex| . COMPLEX)
(|ComplexFactorization| . COMPFACT)
@@ -493,6 +494,7 @@
(|Collection| . CLAGG)
(|CombinatorialFunctionCategory| . CFCAT)
(|CombinatorialOpsCategory| . COMBOPC)
+ (|CommutativeOperatorCategory| . COMOPC)
(|CommutativeRing| . COMRING)
(|ComplexCategory| . COMPCAT)
(|Conduit| . CONDUIT)