doc-src/IsarAdvanced/Codegen/Thy/examples/bool_mlbool.ML
author wenzelm
Tue, 16 Oct 2007 17:07:40 +0200
changeset 25056 743f3603ba8b
parent 24421 acfb2413faa3
child 26318 967323f93c67
permissions -rw-r--r--
updated;

structure Nat = 
struct

datatype nat = Suc of nat | Zero_nat;

fun less_nat n (Suc m) = less_eq_nat n m
  | less_nat n Zero_nat = false
and less_eq_nat (Suc n) m = less_nat n m
  | less_eq_nat Zero_nat m = true;

end; (*struct Nat*)

structure Codegen = 
struct

fun in_interval (k, l) n =
  (Nat.less_eq_nat k n) andalso (Nat.less_eq_nat n l);

end; (*struct Codegen*)