Funcons-beta : Booleans.cbs | PRETTY | PDF
Booleans
[
Datatype booleans Alias bools
Funcon true
Funcon false
Funcon not
Funcon implies
Funcon and
Funcon or
Funcon exclusive-or Alias xor
]
Datatype
booleans ::= true | false
Alias
bools = booleans
not(B)
is logical negation.
implies(B1, B2)
is logical implication.
Rule
implies(false, false) ~> true
Rule
implies(false, true) ~> true
Rule
implies(true, true) ~> true
Rule
implies(true, false) ~> false
and(B, ...)
is logical conjunction of any number of Boolean values.
or(B, ...)
is logical disjunction of any number of Boolean values.
Funcon
exclusive-or(_:booleans, _:booleans) : =>booleans
Alias
xor = exclusive-or
exclusive-or(B1, B2)
is exclusive disjunction.
Rule
exclusive-or(false, false) ~> false
Rule
exclusive-or(false, true) ~> true
Rule
exclusive-or(true, false) ~> true
Rule
exclusive-or(true, true) ~> false