diff options
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 |