equal
deleted
inserted
replaced
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]) |