doc-src/IsarAdvanced/Codegen/Thy/examples/bool_infix.ML
author chaieb
Wed, 27 Feb 2008 14:39:48 +0100
changeset 26154 894f3860ebfd
parent 24421 acfb2413faa3
child 26318 967323f93c67
permissions -rw-r--r--
Installation of Quantifier elimination for ordered fields moved to Library/Dense_Linear_Order.thy

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