aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/Makefile.am4
-rw-r--r--src/algebra/Makefile.in4
-rw-r--r--src/algebra/aggcat.spad.pamphlet49
-rw-r--r--src/algebra/exposed.lsp.pamphlet1
4 files changed, 56 insertions, 2 deletions
diff --git a/src/algebra/Makefile.am b/src/algebra/Makefile.am
index 2505b85a..6fcb211e 100644
--- a/src/algebra/Makefile.am
+++ b/src/algebra/Makefile.am
@@ -1455,6 +1455,8 @@ $(OUT)/SGPOP.$(FASLEXT): $(OUT)/SGPOPC.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT) \
$(OUT)/BINOP.$(FASLEXT)
$(OUT)/MONOPC.$(FASLEXT): $(OUT)/SGPOPC.$(FASLEXT)
+$(OUT)/FINAGG.$(FASLEXT): $(OUT)/HOAGG.$(FASLEXT)
+
oa_algebra_layer_0 = \
AHYP ATTREG CFCAT ELTAB KOERCE KONVERT \
KRCFROM KVTFROM IEVALAB IEVALAB- EVALAB EVALAB- \
@@ -1478,7 +1480,7 @@ oa_algebra_layer_0 = \
FSAGG FSAGG- STAGG STAGG- CLAGG CLAGG- \
RCAGG RCAGG- SETAGG SETAGG- HOAGG HOAGG- \
TBAGG TBAGG- KDAGG KDAGG- DIAGG DIAGG- \
- DIOPS DIOPS- STRING \
+ DIOPS DIOPS- STRING FINAGG \
LIST DIFFDOM DIFFDOM- DIFFSPC DIFFSPC- DIFFMOD \
LINEXP PATMAB REAL CHARZ LOGIC LOGIC- \
RTVALUE SYSPTR PDDOM PDDOM- PDSPC PDSPC- \
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index efab0a51..d5f800a0 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -740,7 +740,7 @@ oa_algebra_layer_0 = \
FSAGG FSAGG- STAGG STAGG- CLAGG CLAGG- \
RCAGG RCAGG- SETAGG SETAGG- HOAGG HOAGG- \
TBAGG TBAGG- KDAGG KDAGG- DIAGG DIAGG- \
- DIOPS DIOPS- STRING \
+ DIOPS DIOPS- STRING FINAGG \
LIST DIFFDOM DIFFDOM- DIFFSPC DIFFSPC- DIFFMOD \
LINEXP PATMAB REAL CHARZ LOGIC LOGIC- \
RTVALUE SYSPTR PDDOM PDDOM- PDSPC PDSPC- \
@@ -2795,6 +2795,8 @@ $(OUT)/SGPOP.$(FASLEXT): $(OUT)/SGPOPC.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT) \
$(OUT)/BINOP.$(FASLEXT)
$(OUT)/MONOPC.$(FASLEXT): $(OUT)/SGPOPC.$(FASLEXT)
+$(OUT)/FINAGG.$(FASLEXT): $(OUT)/HOAGG.$(FASLEXT)
+
$(OUT)/HOMOTOP.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/KRCFROM.$(FASLEXT)
$(OUT)/ITUPLE.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT) $(OUT)/STREAM.$(FASLEXT)
$(OUT)/PATAB.$(FASLEXT): $(OUT)/KOERCE.$(FASLEXT)
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet
index ab9eb619..938a09fb 100644
--- a/src/algebra/aggcat.spad.pamphlet
+++ b/src/algebra/aggcat.spad.pamphlet
@@ -61,6 +61,8 @@ Aggregate: Category == Type with
@
+\section{}
+
\section{category HOAGG HomogeneousAggregate}
<<category HOAGG HomogeneousAggregate>>=
@@ -154,6 +156,52 @@ HomogeneousAggregate(S:Type): Category == Aggregate with
@
+\section{Aggregates of finite extent}
+
+<<category FINAGG FiniteAggregate>>=
+)abbrev category FINAGG FiniteAggregate
+++ Author: Gabriel Dos Reis
+++ Date Created: May 15, 2013
+++ Date Last Modified: May 15, 2013
+++ Description:
+++ A finite aggregate is a homogeneous aggregate with a finite
+++ number of elements.
+FiniteAggregate(S: Type): Category == Exports where
+ Exports == HomogeneousAggregate S with
+ #: % -> NonNegativeInteger
+ ++ \spad{#u} returns the number of items in u.
+ any?: (S->Boolean,%) -> Boolean
+ ++ \spad{any?(p,u)} tests if \spad{p(x)} is true for
+ ++ any element \spad{x} of \spad{u}.
+ ++ Note: for collections,
+ ++ \axiom{any?(p,u) = reduce(or,map(f,u),false,true)}.
+ every?: (S->Boolean,%) -> Boolean
+ ++ \spad{every?(f,u)} tests if p(x) holds for all
+ ++ elements \spad{x} of \spad{u}.
+ ++ Note: for collections,
+ ++ \axiom{every?(p,u) = reduce(and,map(f,u),true,false)}.
+ count: (S->Boolean,%) -> NonNegativeInteger
+ ++ \spad{count(p,u)} returns the number of elements \spad{x}
+ ++ in \spad{u} such that \axiom{p(x)} holds. For collections,
+ ++ \axiom{count(p,u) = reduce(+,[1 for x in u | p(x)],0)}.
+ members: % -> List S
+ ++ \spad{members(u)} returns a list of the consecutive elements of u.
+ ++ For collections, \axiom{parts([x,y,...,z]) = (x,y,...,z)}.
+ if S has SetCategory then
+ count: (S,%) -> NonNegativeInteger
+ ++ \spad{count(x,u)} returns the number of occurrences
+ ++ of \spad{x} in \spad{u}.
+ ++ For collections, \axiom{count(x,u) = reduce(+,[x=y for y in u],0)}.
+ member?: (S,%) -> Boolean
+ ++ \spad{member?(x,u)} tests if \spad{x} is a member of \spad{u}.
+ ++ For collections,
+ ++ \axiom{member?(x,u) = reduce(or,[x=y for y in u],false)}.
+
+@
+
+
+
+
\section{category CLAGG Collection}
<<category CLAGG Collection>>=
@@ -2753,6 +2801,7 @@ BitAggregate(): Category ==
<<category AGG Aggregate>>
<<category HOAGG HomogeneousAggregate>>
+<<category FINAGG FiniteAggregate>>
<<category CLAGG Collection>>
<<category BGAGG BagAggregate>>
<<category SKAGG StackAggregate>>
diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet
index 45b55a9f..33084c13 100644
--- a/src/algebra/exposed.lsp.pamphlet
+++ b/src/algebra/exposed.lsp.pamphlet
@@ -527,6 +527,7 @@
(|Field| . FIELD)
(|FieldOfPrimeCharacteristic| . FPC)
(|Finite| . FINITE)
+ (|FiniteAggregate| . FINAGG)
(|FileCategory| . FILECAT)
(|FileNameCategory| . FNCAT)
(|FiniteAbelianMonoidRing| . FAMR)