We have a simple arithmetic definition of the logical complement.
Before introducing our notation for this operation, we offer two relevant observations.
PROOF: By Lemma 2.2.20,
-
-
-
.
PROOF: Since
-
,
-
.
Notation: For any expressionsand
, the size the expression `
' is defined to be
(cf. Figure 2.4).
Ifis an expression of size
, then `
' is an abbreviation for `
' (cf. Figure 2.4).
For example, `-
' is an abbreviation for
and according to Lemma 3.2.2, may also be used as an abbreviation for `'.
For the purpose of resolving ambiguous expressions, this construction has higher precedence than the basic arithmetic operators but lower than the bit slice operator, e.g.,
Our next two results pertain to left- and right-shifted arguments.
PROOF: First note that
PROOF:
The remaining lemmas of this section deal with commutativity properties between lnot and various other operators.
PROOF: By Lemma 2.2.19,
and hence, applying Lemma 1.2.16, we have
PROOF: By Definition 2.2.1,
If
by Lemma 3.1.6, whereas if
instead. Let
It is the following result that allows us to refer to this operation as bit-wise complementation.
PROOF: This is the case of Lemma 3.1.7 with
.
PROOF: This is an immediate consequence of the definitions. Since
is an expression of size