21341
|
1 |
structure ROOT =
|
|
2 |
struct
|
|
3 |
|
|
4 |
structure HOL =
|
|
5 |
struct
|
|
6 |
|
|
7 |
datatype boola = True | False;
|
|
8 |
|
21994
|
9 |
fun op_conj y True = y
|
|
10 |
| op_conj x False = False
|
|
11 |
| op_conj True y = y
|
|
12 |
| op_conj False x = False;
|
21341
|
13 |
|
|
14 |
end; (*struct HOL*)
|
|
15 |
|
|
16 |
structure Nat =
|
|
17 |
struct
|
|
18 |
|
|
19 |
datatype nat = Zero_nat | Suc of nat;
|
|
20 |
|
22386
|
21 |
fun less_nat n (Suc m) = less_eq_nat n m
|
21994
|
22 |
| less_nat n Zero_nat = HOL.False
|
22386
|
23 |
and less_eq_nat (Suc n) m = less_nat n m
|
|
24 |
| less_eq_nat Zero_nat m = HOL.True;
|
21341
|
25 |
|
|
26 |
end; (*struct Nat*)
|
|
27 |
|
|
28 |
structure Codegen =
|
|
29 |
struct
|
|
30 |
|
|
31 |
fun in_interval (k, l) n =
|
21994
|
32 |
HOL.op_conj (Nat.less_eq_nat k n) (Nat.less_eq_nat n l);
|
21341
|
33 |
|
|
34 |
end; (*struct Codegen*)
|
|
35 |
|
|
36 |
end; (*struct ROOT*)
|