equal
deleted
inserted
replaced
5 |
5 |
6 header {* Binary Numerals *} |
6 header {* Binary Numerals *} |
7 |
7 |
8 theory Num |
8 theory Num |
9 imports Datatype |
9 imports Datatype |
|
10 uses |
|
11 ("Tools/numeral.ML") |
10 begin |
12 begin |
11 |
13 |
12 subsection {* The @{text num} type *} |
14 subsection {* The @{text num} type *} |
13 |
15 |
14 datatype num = One | Bit0 num | Bit1 num |
16 datatype num = One | Bit0 num | Bit1 num |
329 end; |
331 end; |
330 in [(@{const_syntax numeral}, num_tr' ""), |
332 in [(@{const_syntax numeral}, num_tr' ""), |
331 (@{const_syntax neg_numeral}, num_tr' "-")] end |
333 (@{const_syntax neg_numeral}, num_tr' "-")] end |
332 *} |
334 *} |
333 |
335 |
|
336 use "Tools/numeral.ML" |
|
337 |
|
338 |
334 subsection {* Class-specific numeral rules *} |
339 subsection {* Class-specific numeral rules *} |
335 |
340 |
336 text {* |
341 text {* |
337 @{const numeral} is a morphism. |
342 @{const numeral} is a morphism. |
338 *} |
343 *} |