src/HOL/Wellfounded.thy
changeset 71404 f2b783abfbe7
parent 69593 3dda49e08b9d
child 71410 5385de42f9f4
equal deleted inserted replaced
71403:43c2355648d2 71404:f2b783abfbe7
   581   by (simp add: less_than_def)
   581   by (simp add: less_than_def)
   582 
   582 
   583 lemma less_than_iff [iff]: "((x,y) \<in> less_than) = (x<y)"
   583 lemma less_than_iff [iff]: "((x,y) \<in> less_than) = (x<y)"
   584   by (simp add: less_than_def less_eq)
   584   by (simp add: less_than_def less_eq)
   585 
   585 
       
   586 lemma total_less_than: "total less_than"
       
   587   using total_on_def by force
       
   588 
   586 lemma wf_less: "wf {(x, y::nat). x < y}"
   589 lemma wf_less: "wf {(x, y::nat). x < y}"
   587   by (rule Wellfounded.wellorder_class.wf)
   590   by (rule Wellfounded.wellorder_class.wf)
   588 
   591 
   589 
   592 
   590 subsection \<open>Accessible Part\<close>
   593 subsection \<open>Accessible Part\<close>
   775 
   778 
   776 lemma in_lex_prod[simp]: "((a, b), (a', b')) \<in> r <*lex*> s \<longleftrightarrow> (a, a') \<in> r \<or> a = a' \<and> (b, b') \<in> s"
   779 lemma in_lex_prod[simp]: "((a, b), (a', b')) \<in> r <*lex*> s \<longleftrightarrow> (a, a') \<in> r \<or> a = a' \<and> (b, b') \<in> s"
   777   by (auto simp:lex_prod_def)
   780   by (auto simp:lex_prod_def)
   778 
   781 
   779 text \<open>\<open><*lex*>\<close> preserves transitivity\<close>
   782 text \<open>\<open><*lex*>\<close> preserves transitivity\<close>
   780 lemma trans_lex_prod [intro!]: "trans R1 \<Longrightarrow> trans R2 \<Longrightarrow> trans (R1 <*lex*> R2)"
   783 lemma trans_lex_prod [simp,intro!]: "trans R1 \<Longrightarrow> trans R2 \<Longrightarrow> trans (R1 <*lex*> R2)"
   781   unfolding trans_def lex_prod_def by blast
   784   unfolding trans_def lex_prod_def by blast
   782 
   785 
       
   786 lemma total_on_lex_prod [simp]: "total_on A r \<Longrightarrow> total_on B s \<Longrightarrow> total_on (A \<times> B) (r <*lex*> s)"
       
   787   by (auto simp: total_on_def)
       
   788 
       
   789 lemma total_lex_prod [simp]: "total r \<Longrightarrow> total s \<Longrightarrow> total (r <*lex*> s)"
       
   790   by (auto simp: total_on_def)
   783 
   791 
   784 text \<open>lexicographic combinations with measure functions\<close>
   792 text \<open>lexicographic combinations with measure functions\<close>
   785 
   793 
   786 definition mlex_prod :: "('a \<Rightarrow> nat) \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" (infixr "<*mlex*>" 80)
   794 definition mlex_prod :: "('a \<Rightarrow> nat) \<Rightarrow> ('a \<times> 'a) set \<Rightarrow> ('a \<times> 'a) set" (infixr "<*mlex*>" 80)
   787   where "f <*mlex*> R = inv_image (less_than <*lex*> R) (\<lambda>x. (f x, x))"
   795   where "f <*mlex*> R = inv_image (less_than <*lex*> R) (\<lambda>x. (f x, x))"