src/HOL/Wellfounded.thy
changeset 41720 f749155883d7
parent 41075 4bed56dc95fb
child 43137 32b888e1a170
     1.1 --- a/src/HOL/Wellfounded.thy	Mon Feb 07 15:46:58 2011 +0100
     1.2 +++ b/src/HOL/Wellfounded.thy	Tue Feb 08 07:42:08 2011 +0100
     1.3 @@ -680,6 +680,15 @@
     1.4  apply (rule wf_less_than [THEN wf_inv_image])
     1.5  done
     1.6  
     1.7 +lemma wf_if_measure: fixes f :: "'a \<Rightarrow> nat"
     1.8 +shows "(!!x. P x \<Longrightarrow> f(g x) < f x) \<Longrightarrow> wf {(y,x). P x \<and> y = g x}"
     1.9 +apply(insert wf_measure[of f])
    1.10 +apply(simp only: measure_def inv_image_def less_than_def less_eq)
    1.11 +apply(erule wf_subset)
    1.12 +apply auto
    1.13 +done
    1.14 +
    1.15 +
    1.16  text{* Lexicographic combinations *}
    1.17  
    1.18  definition lex_prod :: "('a \<times>'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> (('a \<times> 'b) \<times> ('a \<times> 'b)) set" (infixr "<*lex*>" 80) where