src/HOL/Wellfounded.thy
changeset 46356 48fcca8965f4
parent 46349 b159ca4e268b
child 46635 cde737f9c911
equal deleted inserted replaced
46355:42a01315d998 46356:48fcca8965f4
   633 text {* Measure functions into @{typ nat} *}
   633 text {* Measure functions into @{typ nat} *}
   634 
   634 
   635 definition measure :: "('a => nat) => ('a * 'a)set"
   635 definition measure :: "('a => nat) => ('a * 'a)set"
   636 where "measure = inv_image less_than"
   636 where "measure = inv_image less_than"
   637 
   637 
   638 lemma in_measure[simp]: "((x,y) : measure f) = (f x < f y)"
   638 lemma in_measure[simp, code_unfold]: "((x,y) : measure f) = (f x < f y)"
   639   by (simp add:measure_def)
   639   by (simp add:measure_def)
   640 
   640 
   641 lemma wf_measure [iff]: "wf (measure f)"
   641 lemma wf_measure [iff]: "wf (measure f)"
   642 apply (unfold measure_def)
   642 apply (unfold measure_def)
   643 apply (rule wf_less_than [THEN wf_inv_image])
   643 apply (rule wf_less_than [THEN wf_inv_image])