diff options
author | dos-reis <gdr@axiomatics.org> | 2009-05-28 21:44:26 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-05-28 21:44:26 +0000 |
commit | 9a866efde4ed887d024c01a49b3cdde777d8deb3 (patch) | |
tree | c3434f7a42ddb6bc3590d9aba429129541c57c0a /src/algebra/boolean.spad.pamphlet | |
parent | 0e6d0cdde92747cc02d9965eef8ef1edc31cb1ae (diff) | |
download | open-axiom-9a866efde4ed887d024c01a49b3cdde777d8deb3.tar.gz |
* interp/compiler.boot (compVector): Tidy code generation.
(checkExternalEntity): Handle Builtin external entities.
(compSignatureImport): Likewise.
* algebra/boolean.spad.pamphlet (Boolean): Import Lisp function
from Foreign Builtin.
(KleeneTrivalentLogic): The constant `true' and `false' are now
inherited.
Diffstat (limited to 'src/algebra/boolean.spad.pamphlet')
-rw-r--r-- | src/algebra/boolean.spad.pamphlet | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/algebra/boolean.spad.pamphlet b/src/algebra/boolean.spad.pamphlet index f7cc1e9a..76c3c49b 100644 --- a/src/algebra/boolean.spad.pamphlet +++ b/src/algebra/boolean.spad.pamphlet @@ -315,25 +315,29 @@ Boolean(): Join(OrderedFinite, Logic, PropositionalLogic, ConvertibleTo InputFor test: % -> % ++ test(b) returns b and is provided for compatibility with the new compiler. == add + import EQ: (%,%) -> Boolean from Foreign Builtin + import AND: (%,%) -> % from Foreign Builtin + import OR: (%,%) -> % from Foreign Builtin + import NOT: % -> % from Foreign Builtin + test a == a - nt(a: %): % == NOT(a)$Lisp true == 'T pretend % - false == NIL$Lisp + false == NIL$Foreign(Builtin) sample() == true - not b == nt b + not b == NOT b ~ b == (b => false; true) - a and b == AND(a,b)$Lisp - a /\ b == AND(a,b)$Lisp - a or b == OR(a,b)$Lisp - a \/ b == OR(a,b)$Lisp - xor(a, b) == (a => nt b; b) - nor(a, b) == (a => false; nt b) - nand(a, b) == (a => nt b; true) - a = b == EQ(a, b)$Lisp + a and b == AND(a,b) + a /\ b == AND(a,b) + a or b == OR(a,b) + a \/ b == OR(a,b) + xor(a, b) == (a => NOT b; b) + nor(a, b) == (a => false; NOT b) + nand(a, b) == (a => NOT b; true) + a = b == EQ(a, b) implies(a, b) == (a => b; true) - equiv(a,b) == EQ(a, b)$Lisp - a < b == (b => nt a; false) + equiv(a,b) == EQ(a, b) + a < b == (b => NOT a; false) size() == 2 index i == @@ -450,9 +454,7 @@ Bits(): Exports == Implementation where ++ This domain implements Kleene's 3-valued propositional logic. KleeneTrivalentLogic(): Public == Private where Public == PropositionalLogic with - false: % ++ the definite falsehood value unknown: % ++ the indefinite `unknown' - true: % ++ the definite truth value case: (%,[| false |]) -> Boolean ++ x case false holds if the value of `x' is `false' case: (%,[| unknown |]) -> Boolean |