aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-05-18 18:20:17 +0000
committerdos-reis <gdr@axiomatics.org>2013-05-18 18:20:17 +0000
commit7aeb74ff23e7f43dbb17735c2fd4cafbe5606508 (patch)
tree2ea95ce963ccfd0b7724e87e38c53054ec0f3671 /src
parentc47f0746392a4d0d2a1e8d956519b2b1e764fe89 (diff)
downloadopen-axiom-7aeb74ff23e7f43dbb17735c2fd4cafbe5606508.tar.gz
* algebra/aggcat.spad.pamphlet (HomogeneousAggregate): Move
defaults for = and coerce to FiniteAggregate. Remove the rest.
Diffstat (limited to 'src')
-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)
@