booleans declares the type boolean and its abbreviation bool, along
with the boolean constants true and false and the boolean connectives.
The properties of the connectives are given later, but the connectives
are built in to the typechecker so must be provided early on.
Note: the boolean type could be defined as the enumeration type {false,
true}, but booleans are primitive; the correct handling of enumeration
types requires the boolean type.
booleans
:
THEORY
BEGIN
boolean
:
NONEMPTY_TYPE
bool
:
NONEMPTY_TYPE
=
boolean
&
:
[bool,
bool-
>
bool]
;
IMPLIES:
[bool,
bool-
>
bool]
;
=
>
:
[bool,
bool-
>
bool]
;