aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/algebra/aggcat.spad.pamphlet24
2 files changed, 10 insertions, 19 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b9f8eea0..fb3870bb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2013-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
+ * algebra/aggcat.spad.pamphlet (HomogeneousAggregate): Move
+ defaults for = and coerce to FiniteAggregate. Remove the rest.
+
+2013-05-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
* algebra/aggcat.spad.pamphlet (FiniteAggregate) [reduce]: Add
overloads.
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet
index 118ac45a..8f1df760 100644
--- a/src/algebra/aggcat.spad.pamphlet
+++ b/src/algebra/aggcat.spad.pamphlet
@@ -125,25 +125,6 @@ HomogeneousAggregate(S:Type): Category == Aggregate with
if S has Evalable S then
eval(u:%,l:List Equation S):% == map(eval(#1,l),u)
- if % has finiteAggregate then
- #c == # members c
- any?(f, c) == or/[f x for x in members c]
- every?(f, c) == and/[f x for x in members c]
- count(f:S -> Boolean, c:%) == +/[1 for x in members c | f x]
-
- if S has BasicType then
- x = y ==
- #x = #y and (and/[a = b for a in members x for b in members y])
-
- if S has BasicType then
- count(s:S, x:%) == count(s = #1, x)
- member?(e, c) == any?(e = #1,c)
-
- if S has CoercibleTo(OutputForm) then
- coerce(x:%):OutputForm ==
- bracket
- commaSeparate [a::OutputForm for a in members x]$List(OutputForm)
-
@
\section{Aggregates of finite extent}
@@ -219,6 +200,11 @@ FiniteAggregate(S: Type): Category == Exports where
count(s:S, x:%) == count(s = #1, x)
member?(e, x) == any?(e = #1,x)
reduce(f,x,e,z) == reduce(f,members x,e,z)
+ x = y == members x = members y
+ if S has CoercibleTo OutputForm then
+ coerce(x:%):OutputForm ==
+ bracket
+ commaSeparate [a::OutputForm for a in members x]$List(OutputForm)
@