File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,8 @@ should not happen).\<close>
111111definition update_var :: "var_context \<Rightarrow> 'a nstate \<Rightarrow> vname \<Rightarrow> 'a val \<Rightarrow> 'a nstate"
112112 where
113113 "update_var \<Lambda> n_s x v =
114- (case (map_of (snd \<Lambda>) x) of Some res \<Rightarrow> n_s\<lparr>local_state := local_state(n_s)(x \<mapsto> v)\<rparr> |
115- None \<Rightarrow> n_s\<lparr>global_state := global_state(n_s)(x \<mapsto> v) \<rparr>)"
114+ (case (map_of (snd \<Lambda>) x) of Some res \<Rightarrow> n_s\<lparr>local_state := ( local_state(n_s)) (x \<mapsto> v) \<rparr> |
115+ None \<Rightarrow> n_s\<lparr>global_state := ( global_state(n_s) )(x \<mapsto> v) \<rparr>)"
116116
117117definition update_var_opt :: "var_context \<Rightarrow> 'a nstate \<Rightarrow> vname \<Rightarrow> 'a val option \<Rightarrow> 'a nstate"
118118 where
Original file line number Diff line number Diff line change @@ -393,27 +393,27 @@ lemma update_var_same_state:
393393 using assms update_var_def lookup_var_def
394394proof ( cases "map_of (snd \<Lambda>) x" )
395395 case None
396- hence update_global : "?ns' = ns\<lparr>global_state := global_state(ns)(x \<mapsto> v)\<rparr>"
396+ hence update_global : "?ns' = ns\<lparr>global_state := ( global_state(ns) )(x \<mapsto> v)\<rparr>"
397397 by ( simp add : update_var_def )
398398
399399 from assms have global_ns : "global_state ns x = Some v"
400400 by ( metis None lookup_var_global prod.collapse )
401401
402- have "global_state(ns)(x \<mapsto> v) = global_state ns"
402+ have "( global_state(ns) )(x \<mapsto> v) = global_state ns"
403403 apply ( rule HOL.ext )
404404 by ( simp add : global_ns )
405405 then show ?thesis
406406 using update_global
407407 by simp
408408next
409409 case ( Some a )
410- hence update_local : "?ns' = ns\<lparr>local_state := local_state(ns)(x \<mapsto> v)\<rparr>"
410+ hence update_local : "?ns' = ns\<lparr>local_state := ( local_state(ns) )(x \<mapsto> v)\<rparr>"
411411 by ( simp add : update_var_def )
412412
413413 from assms have local_ns : "local_state ns x = Some v"
414414 by ( metis Some lookup_var_local prod.collapse )
415415
416- have "local_state(ns)(x \<mapsto> v) = local_state ns"
416+ have "( local_state(ns) )(x \<mapsto> v) = local_state ns"
417417 apply ( rule HOL.ext )
418418 by ( simp add : local_ns )
419419 then show ?thesis
You can’t perform that action at this time.
0 commit comments