# HG changeset patch # User wenzelm # Date 1731784946 -3600 # Node ID d8f77c1c97034e1a8d73ebdeb035cc3ecb14ef54 # Parent dc35aa7d5311781e52b72c4362101febf8b5363b tuned proofs; diff -r dc35aa7d5311 -r d8f77c1c9703 src/HOL/Bali/AxCompl.thy --- a/src/HOL/Bali/AxCompl.thy Sat Nov 16 19:54:30 2024 +0100 +++ b/src/HOL/Bali/AxCompl.thy Sat Nov 16 20:22:26 2024 +0100 @@ -337,7 +337,7 @@ apply (rule MGFnD' [THEN conseq12, THEN allI]) apply (clarsimp simp add: split_paired_all) apply (rule eval.Init [OF c]) - apply (insert c) + using c apply auto done qed @@ -579,7 +579,7 @@ note abrupt_s' = this from eval_e _ wt wf have no_cont: "abrupt s' \ Some (Jump (Cont l))" - by (rule eval_expression_no_jump') (insert normal_t,simp) + by (rule eval_expression_no_jump') (use normal_t in simp) have "if the_Bool v then (G\s' \c\ s' \ diff -r dc35aa7d5311 -r d8f77c1c9703 src/HOL/Bali/AxSound.thy --- a/src/HOL/Bali/AxSound.thy Sat Nov 16 19:54:30 2024 +0100 +++ b/src/HOL/Bali/AxSound.thy Sat Nov 16 20:22:26 2024 +0100 @@ -917,7 +917,7 @@ case True from eval_e1 wt_e1 da_e1 conf_s0 wf have conf_v1: "G,store s1\v1\\e1T" - by (rule evaln_type_sound [elim_format]) (insert True,simp) + by (rule evaln_type_sound [elim_format]) (use True in simp) from eval_e1 have "G\s0 \e1-\v1\ s1" by (rule evaln_eval) @@ -985,7 +985,7 @@ by cases simp from da obtain V where da_var: "\prg=G,cls=accC,lcl=L\ \ dom (locals (store s0)) \\var\\<^sub>v\ V" - by (cases "\ n. var=LVar n") (insert da.LVar,auto elim!: da_elim_cases) + by (cases "\ n. var=LVar n") (use da.LVar in \auto elim!: da_elim_cases\) from eval obtain upd where eval_var: "G\s0 \var=\(v, upd)\n\ s1" using normal_s0 by (fastforce elim: evaln_elim_cases) @@ -1266,7 +1266,7 @@ have s1_no_return: "abrupt s1 \ Some (Jump Ret)" by (rule eval_expression_no_jump [where ?Env="\prg=G,cls=accC,lcl=L\",simplified]) - (insert normal_s0,auto) + (use normal_s0 in auto) from valid_e P valid_A conf_s0 evaln_e wt_e da_e obtain "Q \a\\<^sub>e s1 Z" and conf_s1: "s1\\(G,L)" @@ -1397,13 +1397,13 @@ by (rule evaln_eval) from evaln_e wt_e da_e conf_s0 wf have conf_a: "G, store s1\a\\RefT statT" - by (rule evaln_type_sound [elim_format]) (insert normal_s1,simp) + by (rule evaln_type_sound [elim_format]) (use normal_s1 in simp) with normal_s1 normal_s2 eval_args have conf_a_s2: "G, store s2\a\\RefT statT" by (auto dest: eval_gext) from evaln_args wt_args da_args' conf_s1 wf have conf_args: "list_all2 (conf G (store s2)) vs pTs" - by (rule evaln_type_sound [elim_format]) (insert normal_s2,simp) + by (rule evaln_type_sound [elim_format]) (use normal_s2 in simp) from statM obtain statM': "(statDeclT,statM)\mheads G accC statT \name=mn,parTs=pTs'\" @@ -1645,10 +1645,9 @@ by (rule validE) have "s3=s2" proof - - from eval_init [THEN evaln_eval] wf have s1_no_jmp: "\ j. abrupt s1 \ Some (Jump j)" - by - (rule eval_statement_no_jump [OF _ _ _ wt_init], - insert normal_s0,auto) + by (rule eval_statement_no_jump [OF _ _ _ wt_init]) + (use eval_init [THEN evaln_eval] wf normal_s0 in auto) from eval_c [THEN evaln_eval] _ wt_c wf have "\ j. abrupt s2 = Some (Jump j) \ j=Ret" by (rule jumpNestingOk_evalE) (auto intro: jmpOk simp add: s1_no_jmp) @@ -2310,7 +2309,7 @@ from sxalloc wf have "s2=s1" by (rule sxalloc_type_sound [elim_format]) - (insert False, auto split: option.splits abrupt.splits ) + (use False in \auto split: option.splits abrupt.splits\) with False have no_catch: "\ G,s2\catch C" by (simp add: catch_def) @@ -2437,7 +2436,7 @@ by auto from eval_c1 wt_c1 da_c1 conf_s0 wf have "error_free (abr1,s1)" - by (rule evaln_type_sound [elim_format]) (insert normal_s0,simp) + by (rule evaln_type_sound [elim_format]) (use normal_s0 in simp) with s3 have s3': "s3 = abupd (abrupt_if (abr1 \ None) abr1) s2" by (simp add: error_free_def) from conf_s1 @@ -2544,8 +2543,8 @@ using that by (auto intro: assigned.select_convs) next case False - with da_Init show ?thesis - by - (rule that, auto intro: assigned.select_convs) + show ?thesis + by (rule that) (use da_Init False in \auto intro: assigned.select_convs\) qed from normal_s0 conf_s0 wf cls_C not_inited have conf_init_cls: "(Norm ((init_class_obj G C) (store s0)))\\(G, L)" diff -r dc35aa7d5311 -r d8f77c1c9703 src/HOL/Bali/DefiniteAssignment.thy --- a/src/HOL/Bali/DefiniteAssignment.thy Sat Nov 16 19:54:30 2024 +0100 +++ b/src/HOL/Bali/DefiniteAssignment.thy Sat Nov 16 20:22:26 2024 +0100 @@ -1201,11 +1201,11 @@ by blast note hyp_c2 = \PROP ?Hyp Env B \c2\ C2\ from da_c2' B' - obtain "nrm C2 \ nrm C2'" "(\l. brk C2 l \ brk C2' l)" - by - (drule hyp_c2,auto) - with A A' C1' - show ?case - by auto + obtain "nrm C2 \ nrm C2'" "(\l. brk C2 l \ brk C2' l)" + by - (drule hyp_c2,auto) + with A A' C1' + show ?case + by auto next case Init thus ?case by (elim da_elim_cases) auto next diff -r dc35aa7d5311 -r d8f77c1c9703 src/HOL/Bali/DefiniteAssignmentCorrect.thy --- a/src/HOL/Bali/DefiniteAssignmentCorrect.thy Sat Nov 16 19:54:30 2024 +0100 +++ b/src/HOL/Bali/DefiniteAssignmentCorrect.thy Sat Nov 16 20:22:26 2024 +0100 @@ -3805,7 +3805,7 @@ from Ass.prems obtain E where da_e: "Env\ dom (locals (store ((Norm s0)::state))) \\e\\ E" and nrm_A: "nrm A = nrm E \ {vn}" - by (elim da_elim_cases) (insert vn,auto) + by (elim da_elim_cases) (use vn in auto) obtain E' where da_e': "Env\ dom (locals (store s1)) \\e\\ E'" and E_E': "nrm E \ nrm E'" @@ -3849,7 +3849,7 @@ from Ass.prems obtain V where da_var: "Env\ dom (locals (store ((Norm s0)::state))) \\var\\ V" and da_e: "Env\ nrm V \\e\\ A" - by (elim da_elim_cases) (insert False,simp+) + by (elim da_elim_cases) (use False in simp_all) from hyp_var wt_var da_var G normal_s1 have "nrm V \ dom (locals (store s1))" by simp diff -r dc35aa7d5311 -r d8f77c1c9703 src/HOL/Bali/TypeSafe.thy --- a/src/HOL/Bali/TypeSafe.thy Sat Nov 16 19:54:30 2024 +0100 +++ b/src/HOL/Bali/TypeSafe.thy Sat Nov 16 20:22:26 2024 +0100 @@ -560,7 +560,7 @@ eq_declC_sm_dm:"statDeclT = ClassT (declclass dm)" and eq_mheads:"sm=mhead (mthd dm) " by - (drule static_mheadsD, (force dest: accmethd_SomeD)+) - then have static: "is_static dm = is_static sm" by - (auto) + then have static: "is_static dm = is_static sm" by auto with declC invC dynlookup_static dm have declC': "declC = (declclass dm)" by (auto simp add: invocation_declclass_def) @@ -1421,9 +1421,8 @@ next case (Cons y tl) note ys = \ys=y#tl\ - with tab_vn tab'_vn have "(tab(x\y)) vn = Some el" - by - (rule Cons.hyps,auto) + by (rule Cons.hyps) (use tab_vn tab'_vn ys in auto) moreover from tab'_vn ys have "(tab'(x\y, xs[\]tl)) vn = None" by simp @@ -1503,8 +1502,8 @@ case Nil with len show ?thesis by simp next case (Cons y tl) - with len have "dom (tab(x\y, xs[\]tl)) = dom (tab(x\y)) \ set xs" - by - (rule Hyp,simp) + have "dom (tab(x\y, xs[\]tl)) = dom (tab(x\y)) \ set xs" + by (rule Hyp) (use len Cons in simp) moreover have "dom (tab(x\hd ys)) = dom tab \ {x}" by (rule dom_map_upd) @@ -1637,7 +1636,7 @@ from eval_e1 normal_s1 have "assigns_if True e1 \ dom (locals (store s1))" by (rule assigns_if_good_approx' [elim_format]) - (insert wt_e1, simp_all add: e1T v1) + (use wt_e1 in \simp_all add: e1T v1\) with s0_s1 show ?thesis by (rule Un_least) qed ultimately show ?thesis @@ -1663,7 +1662,7 @@ from eval_e1 normal_s1 have "assigns_if False e1 \ dom (locals (store s1))" by (rule assigns_if_good_approx' [elim_format]) - (insert wt_e1, simp_all add: e1T v1) + (use wt_e1 in \simp_all add: e1T v1\) with s0_s1 show ?thesis by (rule Un_least) qed ultimately show ?thesis @@ -2102,7 +2101,7 @@ from sx_alloc wf have eq_s2_s1: "s2=s1" by (rule sxalloc_type_sound [elim_format]) - (insert False, auto split: option.splits abrupt.splits ) + (use False in \auto split: option.splits abrupt.splits\) with False have "\ G,s2\catch catchC" by (simp add: catch_def) @@ -2258,8 +2257,7 @@ note cls = \the (class G C) = c\ note conf_s0 = \Norm s0\\(G, L)\ note wt = \\prg = G, cls = accC, lcl = L\\In1r (Init C)\T\ - with cls - have cls_C: "class G C = Some c" + with cls have cls_C: "class G C = Some c" by - (erule wt_elim_cases, auto) show "s3\\(G, L) \ (normal s3 \ G,L,store s3\In1r (Init C)\\\\T) \ (error_free (Norm s0) = error_free s3)" @@ -2305,8 +2303,8 @@ using that by (auto intro: assigned.select_convs) next case False - with da_Init show ?thesis - by - (rule that, auto intro: assigned.select_convs) + show ?thesis + by (rule that) (use da_Init False in \auto intro: assigned.select_convs\) qed ultimately obtain conf_s1: "s1\\(G, L)" and error_free_s1: "error_free s1" @@ -2418,17 +2416,17 @@ \ dom (locals (store ((Norm s0)::state))) \In1r (init_comp_ty elT)\ I" proof (cases "\C. elT = Class C") case True - thus ?thesis - by - (rule that, (auto intro: da_Init [simplified] - assigned.select_convs - simp add: init_comp_ty_def)) + show ?thesis + by (rule that) + (use True in \auto intro: da_Init [simplified] assigned.select_convs + simp add: init_comp_ty_def\) (* simplified: to rewrite \Init C\ to In1r (Init C) *) next case False - thus ?thesis - by - (rule that, (auto intro: da_Skip [simplified] - assigned.select_convs - simp add: init_comp_ty_def)) + show ?thesis + by (rule that) + (use False in \auto intro: da_Skip [simplified] assigned.select_convs + simp add: init_comp_ty_def\) (* simplified: to rewrite \Skip\ to In1r (Skip) *) qed ultimately show thesis @@ -2683,7 +2681,7 @@ from Acc.prems obtain V where da_v: "\prg=G,cls=accC,lcl=L\ \ dom (locals (store ((Norm s0)::state))) \In2 v\ V" - by (cases "\ n. v=LVar n") (insert da.LVar, auto elim!: da_elim_cases) + by (cases "\ n. v=LVar n") (use da.LVar in \auto elim!: da_elim_cases\) have lvar_in_locals: "locals (store s1) n \ None" if lvar: "v=LVar n" for n proof - @@ -3384,9 +3382,8 @@ from iscls_D have wt_init: "\prg=G, cls=accC, lcl=L\\(Init D)\\" by auto - from eval_init wf have s1_no_jmp: "\ j. abrupt s1 \ Some (Jump j)" - by - (rule eval_statement_no_jump [OF _ _ _ wt_init],auto) + by (rule eval_statement_no_jump [OF _ _ _ wt_init]) (use eval_init wf in auto) from eval_c _ wt_c wf have "\ j. abrupt s2 = Some (Jump j) \ j=Ret" by (rule jumpNestingOk_evalE) (auto intro: jmpOk simp add: s1_no_jmp)