21341
|
1 |
structure ROOT =
|
|
2 |
struct
|
|
3 |
|
|
4 |
structure HOL =
|
|
5 |
struct
|
|
6 |
|
21994
|
7 |
fun nota false = true
|
|
8 |
| nota true = false;
|
21341
|
9 |
|
|
10 |
end; (*struct HOL*)
|
|
11 |
|
|
12 |
structure Nat =
|
|
13 |
struct
|
|
14 |
|
|
15 |
datatype nat = Zero_nat | Suc of nat;
|
|
16 |
|
21994
|
17 |
fun less_nat Zero_nat (Suc n) = true
|
|
18 |
| less_nat n Zero_nat = false
|
|
19 |
| less_nat (Suc m) (Suc n) = less_nat m n;
|
21341
|
20 |
|
|
21 |
fun less_eq_nat m n = HOL.nota (less_nat n m);
|
|
22 |
|
|
23 |
end; (*struct Nat*)
|
|
24 |
|
|
25 |
structure Codegen =
|
|
26 |
struct
|
|
27 |
|
21994
|
28 |
fun in_interval (k, l) n =
|
22015
|
29 |
Nat.less_eq_nat k n andalso Nat.less_eq_nat n l;
|
21341
|
30 |
|
|
31 |
end; (*struct Codegen*)
|
|
32 |
|
|
33 |
end; (*struct ROOT*)
|