author | wenzelm |
Thu, 10 Nov 2005 20:57:11 +0100 | |
changeset 18145 | 6757627acf59 |
parent 17374 | 63e0ab9f2ea9 |
child 20195 | ae79b9ad7224 |
permissions | -rw-r--r-- |
12857 | 1 |
(* Title: HOL/Bali/AxExample.thy |
12854 | 2 |
ID: $Id$ |
3 |
Author: David von Oheimb |
|
4 |
*) |
|
12925
99131847fb93
Added check for field/method access to operational semantics and proved the acesses valid.
schirmer
parents:
12859
diff
changeset
|
5 |
|
12854 | 6 |
header {* Example of a proof based on the Bali axiomatic semantics *} |
7 |
||
16417 | 8 |
theory AxExample imports AxSem Example begin |
12854 | 9 |
|
10 |
constdefs |
|
11 |
arr_inv :: "st \<Rightarrow> bool" |
|
12 |
"arr_inv \<equiv> \<lambda>s. \<exists>obj a T el. globs s (Stat Base) = Some obj \<and> |
|
13 |
values obj (Inl (arr, Base)) = Some (Addr a) \<and> |
|
14 |
heap s a = Some \<lparr>tag=Arr T 2,values=el\<rparr>" |
|
15 |
||
16 |
lemma arr_inv_new_obj: |
|
17 |
"\<And>a. \<lbrakk>arr_inv s; new_Addr (heap s)=Some a\<rbrakk> \<Longrightarrow> arr_inv (gupd(Inl a\<mapsto>x) s)" |
|
18 |
apply (unfold arr_inv_def) |
|
19 |
apply (force dest!: new_AddrD2) |
|
20 |
done |
|
21 |
||
22 |
lemma arr_inv_set_locals [simp]: "arr_inv (set_locals l s) = arr_inv s" |
|
23 |
apply (unfold arr_inv_def) |
|
24 |
apply (simp (no_asm)) |
|
25 |
done |
|
26 |
||
27 |
lemma arr_inv_gupd_Stat [simp]: |
|
28 |
"Base \<noteq> C \<Longrightarrow> arr_inv (gupd(Stat C\<mapsto>obj) s) = arr_inv s" |
|
29 |
apply (unfold arr_inv_def) |
|
30 |
apply (simp (no_asm_simp)) |
|
31 |
done |
|
32 |
||
33 |
lemma ax_inv_lupd [simp]: "arr_inv (lupd(x\<mapsto>y) s) = arr_inv s" |
|
34 |
apply (unfold arr_inv_def) |
|
35 |
apply (simp (no_asm)) |
|
36 |
done |
|
37 |
||
38 |
||
39 |
declare split_if_asm [split del] |
|
40 |
declare lvar_def [simp] |
|
41 |
||
16121 | 42 |
ML {* |
17374 | 43 |
fun inst1_tac s t st = case AList.lookup (op =) (rev (term_varnames (prop_of st))) s of |
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
44 |
SOME i => Tactic.instantiate_tac' [((s, i), t)] st | NONE => Seq.empty; |
12854 | 45 |
val ax_tac = REPEAT o rtac allI THEN' |
46 |
resolve_tac(thm "ax_Skip"::thm "ax_StatRef"::thm "ax_MethdN":: |
|
47 |
thm "ax_Alloc"::thm "ax_Alloc_Arr":: |
|
48 |
thm "ax_SXAlloc_Normal":: |
|
49 |
funpow 7 tl (thms "ax_derivs.intros")) |
|
50 |
*} |
|
51 |
||
52 |
||
53 |
theorem ax_test: "tprg,({}::'a triple set)\<turnstile> |
|
54 |
{Normal (\<lambda>Y s Z::'a. heap_free four s \<and> \<not>initd Base s \<and> \<not> initd Ext s)} |
|
13688
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
55 |
.test [Class Base]. |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
56 |
{\<lambda>Y s Z. abrupt s = Some (Xcpt (Std IndOutBound))}" |
12854 | 57 |
apply (unfold test_def arr_viewed_from_def) |
58 |
apply (tactic "ax_tac 1" (*;;*)) |
|
13688
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
59 |
defer (* We begin with the last assertion, to synthesise the intermediate |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
60 |
assertions, like in the fashion of the weakest |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
61 |
precondition. *) |
12854 | 62 |
apply (tactic "ax_tac 1" (* Try *)) |
63 |
defer |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
64 |
apply (tactic {* inst1_tac "Q" |
12854 | 65 |
"\<lambda>Y s Z. arr_inv (snd s) \<and> tprg,s\<turnstile>catch SXcpt NullPointer" *}) |
66 |
prefer 2 |
|
67 |
apply simp |
|
68 |
apply (rule_tac P' = "Normal (\<lambda>Y s Z. arr_inv (snd s))" in conseq1) |
|
69 |
prefer 2 |
|
70 |
apply clarsimp |
|
71 |
apply (rule_tac Q' = "(\<lambda>Y s Z. ?Q Y s Z)\<leftarrow>=False\<down>=\<diamondsuit>" in conseq2) |
|
72 |
prefer 2 |
|
73 |
apply simp |
|
74 |
apply (tactic "ax_tac 1" (* While *)) |
|
75 |
prefer 2 |
|
76 |
apply (rule ax_impossible [THEN conseq1], clarsimp) |
|
77 |
apply (rule_tac P' = "Normal ?P" in conseq1) |
|
78 |
prefer 2 |
|
79 |
apply clarsimp |
|
80 |
apply (tactic "ax_tac 1") |
|
81 |
apply (tactic "ax_tac 1" (* AVar *)) |
|
82 |
prefer 2 |
|
83 |
apply (rule ax_subst_Val_allI) |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
84 |
apply (tactic {* inst1_tac "P'" "\<lambda>u a. Normal (?PP a\<leftarrow>?x) u" *}) |
12854 | 85 |
apply (simp del: avar_def2 peek_and_def2) |
86 |
apply (tactic "ax_tac 1") |
|
87 |
apply (tactic "ax_tac 1") |
|
88 |
(* just for clarification: *) |
|
89 |
apply (rule_tac Q' = "Normal (\<lambda>Var:(v, f) u ua. fst (snd (avar tprg (Intg 2) v u)) = Some (Xcpt (Std IndOutBound)))" in conseq2) |
|
90 |
prefer 2 |
|
91 |
apply (clarsimp simp add: split_beta) |
|
92 |
apply (tactic "ax_tac 1" (* FVar *)) |
|
93 |
apply (tactic "ax_tac 2" (* StatRef *)) |
|
94 |
apply (rule ax_derivs.Done [THEN conseq1]) |
|
95 |
apply (clarsimp simp add: arr_inv_def inited_def in_bounds_def) |
|
96 |
defer |
|
97 |
apply (rule ax_SXAlloc_catch_SXcpt) |
|
98 |
apply (rule_tac Q' = "(\<lambda>Y (x, s) Z. x = Some (Xcpt (Std NullPointer)) \<and> arr_inv s) \<and>. heap_free two" in conseq2) |
|
99 |
prefer 2 |
|
100 |
apply (simp add: arr_inv_new_obj) |
|
101 |
apply (tactic "ax_tac 1") |
|
102 |
apply (rule_tac C = "Ext" in ax_Call_known_DynT) |
|
103 |
apply (unfold DynT_prop_def) |
|
104 |
apply (simp (no_asm)) |
|
105 |
apply (intro strip) |
|
106 |
apply (rule_tac P' = "Normal ?P" in conseq1) |
|
107 |
apply (tactic "ax_tac 1" (* Methd *)) |
|
108 |
apply (rule ax_thin [OF _ empty_subsetI]) |
|
109 |
apply (simp (no_asm) add: body_def2) |
|
110 |
apply (tactic "ax_tac 1" (* Body *)) |
|
111 |
(* apply (rule_tac [2] ax_derivs.Abrupt) *) |
|
112 |
defer |
|
113 |
apply (simp (no_asm)) |
|
13688
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
114 |
apply (tactic "ax_tac 1") (* Comp *) |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
115 |
(* The first statement in the composition |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
116 |
((Ext)z).vee = 1; Return Null |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
117 |
will throw an exception (since z is null). So we can handle |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
118 |
Return Null with the Abrupt rule *) |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
119 |
apply (rule_tac [2] ax_derivs.Abrupt) |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
120 |
|
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
121 |
apply (rule ax_derivs.Expr) (* Expr *) |
12854 | 122 |
apply (tactic "ax_tac 1") (* Ass *) |
123 |
prefer 2 |
|
124 |
apply (rule ax_subst_Var_allI) |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
125 |
apply (tactic {* inst1_tac "P'" "\<lambda>a vs l vf. ?PP a vs l vf\<leftarrow>?x \<and>. ?p" *}) |
12854 | 126 |
apply (rule allI) |
127 |
apply (tactic {* simp_tac (simpset() delloop "split_all_tac" delsimps [thm "peek_and_def2"]) 1 *}) |
|
128 |
apply (rule ax_derivs.Abrupt) |
|
129 |
apply (simp (no_asm)) |
|
130 |
apply (tactic "ax_tac 1" (* FVar *)) |
|
131 |
apply (tactic "ax_tac 2", tactic "ax_tac 2", tactic "ax_tac 2") |
|
132 |
apply (tactic "ax_tac 1") |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
133 |
apply (tactic {* inst1_tac "R" "\<lambda>a'. Normal ((\<lambda>Vals:vs (x, s) Z. arr_inv s \<and> inited Ext (globs s) \<and> a' \<noteq> Null \<and> vs = [Null]) \<and>. heap_free two)" *}) |
13688
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
134 |
apply fastsimp |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
135 |
prefer 4 |
a0b16d42d489
"Definite Assignment Analysis" included, with proof of correctness. Large adjustments of type safety proof and soundness proof of the axiomatic semantics were necessary. Completeness proof of the loop rule of the axiomatic semantic was altered. So the additional polymorphic variants of some rules could be removed.
schirmer
parents:
12925
diff
changeset
|
136 |
apply (rule ax_derivs.Done [THEN conseq1],force) |
12854 | 137 |
apply (rule ax_subst_Val_allI) |
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
138 |
apply (tactic {* inst1_tac "P'" "\<lambda>u a. Normal (?PP a\<leftarrow>?x) u" *}) |
12854 | 139 |
apply (simp (no_asm) del: peek_and_def2) |
140 |
apply (tactic "ax_tac 1") |
|
141 |
prefer 2 |
|
142 |
apply (rule ax_subst_Val_allI) |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
143 |
apply (tactic {* inst1_tac "P'" "\<lambda>aa v. Normal (?QQ aa v\<leftarrow>?y)" *}) |
12854 | 144 |
apply (simp del: peek_and_def2) |
145 |
apply (tactic "ax_tac 1") |
|
146 |
apply (tactic "ax_tac 1") |
|
147 |
apply (tactic "ax_tac 1") |
|
148 |
apply (tactic "ax_tac 1") |
|
149 |
(* end method call *) |
|
150 |
apply (simp (no_asm)) |
|
151 |
(* just for clarification: *) |
|
152 |
apply (rule_tac Q' = "Normal ((\<lambda>Y (x, s) Z. arr_inv s \<and> (\<exists>a. the (locals s (VName e)) = Addr a \<and> obj_class (the (globs s (Inl a))) = Ext \<and> |
|
153 |
invocation_declclass tprg IntVir s (the (locals s (VName e))) (ClassT Base) |
|
154 |
\<lparr>name = foo, parTs = [Class Base]\<rparr> = Ext)) \<and>. initd Ext \<and>. heap_free two)" |
|
155 |
in conseq2) |
|
156 |
prefer 2 |
|
157 |
apply clarsimp |
|
158 |
apply (tactic "ax_tac 1") |
|
159 |
apply (tactic "ax_tac 1") |
|
160 |
defer |
|
161 |
apply (rule ax_subst_Var_allI) |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
162 |
apply (tactic {* inst1_tac "P'" "\<lambda>u vf. Normal (?PP vf \<and>. ?p) u" *}) |
12854 | 163 |
apply (simp (no_asm) del: split_paired_All peek_and_def2) |
164 |
apply (tactic "ax_tac 1" (* NewC *)) |
|
165 |
apply (tactic "ax_tac 1" (* ax_Alloc *)) |
|
166 |
(* just for clarification: *) |
|
167 |
apply (rule_tac Q' = "Normal ((\<lambda>Y s Z. arr_inv (store s) \<and> vf=lvar (VName e) (store s)) \<and>. heap_free tree \<and>. initd Ext)" in conseq2) |
|
168 |
prefer 2 |
|
169 |
apply (simp add: invocation_declclass_def dynmethd_def) |
|
170 |
apply (unfold dynlookup_def) |
|
171 |
apply (simp add: dynmethd_Ext_foo) |
|
172 |
apply (force elim!: arr_inv_new_obj atleast_free_SucD atleast_free_weaken) |
|
173 |
(* begin init *) |
|
174 |
apply (rule ax_InitS) |
|
175 |
apply force |
|
176 |
apply (simp (no_asm)) |
|
177 |
apply (tactic {* simp_tac (simpset() delloop "split_all_tac") 1 *}) |
|
178 |
apply (rule ax_Init_Skip_lemma) |
|
179 |
apply (tactic {* simp_tac (simpset() delloop "split_all_tac") 1 *}) |
|
180 |
apply (rule ax_InitS [THEN conseq1] (* init Base *)) |
|
181 |
apply force |
|
182 |
apply (simp (no_asm)) |
|
183 |
apply (unfold arr_viewed_from_def) |
|
184 |
apply (rule allI) |
|
185 |
apply (rule_tac P' = "Normal ?P" in conseq1) |
|
186 |
apply (tactic {* simp_tac (simpset() delloop "split_all_tac") 1 *}) |
|
187 |
apply (tactic "ax_tac 1") |
|
188 |
apply (tactic "ax_tac 1") |
|
189 |
apply (rule_tac [2] ax_subst_Var_allI) |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
190 |
apply (tactic {* inst1_tac "P'" "\<lambda>vf l vfa. Normal (?P vf l vfa)" *}) |
12854 | 191 |
apply (tactic {* simp_tac (simpset() delloop "split_all_tac" delsimps [split_paired_All, thm "peek_and_def2"]) 2 *}) |
192 |
apply (tactic "ax_tac 2" (* NewA *)) |
|
193 |
apply (tactic "ax_tac 3" (* ax_Alloc_Arr *)) |
|
194 |
apply (tactic "ax_tac 3") |
|
195 |
apply (tactic {* inst1_tac "P" "\<lambda>vf l vfa. Normal (?P vf l vfa\<leftarrow>\<diamondsuit>)" *}) |
|
196 |
apply (tactic {* simp_tac (simpset() delloop "split_all_tac") 2 *}) |
|
197 |
apply (tactic "ax_tac 2") |
|
198 |
apply (tactic "ax_tac 1" (* FVar *)) |
|
199 |
apply (tactic "ax_tac 2" (* StatRef *)) |
|
200 |
apply (rule ax_derivs.Done [THEN conseq1]) |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
201 |
apply (tactic {* inst1_tac "Q" "\<lambda>vf. Normal ((\<lambda>Y s Z. vf=lvar (VName e) (snd s)) \<and>. heap_free four \<and>. initd Base \<and>. initd Ext)" *}) |
12854 | 202 |
apply (clarsimp split del: split_if) |
203 |
apply (frule atleast_free_weaken [THEN atleast_free_weaken]) |
|
204 |
apply (drule initedD) |
|
205 |
apply (clarsimp elim!: atleast_free_SucD simp add: arr_inv_def) |
|
206 |
apply force |
|
207 |
apply (tactic {* simp_tac (simpset() delloop "split_all_tac") 1 *}) |
|
208 |
apply (rule ax_triv_Init_Object [THEN peek_and_forget2, THEN conseq1]) |
|
209 |
apply (rule wf_tprg) |
|
210 |
apply clarsimp |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
211 |
apply (tactic {* inst1_tac "P" "\<lambda>vf. Normal ((\<lambda>Y s Z. vf = lvar (VName e) (snd s)) \<and>. heap_free four \<and>. initd Ext)" *}) |
12854 | 212 |
apply clarsimp |
213 |
apply (tactic {* inst1_tac "PP" "\<lambda>vf. Normal ((\<lambda>Y s Z. vf = lvar (VName e) (snd s)) \<and>. heap_free four \<and>. Not \<circ> initd Base)" *}) |
|
214 |
apply clarsimp |
|
215 |
(* end init *) |
|
216 |
apply (rule conseq1) |
|
217 |
apply (tactic "ax_tac 1") |
|
218 |
apply clarsimp |
|
219 |
done |
|
220 |
||
221 |
(* |
|
222 |
while (true) { |
|
223 |
if (i) {throw xcpt;} |
|
224 |
else i=j |
|
225 |
} |
|
226 |
*) |
|
227 |
lemma Loop_Xcpt_benchmark: |
|
228 |
"Q = (\<lambda>Y (x,s) Z. x \<noteq> None \<longrightarrow> the_Bool (the (locals s i))) \<Longrightarrow> |
|
229 |
G,({}::'a triple set)\<turnstile>{Normal (\<lambda>Y s Z::'a. True)} |
|
230 |
.lab1\<bullet> While(Lit (Bool True)) (If(Acc (LVar i)) (Throw (Acc (LVar xcpt))) Else |
|
231 |
(Expr (Ass (LVar i) (Acc (LVar j))))). {Q}" |
|
232 |
apply (rule_tac P' = "Q" and Q' = "Q\<leftarrow>=False\<down>=\<diamondsuit>" in conseq12) |
|
233 |
apply safe |
|
234 |
apply (tactic "ax_tac 1" (* Loop *)) |
|
235 |
apply (rule ax_Normal_cases) |
|
236 |
prefer 2 |
|
237 |
apply (rule ax_derivs.Abrupt [THEN conseq1], clarsimp simp add: Let_def) |
|
238 |
apply (rule conseq1) |
|
239 |
apply (tactic "ax_tac 1") |
|
240 |
apply clarsimp |
|
241 |
prefer 2 |
|
242 |
apply clarsimp |
|
243 |
apply (tactic "ax_tac 1" (* If *)) |
|
244 |
apply (tactic |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
245 |
{* inst1_tac "P'" "Normal (\<lambda>s.. (\<lambda>Y s Z. True)\<down>=Val (the (locals s i)))" *}) |
12854 | 246 |
apply (tactic "ax_tac 1") |
247 |
apply (rule conseq1) |
|
248 |
apply (tactic "ax_tac 1") |
|
249 |
apply clarsimp |
|
250 |
apply (rule allI) |
|
251 |
apply (rule ax_escape) |
|
252 |
apply auto |
|
253 |
apply (rule conseq1) |
|
254 |
apply (tactic "ax_tac 1" (* Throw *)) |
|
255 |
apply (tactic "ax_tac 1") |
|
256 |
apply (tactic "ax_tac 1") |
|
257 |
apply clarsimp |
|
258 |
apply (rule_tac Q' = "Normal (\<lambda>Y s Z. True)" in conseq2) |
|
259 |
prefer 2 |
|
260 |
apply clarsimp |
|
261 |
apply (rule conseq1) |
|
262 |
apply (tactic "ax_tac 1") |
|
263 |
apply (tactic "ax_tac 1") |
|
264 |
prefer 2 |
|
265 |
apply (rule ax_subst_Var_allI) |
|
15793
acfdd493f5c4
Made inst1_tac more robust against changes of variable indices.
berghofe
parents:
14981
diff
changeset
|
266 |
apply (tactic {* inst1_tac "P'" "\<lambda>b Y ba Z vf. \<lambda>Y (x,s) Z. x=None \<and> snd vf = snd (lvar i s)" *}) |
12854 | 267 |
apply (rule allI) |
268 |
apply (rule_tac P' = "Normal ?P" in conseq1) |
|
269 |
prefer 2 |
|
270 |
apply clarsimp |
|
271 |
apply (tactic "ax_tac 1") |
|
272 |
apply (rule conseq1) |
|
273 |
apply (tactic "ax_tac 1") |
|
274 |
apply clarsimp |
|
275 |
apply (tactic "ax_tac 1") |
|
276 |
apply clarsimp |
|
277 |
done |
|
278 |
||
279 |
end |
|
280 |