| author | wenzelm | 
| Wed, 28 Oct 2009 22:01:40 +0100 | |
| changeset 33289 | d0c2ef490613 | 
| parent 30226 | 2f4684e2ea95 | 
| permissions | -rw-r--r-- | 
| 21341 | 1  | 
structure Nat =  | 
2  | 
struct  | 
|
3  | 
||
| 24421 | 4  | 
datatype nat = Suc of nat | Zero_nat;  | 
| 21341 | 5  | 
|
| 26318 | 6  | 
fun less_nat m (Suc n) = less_eq_nat m n  | 
| 21994 | 7  | 
| less_nat n Zero_nat = false  | 
| 26318 | 8  | 
and less_eq_nat (Suc m) n = less_nat m n  | 
9  | 
| less_eq_nat Zero_nat n = true;  | 
|
| 21341 | 10  | 
|
11  | 
end; (*struct Nat*)  | 
|
12  | 
||
13  | 
structure Codegen =  | 
|
14  | 
struct  | 
|
15  | 
||
16  | 
fun in_interval (k, l) n =  | 
|
| 21994 | 17  | 
(Nat.less_eq_nat k n) andalso (Nat.less_eq_nat n l);  | 
| 21341 | 18  | 
|
19  | 
end; (*struct Codegen*)  |