diff options
author | dos-reis <gdr@axiomatics.org> | 2011-11-10 10:32:38 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-11-10 10:32:38 +0000 |
commit | ecd77af5ce74ac002bd6550bed79eae5a3704c35 (patch) | |
tree | fd6d27b84f7ada7e1754fa79c8dfbc4b49b3c996 /src/algebra/boolean.spad.pamphlet | |
parent | eaa625fa6948517ad21ae33b8e472982e70aadf1 (diff) | |
download | open-axiom-ecd77af5ce74ac002bd6550bed79eae5a3704c35.tar.gz |
* algebra/boolean.spad.pamphlet (IndexedBits) [Not, Or, And]: Remove.
Implement ~. \/, and /\ instead.
* algebra/si.spad.pamphlet (SingleInteger): Likewise.
* algebra/pattern.spad.pamphlet (Pattern): Adjust.
* algebra/string.spad.pamphlet (CharacterClass): Likewise.
Diffstat (limited to 'src/algebra/boolean.spad.pamphlet')
-rw-r--r-- | src/algebra/boolean.spad.pamphlet | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/algebra/boolean.spad.pamphlet b/src/algebra/boolean.spad.pamphlet index 7db25b9f..e3c6ab7f 100644 --- a/src/algebra/boolean.spad.pamphlet +++ b/src/algebra/boolean.spad.pamphlet @@ -534,16 +534,7 @@ Boolean(): Join(OrderedFinite, PropositionalLogic, ConvertibleTo InputForm) with ++ Description: \spadtype{IndexedBits} is a domain to compactly represent ++ large quantities of Boolean data. -IndexedBits(mn:Integer): BitAggregate() with - -- temporaries until parser gets better - Not: % -> % - ++ Not(n) returns the bit-by-bit logical {\em Not} of n. - Or : (%, %) -> % - ++ Or(n,m) returns the bit-by-bit logical {\em Or} of - ++ n and m. - And: (%, %) -> % - ++ And(n,m) returns the bit-by-bit logical {\em And} of - ++ n and m. +IndexedBits(mn:Integer): BitAggregate() == add import %2bool: NonNegativeInteger -> Boolean from Foreign Builtin import %2bit: Boolean -> NonNegativeInteger from Foreign Builtin @@ -589,9 +580,9 @@ IndexedBits(mn:Integer): BitAggregate() with elt(v:%, i:Integer) == %2bool %bitvecref(v,range(v,i-mn)) - Not v == %bitvecnot v - And(u, v) == (#v=#u => %bitvecand(v,u); map("and",v,u)) - Or(u, v) == (#v=#u => %bitvecor(v,u); map("or", v,u)) + ~v == %bitvecnot v + u /\ v == (#v=#u => %bitvecand(v,u); map("and",v,u)) + u \/ v == (#v=#u => %bitvecor(v,u); map("or", v,u)) @ \section{domain BITS Bits} |