# HG changeset patch # User wenzelm # Date 1181724218 -7200 # Node ID a1e61b5c000ff8a56858267bf4b042accb704984 # Parent f31794033ae10f629e3bcb74d8e4a2f1a4e1aed4 tuned proofs: avoid implicit prems; diff -r f31794033ae1 -r a1e61b5c000f src/HOL/Bali/AxCompl.thy --- a/src/HOL/Bali/AxCompl.thy Wed Jun 13 03:31:11 2007 +0200 +++ b/src/HOL/Bali/AxCompl.thy Wed Jun 13 10:43:38 2007 +0200 @@ -937,7 +937,7 @@ \ abupd (abrupt_if (\y. abrupt s1 = Some y) (abrupt s1)) s2" proof - obtain abr1 str1 where s1: "s1=(abr1,str1)" - by (cases s1) simp + by (cases s1) with eval_c1 eval_c2 obtain eval_c1': "G\Norm s0 \c1\ (abr1,str1)" and eval_c2': "G\Norm str1 \c2\ s2" @@ -1072,14 +1072,13 @@ done next case (FVar accC statDeclC stat e fn) - have "G,A\{=:n} \e\\<^sub>e\ {G\}". - from MGFn_Init [OF hyp] this wf + from MGFn_Init [OF hyp] and `G,A\{=:n} \e\\<^sub>e\ {G\}` and wf show ?case by (rule MGFn_FVar) next case (AVar e1 e2) - have mgf_e1: "G,A\{=:n} \e1\\<^sub>e\ {G\}". - have mgf_e2: "G,A\{=:n} \e2\\<^sub>e\ {G\}". + note mgf_e1 = `G,A\{=:n} \e1\\<^sub>e\ {G\}` + note mgf_e2 = `G,A\{=:n} \e2\\<^sub>e\ {G\}` show "G,A\{=:n} \e1.[e2]\\<^sub>v\ {G\}" apply (rule MGFn_NormalI) apply (rule ax_derivs.AVar) @@ -1222,8 +1221,8 @@ done next case (Call accC statT mode e mn pTs' ps) - have mgf_e: "G,A\{=:n} \e\\<^sub>e\ {G\}". - have mgf_ps: "G,A\{=:n} \ps\\<^sub>l\ {G\}". + note mgf_e = `G,A\{=:n} \e\\<^sub>e\ {G\}` + note mgf_ps = `G,A\{=:n} \ps\\<^sub>l\ {G\}` from mgf_methds mgf_e mgf_ps wf show "G,A\{=:n} \{accC,statT,mode}e\mn({pTs'}ps)\\<^sub>e\ {G\}" by (rule MGFn_Call) @@ -1234,7 +1233,7 @@ by simp next case (Body D c) - have mgf_c: "G,A\{=:n} \c\\<^sub>s\ {G\}" . + note mgf_c = `G,A\{=:n} \c\\<^sub>s\ {G\}` from wf MGFn_Init [OF hyp] mgf_c show "G,A\{=:n} \Body D c\\<^sub>e\ {G\}" by (rule MGFn_Body) @@ -1302,8 +1301,8 @@ done next case (Loop l e c) - have mgf_e: "G,A\{=:n} \e\\<^sub>e\ {G\}". - have mgf_c: "G,A\{=:n} \c\\<^sub>s\ {G\}". + note mgf_e = `G,A\{=:n} \e\\<^sub>e\ {G\}` + note mgf_c = `G,A\{=:n} \c\\<^sub>s\ {G\}` from mgf_e mgf_c wf show "G,A\{=:n} \l\ While(e) c\\<^sub>s\ {G\}" by (rule MGFn_Loop) @@ -1339,8 +1338,8 @@ done next case (Fin c1 c2) - have mgf_c1: "G,A\{=:n} \c1\\<^sub>s\ {G\}". - have mgf_c2: "G,A\{=:n} \c2\\<^sub>s\ {G\}". + note mgf_c1 = `G,A\{=:n} \c1\\<^sub>s\ {G\}` + note mgf_c2 = `G,A\{=:n} \c2\\<^sub>s\ {G\}` from wf mgf_c1 mgf_c2 show "G,A\{=:n} \c1 Finally c2\\<^sub>s\ {G\}" by (rule MGFn_Fin) diff -r f31794033ae1 -r a1e61b5c000f src/HOL/Bali/AxSound.thy --- a/src/HOL/Bali/AxSound.thy Wed Jun 13 03:31:11 2007 +0200 +++ b/src/HOL/Bali/AxSound.thy Wed Jun 13 10:43:38 2007 +0200 @@ -564,7 +564,7 @@ from eval wt da conf_s0 wf have "s3\\(G, L)" by (rule evaln_type_sound [elim_format]) simp - ultimately show ?thesis using Q by simp + ultimately show ?thesis using Q R by simp qed qed next @@ -612,8 +612,8 @@ from eval_e1 wt_e1 da_e1 wf True have "nrm E1 \ dom (locals (store s1))" by (cases rule: da_good_approx_evalnE) iprover - with da_e2 show ?thesis - by (rule da_weakenE) + with da_e2 show thesis + by (rule da_weakenE) (rule that) qed with valid_e2 Q' valid_A conf_s1 eval_e2 wt_e2 show ?thesis @@ -633,7 +633,7 @@ qed next case (NewC A P C Q) - have valid_init: "G,A|\\{ {Normal P} .Init C. {Alloc G (CInst C) Q} }". + note valid_init = `G,A|\\{ {Normal P} .Init C. {Alloc G (CInst C) Q} }` show "G,A|\\{ {Normal P} NewC C-\ {Q} }" proof (rule valid_expr_NormalI) fix n s0 L accC T E v s2 Y Z @@ -728,8 +728,8 @@ from eval_init have "dom (locals (store s0)) \ dom (locals (store s1))" by (rule dom_locals_evaln_mono_elim) - with da_e show ?thesis - by (rule da_weakenE) + with da_e show thesis + by (rule da_weakenE) (rule that) qed with valid_e Q valid_A conf_s1 eval_e wt_e have "(\Val:i:. abupd (check_neg i) .; @@ -746,9 +746,9 @@ qed next case (Cast A P e T Q) - have valid_e: "G,A|\\{ {Normal P} e-\ + note valid_e = `G,A|\\{ {Normal P} e-\ {\Val:v:. \s.. abupd (raise_if (\ G,s\v fits T) ClassCast) .; - Q\In1 v} }" . + Q\In1 v} }` show "G,A|\\{ {Normal P} Cast T e-\ {Q} }" proof (rule valid_expr_NormalI) fix n s0 L accC castT E v s2 Y Z @@ -1060,8 +1060,8 @@ from eval_var wt_var da_var wf True have "nrm V \ dom (locals (store s1))" by (cases rule: da_good_approx_evalnE) iprover - with da_e show ?thesis - by (rule da_weakenE) + with da_e show thesis + by (rule da_weakenE) (rule that) qed note ve=validE [OF valid_e,OF Q' valid_A conf_s1 eval_e wt_e da_e'] show ?thesis @@ -1101,8 +1101,8 @@ from eval_var have "dom (locals (store s0)) \ dom (locals (store (s1)))" by (rule dom_locals_evaln_mono_elim) - with da_e show ?thesis - by (rule da_weakenE) + with da_e show thesis + by (rule da_weakenE) (rule that) qed note ve=validE [OF valid_e,OF Q' valid_A conf_s1 eval_e wt_e da_e'] show ?thesis @@ -1296,8 +1296,8 @@ from evaln_e wt_e da_e wf True have "nrm C \ dom (locals (store s1))" by (cases rule: da_good_approx_evalnE) iprover - with da_args show ?thesis - by (rule da_weakenE) + with da_args show thesis + by (rule da_weakenE) (rule that) qed with valid_args Q valid_A conf_s1 evaln_args wt_args obtain "(R a) \vs\\<^sub>l s2 Z" "s2\\(G,L)" @@ -1364,7 +1364,7 @@ by (cases s2) (auto simp add: init_lvars_def2 split: split_if_asm) moreover obtain abr2 str2 where s2: "s2=(abr2,str2)" - by (cases s2) simp + by (cases s2) from s3 s2 conf_s2 have "(abrupt s3,str2)\\(G, L)" by (auto simp add: init_lvars_def2 split: split_if_asm) ultimately show ?thesis @@ -1401,8 +1401,8 @@ from evaln_e wt_e da_e wf normal_s1 have "nrm C \ dom (locals (store s1))" by (cases rule: da_good_approx_evalnE) iprover - with da_args show ?thesis - by (rule da_weakenE) + with da_args show thesis + by (rule da_weakenE) (rule that) qed from evaln_args have eval_args: "G\s1 \args\\vs\ s2" @@ -1583,9 +1583,9 @@ using da by (iprover intro: da.Body assigned.select_convs) from _ this [simplified] - show ?thesis + show thesis by (rule da.Methd [simplified,elim_format]) - (auto intro: dynM') + (auto intro: dynM' that) qed from valid_methd R' valid_A conf_s3' evaln_methd wt_methd da_methd have "(set_lvars l .; S) \v\\<^sub>e s4 Z" @@ -1599,9 +1599,9 @@ qed next case (Methd A P Q ms) - have valid_body: "G,A \ {{P} Methd-\ {Q} | ms}|\\{{P} body G-\ {Q} | ms}". + note valid_body = `G,A \ {{P} Methd-\ {Q} | ms}|\\{{P} body G-\ {Q} | ms}` show "G,A|\\{{P} Methd-\ {Q} | ms}" - by (rule Methd_sound) + by (rule Methd_sound) (rule Methd.hyps) next case (Body A P D Q c R) note valid_init = `G,A|\\{ {Normal P} .Init D. {Q} }` @@ -1646,7 +1646,7 @@ from eval_init have "(dom (locals (store s0))) \ (dom (locals (store s1)))" by (rule dom_locals_evaln_mono_elim) - with da_c show ?thesis by (rule da_weakenE) + with da_c show thesis by (rule da_weakenE) (rule that) qed from valid_init P valid_A conf_s0 eval_init wt_init da_init obtain Q: "Q \ s1 Z" and conf_s1: "s1\\(G,L)" @@ -1697,7 +1697,7 @@ qed next case (Cons A P e Q es R) - have valid_e: "G,A|\\{ {Normal P} e-\ {Q} }". + note valid_e = `G,A|\\{ {Normal P} e-\ {Q} }` have valid_es: "\ v. G,A|\\{ {Q\\v\\<^sub>e} es\\ {\Vals:vs:. R\\(v # vs)\\<^sub>l} }" using Cons.hyps by simp show "G,A|\\{ {Normal P} e # es\\ {R} }" @@ -1739,8 +1739,8 @@ from eval_e wt_e da_e wf True have "nrm E1 \ dom (locals (store s1))" by (cases rule: da_good_approx_evalnE) iprover - with da_es show ?thesis - by (rule da_weakenE) + with da_es show thesis + by (rule da_weakenE) (rule that) qed from valid_es Q' valid_A conf_s1 eval_es wt_es da_es' show ?thesis @@ -1884,8 +1884,8 @@ from eval_c1 wt_c1 da_c1 wf True have "nrm C1 \ dom (locals (store s1))" by (cases rule: da_good_approx_evalnE) iprover - with da_c2 show ?thesis - by (rule da_weakenE) + with da_c2 show thesis + by (rule da_weakenE) (rule that) qed with valid_c2 Q valid_A conf_s1 eval_c2 wt_c2 show ?thesis @@ -2091,8 +2091,8 @@ have "dom (locals (store ((Norm s0')::state))) \ assigns_if True e \ dom (locals (store s1'))" by (rule Un_least) - with da_c show ?thesis - by (rule da_weakenE) + with da_c show thesis + by (rule da_weakenE) (rule that) qed with valid_c P'' valid_A conf_s1' eval_c wt_c obtain "(abupd (absorb (Cont l)) .; P) \ s2' Z" and @@ -2173,10 +2173,10 @@ qed next case (Abrupt abr s t' n' Y' T E) - have t': "t' = \l\ While(e) c\\<^sub>s". - have conf: "(Some abr, s)\\(G, L)". - have P: "P Y' (Some abr, s) Z". - have valid_A: "\t\A. G\n'\t". + note t' = `t' = \l\ While(e) c\\<^sub>s` + note conf = `(Some abr, s)\\(G, L)` + note P = `P Y' (Some abr, s) Z` + note valid_A = `\t\A. G\n'\t` show "(P'\=False\=\) (arbitrary3 t') (Some abr, s) Z" proof - have eval_e: @@ -2188,7 +2188,7 @@ with t' show ?thesis by auto qed - qed (simp_all) + qed simp_all } note generalized=this from eval _ valid_A P conf_s0 wt da have "(P'\=False\=\) \ s3 Z" @@ -2388,8 +2388,8 @@ ultimately show ?thesis by (rule Un_least) qed - with da_c2 show ?thesis - by (rule da_weakenE) + with da_c2 show thesis + by (rule da_weakenE) (rule that) qed from Q eval_c2 True have "(Q \. (\s. G,s\catch C) ;. new_xcpt_var vn) @@ -2466,8 +2466,8 @@ hence "dom (locals (store s0)) \ dom (locals (store ((Norm s1)::state)))" by simp - with da_c2 show ?thesis - by (rule da_weakenE) + with da_c2 show thesis + by (rule da_weakenE) (rule that) qed from valid_c2 Q' valid_A conf_Norm_s1 eval_c2 wt_c2 da_c2' have "(abupd (abrupt_if (abr1 \ None) abr1) .; R) \ s2 Z"