lib: add ifM_to_top_of_bind

Signed-off-by: Michael McInerney <michael.mcinerney@proofcraft.systems>
This commit is contained in:
Michael McInerney 2024-01-09 19:07:01 +10:30 committed by michaelmcinerney
parent 3c9065f0da
commit 0cdce52f0b
1 changed files with 4 additions and 0 deletions

View File

@ -543,4 +543,8 @@ lemma notM_corres:
apply wpsimp+
done
lemma ifM_to_top_of_bind:
"((ifM test true false) >>= z) = ifM test (true >>= z) (false >>= z)"
by (force simp: ifM_def bind_def split: if_splits)
end