diff --git a/lib/clib/Corres_UL_C.thy b/lib/clib/Corres_UL_C.thy index bc012b52e..7c552c5c8 100644 --- a/lib/clib/Corres_UL_C.thy +++ b/lib/clib/Corres_UL_C.thy @@ -14,6 +14,7 @@ imports CParser.LemmaBucket_C Lib.LemmaBucket SIMPL_Lemmas + Monads.OptionMonadWP begin declare word_neq_0_conv [simp del] @@ -171,6 +172,13 @@ lemma ccorresE: apply simp done +lemma ccorresE_gets_the: + "\ccorresG srel \ rrel xf G G' hs (gets_the c) c'; (s, s') \ srel; G s; s' \ G'; no_ofail G c; + \ \\<^sub>h \c' # hs, s'\ \ (n, Normal t')\ + \ (s, t') \ srel \ rrel (the (c s)) (xf t')" + by (fastforce simp: ccorres_underlying_def no_ofail_def unif_rrel_def gets_the_def gets_def + get_def bind_def return_def) + lemma ccorres_empty_handler_abrupt: assumes cc: "ccorres_underlying sr \ rrel xf' arrel axf P P' [] a c" and asms: "(s, s') \ sr" "P s" "s' \ P'" "\ snd (a s)"