| 1 |
\DOC prove_bit_op_thms |
| 2 |
|
| 3 |
\TYPE {prove_bit_op_thms : (int -> thm list)} |
| 4 |
|
| 5 |
\LIBRARY wordn |
| 6 |
|
| 7 |
\SYNOPSIS |
| 8 |
Proves some basic theorems about the bitwise logical operators. |
| 9 |
|
| 10 |
\DESCRIBE |
| 11 |
{prove_bit_op_thms} takes a single integer as its argument and returns |
| 12 |
a list of theorems about the basic properties of the bitwise logical |
| 13 |
operators. These theorems are the self-inversion of the {NOTn} |
| 14 |
operator, the symmetry and associativity of the {ANDn}, {ORn} and |
| 15 |
{XORn} operators. They are also stored in the current theory under the |
| 16 |
names {NOTn}, {ANDn_SYM}, {ORn_SYM}, {XORn_SYM}, {ANDn_ASSOC}, |
| 17 |
{ORn_ASSOC} and {XORn_ASSOC}. |
| 18 |
|
| 19 |
\FAILURE |
| 20 |
Fails if either it is not in draft mode, or any of the operators has |
| 21 |
not been defined. |
| 22 |
|
| 23 |
\EXAMPLE |
| 24 |
{prove_bit_op_thms 3} returns the following list of theorems and |
| 25 |
stores them in the current theory under the names {NOT3}, |
| 26 |
{AND3_SYM}, {OR3_SYM}, {XOR3_SYM}, {AND3_ASSOC}, {OR3_ASSOC} and |
| 27 |
{XOR3_ASSOC}, respectively. |
| 28 |
{ |
| 29 |
[ |- !w. NOT3(NOT3 w) = w; |
| 30 |
|- !w1 w2. w1 AND3 w2 = w2 AND3 w1; |
| 31 |
|- !w1 w2. w1 OR3 w2 = w2 OR3 w1; |
| 32 |
|- !w1 w2. w1 XOR3 w2 = w2 XOR3 w1; |
| 33 |
|- !w1 w2 w3. w1 AND3 (w2 AND3 w3) = (w1 AND3 w2) AND3 w3; |
| 34 |
|- !w1 w2 w3. w1 OR3 (w2 OR3 w3) = (w1 OR3 w2) OR3 w3; |
| 35 |
|- !w1 w2 w3. w1 XOR3 (w2 XOR3 w3) = (w1 XOR3 w2) XOR3 w3] |
| 36 |
} |
| 37 |
|
| 38 |
\SEEALSO |
| 39 |
{define_wordn_bit_ops}, {wordn_bit_ops}. |
| 40 |
|
| 41 |
\ENDDOC |