lexicographic ordering: new simp setup to prioritise the simpler "less_than" case
authorpaulson <lp15@cam.ac.uk>
Tue, 18 Aug 2020 17:38:51 +0100
changeset 72168 721a05da8fe7
parent 72167 e5765cfd4338
child 72169 2d7619fc0e1a
lexicographic ordering: new simp setup to prioritise the simpler "less_than" case
src/HOL/Wellfounded.thy
--- a/src/HOL/Wellfounded.thy	Tue Aug 18 14:45:09 2020 +0100
+++ b/src/HOL/Wellfounded.thy	Tue Aug 18 17:38:51 2020 +0100
@@ -768,7 +768,11 @@
     (infixr "<*lex*>" 80)
     where "ra <*lex*> rb = {((a, b), (a', b')). a \<noteq> a' \<and> (a, a') \<in> ra \<or> a = a' \<and> (b, b') \<in> rb}"
 
-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"
+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"
+  by (auto simp:lex_prod_def)
+
+text\<open>compared with @{thm[source]in_lex_prod} this yields simpler results\<close>
+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"
   by (auto simp:lex_prod_def)
 
 lemma wf_lex_prod [intro!]: