diff options
author | dos-reis <gdr@axiomatics.org> | 2010-06-26 14:00:47 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-06-26 14:00:47 +0000 |
commit | b6dd0415650fe24621a42ad676960697f77ca96c (patch) | |
tree | 3d0e9b9babab0b4170c638f070a5f3ef46d078ba /src/algebra/aggcat.spad.pamphlet | |
parent | f7816a009e9b9fab8cdb02e93a8b974fd3de44a6 (diff) | |
download | open-axiom-b6dd0415650fe24621a42ad676960697f77ca96c.tar.gz |
* algebra/aggcat.spad.pamphlet (HomogeneousAggregate): Satisfy
BasicType if element type satisfies it.
Diffstat (limited to 'src/algebra/aggcat.spad.pamphlet')
-rw-r--r-- | src/algebra/aggcat.spad.pamphlet | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet index 67f5a488..1241838b 100644 --- a/src/algebra/aggcat.spad.pamphlet +++ b/src/algebra/aggcat.spad.pamphlet @@ -100,6 +100,7 @@ import Evalable ++ to be modified or updated without changing its overall value. HomogeneousAggregate(S:Type): Category == Aggregate with if S has CoercibleTo(OutputForm) then CoercibleTo(OutputForm) + if S has BasicType then BasicType if S has SetCategory then SetCategory if S has SetCategory then if S has Evalable S then Evalable S @@ -139,17 +140,22 @@ HomogeneousAggregate(S:Type): Category == Aggregate with add if S has Evalable S then eval(u:%,l:List Equation S):% == map(eval(#1,l),u) + if % has finiteAggregate then #c == # parts c any?(f, c) == or/[f x for x in parts c] every?(f, c) == and/[f x for x in parts c] count(f:S -> Boolean, c:%) == +/[1 for x in parts c | f x] members x == parts x + + if S has BasicType then + x = y == + size?(x, #y) and (and/[a = b for a in parts x for b in parts y]) + if S has SetCategory then count(s:S, x:%) == count(s = #1, x) member?(e, c) == any?(e = #1,c) - x = y == - size?(x, #y) and (and/[a = b for a in parts x for b in parts y]) + if S has CoercibleTo(OutputForm) then coerce(x:%):OutputForm == bracket |