lib: move map_set definition to OptionMonad.thy

Signed-off-by: Michael McInerney <m.mcinerney@unsw.edu.au>
This commit is contained in:
Michael McInerney 2022-01-13 20:09:21 +11:00 committed by Gerwin Klein
parent c3a210877f
commit 08fe7d1a63
1 changed files with 3 additions and 0 deletions

View File

@ -142,6 +142,9 @@ declare None_upd_eq[simp]
lemma "\<lbrakk> (f |> g) x = None; g v = None \<rbrakk> \<Longrightarrow> f(x \<mapsto> v) |> g = f |> g"
by simp
definition map_set :: "('a \<Rightarrow> 'b set option) \<Rightarrow> 'a \<Rightarrow> 'b set" where
"map_set f \<equiv> case_option {} id \<circ> f"
(* opt_pred *)
abbreviation