doc-src/Codegen/Thy/examples/bool_mlbool.ML
author Cezary Kaliszyk <kaliszyk@in.tum.de>
Wed, 13 Jul 2011 00:23:24 +0900
changeset 43785 2bd54d4b5f3d
parent 30226 2f4684e2ea95
permissions -rw-r--r--
HOL/Import for HOLLight revival: Proper theory headers, update generation scripts to SVN version of HOL Light, add some constant maps and compatibility theorems

structure Nat = 
struct

datatype nat = Suc of nat | Zero_nat;

fun less_nat m (Suc n) = less_eq_nat m n
  | less_nat n Zero_nat = false
and less_eq_nat (Suc m) n = less_nat m n
  | less_eq_nat Zero_nat n = 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*)