doc-src/IsarAdvanced/Codegen/Thy/examples/bool_mlbool.ML
author wenzelm
Thu, 11 Oct 2007 16:05:53 +0200
changeset 24970 050afeec89a7
parent 24421 acfb2413faa3
child 26318 967323f93c67
permissions -rw-r--r--
renamed Syntax.XXX_mode to Syntax.mode_XXX; moved ProofContext.pp to Syntax.pp;

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*)