| 1 |
\DOC wordn_NVAL_CONV |
| 2 |
|
| 3 |
\TYPE {wordn_NVAL_CONV : conv} |
| 4 |
|
| 5 |
\LIBRARY wordn |
| 6 |
|
| 7 |
\SYNOPSIS |
| 8 |
Derives a theorem stating the value of a word. |
| 9 |
|
| 10 |
\DESCRIBE |
| 11 |
{wordn_NVAL_CONV} takes a term in the form {"NVALn #..."} and derives |
| 12 |
a theorem stating the value of the given word when interpreted as |
| 13 |
natural number in a big-endian format. The length of the string |
| 14 |
following the hash {#} should be {n}, and it should consist of only |
| 15 |
the digits {0} and {1}. |
| 16 |
|
| 17 |
\FAILURE |
| 18 |
Fails if the type {:wordn} or the constant {NVALn} has not been |
| 19 |
defined, or the string is not in the form specified above. |
| 20 |
|
| 21 |
\EXAMPLE |
| 22 |
The HOL session below illustrates the use of this conversion: |
| 23 |
{ |
| 24 |
# let word3_val_6 = wordn_NVAL_CONV "NVAL3 #110";; |
| 25 |
word3_val_6 = |- NVAL3 #110 = 6 |
| 26 |
} |
| 27 |
|
| 28 |
\SEEALSO |
| 29 |
{define_wordn_type}, {define_word_val}, {wordn_NWORD_CONV}. |
| 30 |
|
| 31 |
\ENDDOC |