5.4 Truth Values

The module Bool contains procedures operating on the truth values true and false, which denote names.

IsBool

{Bool.is +X ?B}

tests whether X is true or false.

Not

{Bool.'not' +B1 ?B2}

returns the negation of truth value B1.

And

{Bool.and +B1 +B2 ?B3}

returns the conjunction of truth values B1 and B2. Note that And is different from conditional conjunction available via the keyword andthen in that it always evaluates its second argument.

For instance, false andthen P reduces without reducing application of P, whereas reduction of {And false P} always applies P.

Or

{Bool.'or' +B1 +B2 ?B3}

returns the disjunction of truth values B1 and B2. Note that Or is different from conditional disjunction available via the keyword orelse in that it always evaluates its second argument.

For instance, true orelse P reduces without reducing application of P, whereas reduction of {Or true P} always applies P.


Denys Duchier, Leif Kornstaedt and Christian Schulte
Version 1.4.0 (20080702)