From 375b19261acfb8377b858dea4d6628b6be946625 Mon Sep 17 00:00:00 2001 From: Michael McInerney Date: Tue, 9 Jan 2024 15:57:11 +1030 Subject: [PATCH] lib: add corres_if_strong Signed-off-by: Michael McInerney --- lib/Corres_UL.thy | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Corres_UL.thy b/lib/Corres_UL.thy index f62ee89b1..5054ec5a4 100644 --- a/lib/Corres_UL.thy +++ b/lib/Corres_UL.thy @@ -481,6 +481,18 @@ lemma corres_if3: (if G then a else b) (if G' then c else d)" by simp +lemma corres_if_strong: + "\\s s'. \(s, s') \ sr; R s; R' s'\ \ G = G'; + \G; G'\ \ corres_underlying sr nf nf' r P P' a c; + \\ G; \ G'\ \ corres_underlying sr nf nf' r Q Q' b d \ + \ corres_underlying sr nf nf' r + (R and (if G then P else Q)) (R' and (if G' then P' else Q')) + (if G then a else b) (if G' then c else d)" + by (fastforce simp: corres_underlying_def) + +lemmas corres_if_strong' = + corres_if_strong[where R=R and P=R and Q=R for R, + where R'=R' and P'=R' and Q'=R' for R', simplified] text \Some equivalences about liftM and other useful simps\