moved lemmas o_eq_dest, o_eq_elim here
authorhaftmann
Mon, 21 Dec 2009 08:32:03 +0100
changeset 34150 22acb8b38639
parent 34115 db1b90188fd1
child 34151 8d57ce46b3f7
moved lemmas o_eq_dest, o_eq_elim here
src/HOL/Fun.thy
--- a/src/HOL/Fun.thy	Thu Dec 17 23:44:48 2009 +0100
+++ b/src/HOL/Fun.thy	Mon Dec 21 08:32:03 2009 +0100
@@ -74,6 +74,14 @@
 lemma o_id [simp]: "f o id = f"
 by (simp add: comp_def)
 
+lemma o_eq_dest:
+  "a o b = c o d \<Longrightarrow> a (b v) = c (d v)"
+  by (simp only: o_def) (fact fun_cong)
+
+lemma o_eq_elim:
+  "a o b = c o d \<Longrightarrow> ((\<And>v. a (b v) = c (d v)) \<Longrightarrow> R) \<Longrightarrow> R"
+  by (erule meta_mp) (fact o_eq_dest) 
+
 lemma image_compose: "(f o g) ` r = f`(g`r)"
 by (simp add: comp_def, blast)