| 1 |
\DOC prove_BITS_WORD |
| 2 |
|
| 3 |
\TYPE {prove_BITS_WORD : thm -> thm} |
| 4 |
|
| 5 |
\LIBRARY wordn |
| 6 |
|
| 7 |
\SYNOPSIS |
| 8 |
Proves a theorem for reducing {BITSn(WORDn [...])} to {[...]}. |
| 9 |
|
| 10 |
\DESCRIBE |
| 11 |
{prove_BITS_WORDS} takes a theorem returned by {define_wordn_type} and |
| 12 |
deduces a theorem which is an instance of the second conjunct of the |
| 13 |
type definition theorem. This theorem is usually used in rewriting to |
| 14 |
simplify terms containing the expression {BITSn(WORDn [...]}. |
| 15 |
|
| 16 |
\FAILURE |
| 17 |
Fails if the input theorem is not in the expected form. |
| 18 |
|
| 19 |
\EXAMPLE |
| 20 |
{prove_BITS_WORD word3} where {word3} is the theorem |
| 21 |
{ |
| 22 |
|- (!w. WORD3(BITS3 w) = w) /\ |
| 23 |
(!l. (LENGTH l = 3) = (BITS3(WORD3 l) = l)) |
| 24 |
} |
| 25 |
\noindent returns the following theorem: |
| 26 |
{ |
| 27 |
|- !b0 b1 b2. BITS3(WORD3[b0; b1; b2]) = [b0; b1; b2] |
| 28 |
} |
| 29 |
|
| 30 |
\ENDDOC |