766 |
766 |
767 definition lex_prod :: "('a \<times>'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> (('a \<times> 'b) \<times> ('a \<times> 'b)) set" |
767 definition lex_prod :: "('a \<times>'a) set \<Rightarrow> ('b \<times> 'b) set \<Rightarrow> (('a \<times> 'b) \<times> ('a \<times> 'b)) set" |
768 (infixr "<*lex*>" 80) |
768 (infixr "<*lex*>" 80) |
769 where "ra <*lex*> rb = {((a, b), (a', b')). a \<noteq> a' \<and> (a, a') \<in> ra \<or> a = a' \<and> (b, b') \<in> rb}" |
769 where "ra <*lex*> rb = {((a, b), (a', b')). a \<noteq> a' \<and> (a, a') \<in> ra \<or> a = a' \<and> (b, b') \<in> rb}" |
770 |
770 |
771 lemma in_lex_prod[simp]: "((a, b), (a', b')) \<in> r <*lex*> s \<longleftrightarrow> a \<noteq> a' \<and> (a, a') \<in> r \<or> a = a' \<and> (b, b') \<in> s" |
771 lemma in_lex_prod[simp]: "NO_MATCH less_than r \<Longrightarrow> ((a, b), (a', b')) \<in> r <*lex*> s \<longleftrightarrow> a \<noteq> a' \<and> (a, a') \<in> r \<or> a = a' \<and> (b, b') \<in> s" |
|
772 by (auto simp:lex_prod_def) |
|
773 |
|
774 text\<open>compared with @{thm[source]in_lex_prod} this yields simpler results\<close> |
|
775 lemma in_lex_prod_less_than[simp]: "((a, b), (a', b')) \<in> less_than <*lex*> s \<longleftrightarrow>a<a' \<or> a = a' \<and> (b, b') \<in> s" |
772 by (auto simp:lex_prod_def) |
776 by (auto simp:lex_prod_def) |
773 |
777 |
774 lemma wf_lex_prod [intro!]: |
778 lemma wf_lex_prod [intro!]: |
775 assumes "wf ra" "wf rb" |
779 assumes "wf ra" "wf rb" |
776 shows "wf (ra <*lex*> rb)" |
780 shows "wf (ra <*lex*> rb)" |