src/HOL/Bali/Evaln.thy
changeset 13462 56610e2ba220
parent 13384 a34e38154413
child 13601 fd3e3d6b37b2
equal deleted inserted replaced
13461:f93f7d766895 13462:56610e2ba220
   258   fun is_Inj (Const (inj,_) $ _) = true
   258   fun is_Inj (Const (inj,_) $ _) = true
   259     | is_Inj _                   = false
   259     | is_Inj _                   = false
   260   fun pred (_ $ (Const ("Pair",_) $ _ $ (Const ("Pair", _) $ _ $ 
   260   fun pred (_ $ (Const ("Pair",_) $ _ $ (Const ("Pair", _) $ _ $ 
   261     (Const ("Pair", _) $ _ $ (Const ("Pair", _) $ x $ _ )))) $ _ ) = is_Inj x
   261     (Const ("Pair", _) $ _ $ (Const ("Pair", _) $ x $ _ )))) $ _ ) = is_Inj x
   262 in
   262 in
   263   make_simproc name lhs pred (thm name)
   263   cond_simproc name lhs pred (thm name)
   264 end;
   264 end;
   265 
   265 
   266 val evaln_expr_proc = enf "expr" "In1l" "\<exists>v.  w=In1 v  \<and> G\<turnstile>s \<midarrow>t-\<succ>v \<midarrow>n\<rightarrow> s'";
   266 val evaln_expr_proc = enf "expr" "In1l" "\<exists>v.  w=In1 v  \<and> G\<turnstile>s \<midarrow>t-\<succ>v \<midarrow>n\<rightarrow> s'";
   267 val evaln_var_proc  = enf "var"  "In2"  "\<exists>vf. w=In2 vf \<and> G\<turnstile>s \<midarrow>t=\<succ>vf\<midarrow>n\<rightarrow> s'";
   267 val evaln_var_proc  = enf "var"  "In2"  "\<exists>vf. w=In2 vf \<and> G\<turnstile>s \<midarrow>t=\<succ>vf\<midarrow>n\<rightarrow> s'";
   268 val evaln_exprs_proc= enf "exprs""In3"  "\<exists>vs. w=In3 vs \<and> G\<turnstile>s \<midarrow>t\<doteq>\<succ>vs\<midarrow>n\<rightarrow> s'";
   268 val evaln_exprs_proc= enf "exprs""In3"  "\<exists>vs. w=In3 vs \<and> G\<turnstile>s \<midarrow>t\<doteq>\<succ>vs\<midarrow>n\<rightarrow> s'";
   348   fun pred (_ $ (Const ("Pair",_) $
   348   fun pred (_ $ (Const ("Pair",_) $
   349      _ $ (Const ("Pair", _) $ _ $ (Const ("Pair", _) $ _ $
   349      _ $ (Const ("Pair", _) $ _ $ (Const ("Pair", _) $ _ $
   350        (Const ("Pair", _) $ _ $ x)))) $ _ ) = is_Some x
   350        (Const ("Pair", _) $ _ $ x)))) $ _ ) = is_Some x
   351 in
   351 in
   352   val evaln_abrupt_proc = 
   352   val evaln_abrupt_proc = 
   353  make_simproc "evaln_abrupt" "G\<turnstile>(Some xc,s) \<midarrow>e\<succ>\<midarrow>n\<rightarrow> (w,s')" pred (thm "evaln_abrupt")
   353  cond_simproc "evaln_abrupt" "G\<turnstile>(Some xc,s) \<midarrow>e\<succ>\<midarrow>n\<rightarrow> (w,s')" pred (thm "evaln_abrupt")
   354 end;
   354 end;
   355 Addsimprocs [evaln_abrupt_proc]
   355 Addsimprocs [evaln_abrupt_proc]
   356 *}
   356 *}
   357 
   357 
   358 lemma evaln_LitI: "G\<turnstile>s \<midarrow>Lit v-\<succ>(if normal s then v else arbitrary)\<midarrow>n\<rightarrow> s"
   358 lemma evaln_LitI: "G\<turnstile>s \<midarrow>Lit v-\<succ>(if normal s then v else arbitrary)\<midarrow>n\<rightarrow> s"