new rule for making rsp theorem more readable
authorkuncar
Tue, 25 Feb 2014 19:07:40 +0100
changeset 55737 84f6ac9f6e41
parent 55736 f1ed1e9cd080
child 55738 303123344459
new rule for making rsp theorem more readable
src/HOL/Lifting.thy
src/HOL/Tools/Lifting/lifting_def.ML
--- a/src/HOL/Lifting.thy	Tue Feb 25 19:07:14 2014 +0100
+++ b/src/HOL/Lifting.thy	Tue Feb 25 19:07:40 2014 +0100
@@ -296,7 +296,10 @@
   shows "x = y"
 using assms by (simp add: invariant_def)
 
-lemma fun_rel_eq_invariant:
+lemma fun_rel_eq_invariant: "(op= ===> Lifting.invariant P) = Lifting.invariant (\<lambda>f. \<forall>x. P(f x))"
+unfolding invariant_def fun_rel_def by auto
+
+lemma fun_rel_invariant_rel:
   shows "((invariant R) ===> S) = (\<lambda>f g. \<forall>x. R x \<longrightarrow> S (f x) (g x))"
 by (auto simp add: invariant_def fun_rel_def)
 
--- a/src/HOL/Tools/Lifting/lifting_def.ML	Tue Feb 25 19:07:14 2014 +0100
+++ b/src/HOL/Tools/Lifting/lifting_def.ML	Tue Feb 25 19:07:40 2014 +0100
@@ -506,6 +506,7 @@
       let
         val unfold_conv = Conv.rewrs_conv 
           [@{thm fun_rel_eq_invariant[THEN eq_reflection]}, 
+            @{thm fun_rel_invariant_rel[THEN eq_reflection]},
             @{thm fun_rel_eq[THEN eq_reflection]},
             @{thm fun_rel_eq_rel[THEN eq_reflection]}, 
             @{thm fun_rel_def[THEN eq_reflection]}]