9.8 KiB
9.8 KiB
layout, title, parent, ancestor
| layout | title | parent | ancestor |
|---|---|---|---|
| default | Booleans | Primitive | Funcons-beta |
Funcons-beta : Booleans.cbs
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 = booleansnot(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) ~> falseand(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-orexclusive-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) ~> falseFrom the PLanCompS Project | CBS-beta issues... | Suggest an improvement...