[STATEMENT]
theorem assumes wf: "wf_C_prog P"
shows subject_reduction2: "P,E \<turnstile> \<langle>e,(h,l)\<rangle> \<rightarrow> \<langle>e',(h',l')\<rangle> \<Longrightarrow>
  (\<And>T. \<lbrakk> P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T \<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T)"
and subjects_reduction2: "P,E \<turnstile> \<langle>es,(h,l)\<rangle> [\<rightarrow>] \<langle>es',(h',l')\<rangle> \<Longrightarrow>
  (\<And>Ts.\<lbrakk> P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> es [:] Ts \<rbrakk> \<Longrightarrow> types_conf P E h' es' Ts)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> \<Longrightarrow> (\<And>T. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T)) &&& (P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle> \<Longrightarrow> (\<And>Ts. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts))
[PROOF STEP]
proof (induct rule:red_reds_inducts)
[PROOF STATE]
proof (state)
goal (61 subgoals):
 1. \<And>h a h' C E l T. \<lbrakk>new_Addr h = \<lfloor>a\<rfloor>; h' = h(a \<mapsto> (C, Collect (init_obj P C))); P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
 2. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 9. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
A total of 61 subgoals...
[PROOF STEP]
case (RedNew h a h' C E l)
[PROOF STATE]
proof (state)
this:
new_Addr h = \<lfloor>a\<rfloor>
h' = h(a \<mapsto> (C, Collect (init_obj P C)))
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> new C : T

goal (61 subgoals):
 1. \<And>h a h' C E l T. \<lbrakk>new_Addr h = \<lfloor>a\<rfloor>; h' = h(a \<mapsto> (C, Collect (init_obj P C))); P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
 2. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 9. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
A total of 61 subgoals...
[PROOF STEP]
have new:"new_Addr h = Some a" and h':"h' = h(a \<mapsto> (C, Collect (init_obj P C)))"
    and wt:"P,E,h \<turnstile> new C : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. new_Addr h = \<lfloor>a\<rfloor> &&& h' = h(a \<mapsto> (C, Collect (init_obj P C))) &&& P,E,h \<turnstile> new C : T
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
new_Addr h = \<lfloor>a\<rfloor>
h' = h(a \<mapsto> (C, Collect (init_obj P C)))
P,E,h \<turnstile> new C : T

goal (61 subgoals):
 1. \<And>h a h' C E l T. \<lbrakk>new_Addr h = \<lfloor>a\<rfloor>; h' = h(a \<mapsto> (C, Collect (init_obj P C))); P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
 2. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 9. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
A total of 61 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> new C : T
[PROOF STEP]
have eq:"T = Class C" and "class": "is_class P C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> new C : T

goal (1 subgoal):
 1. T = Class C &&& is_class P C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
T = Class C
is_class P C

goal (61 subgoals):
 1. \<And>h a h' C E l T. \<lbrakk>new_Addr h = \<lfloor>a\<rfloor>; h' = h(a \<mapsto> (C, Collect (init_obj P C))); P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
 2. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 9. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
A total of 61 subgoals...
[PROOF STEP]
from "class"
[PROOF STATE]
proof (chain)
picking this:
is_class P C
[PROOF STEP]
have subo:"Subobjs P C [C]"
[PROOF STATE]
proof (prove)
using this:
is_class P C

goal (1 subgoal):
 1. Subobjs P C [C]
[PROOF STEP]
by(rule Subobjs_Base)
[PROOF STATE]
proof (state)
this:
Subobjs P C [C]

goal (61 subgoals):
 1. \<And>h a h' C E l T. \<lbrakk>new_Addr h = \<lfloor>a\<rfloor>; h' = h(a \<mapsto> (C, Collect (init_obj P C))); P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
 2. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 9. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
A total of 61 subgoals...
[PROOF STEP]
from h'
[PROOF STATE]
proof (chain)
picking this:
h' = h(a \<mapsto> (C, Collect (init_obj P C)))
[PROOF STEP]
have "h' a = Some(C, Collect (init_obj P C))"
[PROOF STATE]
proof (prove)
using this:
h' = h(a \<mapsto> (C, Collect (init_obj P C)))

goal (1 subgoal):
 1. h' a = \<lfloor>(C, Collect (init_obj P C))\<rfloor>
[PROOF STEP]
by(simp add:map_upd_Some_unfold)
[PROOF STATE]
proof (state)
this:
h' a = \<lfloor>(C, Collect (init_obj P C))\<rfloor>

goal (61 subgoals):
 1. \<And>h a h' C E l T. \<lbrakk>new_Addr h = \<lfloor>a\<rfloor>; h' = h(a \<mapsto> (C, Collect (init_obj P C))); P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
 2. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 9. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
A total of 61 subgoals...
[PROOF STEP]
with subo
[PROOF STATE]
proof (chain)
picking this:
Subobjs P C [C]
h' a = \<lfloor>(C, Collect (init_obj P C))\<rfloor>
[PROOF STEP]
have "P,E,h' \<turnstile> ref(a,[C]) : Class C"
[PROOF STATE]
proof (prove)
using this:
Subobjs P C [C]
h' a = \<lfloor>(C, Collect (init_obj P C))\<rfloor>

goal (1 subgoal):
 1. P,E,h' \<turnstile> ref (a, [C]) : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> ref (a, [C]) : Class C

goal (61 subgoals):
 1. \<And>h a h' C E l T. \<lbrakk>new_Addr h = \<lfloor>a\<rfloor>; h' = h(a \<mapsto> (C, Collect (init_obj P C))); P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
 2. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 9. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
A total of 61 subgoals...
[PROOF STEP]
with eq
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h' \<turnstile> ref (a, [C]) : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h' \<turnstile> ref (a, [C]) : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> ref (a, [C]) :\<^bsub>NT\<^esub> T

goal (60 subgoals):
 1. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 8. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 10. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
A total of 60 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (60 subgoals):
 1. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 8. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 10. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
A total of 60 subgoals...
[PROOF STEP]
case (RedNewFail h E C l)
[PROOF STATE]
proof (state)
this:
new_Addr h = None
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> new C : T

goal (60 subgoals):
 1. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 8. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 10. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
A total of 60 subgoals...
[PROOF STEP]
have sconf:"P,E \<turnstile> (h, l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>

goal (60 subgoals):
 1. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 8. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 10. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
A total of 60 subgoals...
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
[PROOF STEP]
have "is_class P OutOfMemory"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P

goal (1 subgoal):
 1. is_class P OutOfMemory
[PROOF STEP]
by (fastforce intro:is_class_xcpt wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
is_class P OutOfMemory

goal (60 subgoals):
 1. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 8. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 10. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
A total of 60 subgoals...
[PROOF STEP]
hence "preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt OutOfMemory,[OutOfMemory])) = Some(Class OutOfMemory)"
[PROOF STATE]
proof (prove)
using this:
is_class P OutOfMemory

goal (1 subgoal):
 1. preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt OutOfMemory, [OutOfMemory])) = \<lfloor>Class OutOfMemory\<rfloor>
[PROOF STEP]
by (auto elim: preallocatedE dest!:preallocatedD Subobjs_Base)
[PROOF STATE]
proof (state)
this:
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt OutOfMemory, [OutOfMemory])) = \<lfloor>Class OutOfMemory\<rfloor>

goal (60 subgoals):
 1. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 8. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 10. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
A total of 60 subgoals...
[PROOF STEP]
with sconf
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt OutOfMemory, [OutOfMemory])) = \<lfloor>Class OutOfMemory\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> THROW OutOfMemory : T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt OutOfMemory, [OutOfMemory])) = \<lfloor>Class OutOfMemory\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) : T
[PROOF STEP]
by(auto simp:sconf_def hconf_def)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) : T

goal (60 subgoals):
 1. \<And>h E C l T. \<lbrakk>new_Addr h = None; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> new C : T\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 8. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 10. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
A total of 60 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) : T

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt OutOfMemory, [OutOfMemory]) :\<^bsub>NT\<^esub> T

goal (59 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 7. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 9. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
A total of 59 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (59 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 7. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 9. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
A total of 59 subgoals...
[PROOF STEP]
case (StaticCastRed E e h l e' h' l' C)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> \<lparr>C\<rparr>e : T

goal (59 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 7. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 9. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
A total of 59 subgoals...
[PROOF STEP]
have wt:"P,E,h \<turnstile> \<lparr>C\<rparr>e : T"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
            \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h, l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> \<lparr>C\<rparr>e : T &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> \<lparr>C\<rparr>e : T
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>

goal (59 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 7. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 9. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
A total of 59 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> \<lparr>C\<rparr>e : T
[PROOF STEP]
obtain T' where wte:"P,E,h \<turnstile> e : T'" and isref:"is_refT T'"
    and "class": "is_class P C" and T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> \<lparr>C\<rparr>e : T

goal (1 subgoal):
 1. (\<And>T'. \<lbrakk>P,E,h \<turnstile> e : T'; is_refT T'; is_class P C; T = Class C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : T'
is_refT T'
is_class P C
T = Class C

goal (59 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 7. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 9. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
A total of 59 subgoals...
[PROOF STEP]
from isref
[PROOF STATE]
proof (chain)
picking this:
is_refT T'
[PROOF STEP]
have "P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C"
[PROOF STATE]
proof (prove)
using this:
is_refT T'

goal (1 subgoal):
 1. P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
proof(rule refTE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. T' = NT \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
 2. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
assume "T' = NT"
[PROOF STATE]
proof (state)
this:
T' = NT

goal (2 subgoals):
 1. T' = NT \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
 2. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
with IH[OF sconf wte] isref "class"
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C

goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
fix D
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
assume "T' = Class D"
[PROOF STATE]
proof (state)
this:
T' = Class D

goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
with IH[OF sconf wte] isref "class"
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = Class D
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = Class D

goal (1 subgoal):
 1. P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C

goal (59 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 7. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 9. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
A total of 59 subgoals...
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h' \<turnstile> \<lparr>C\<rparr>e' : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> \<lparr>C\<rparr>e' :\<^bsub>NT\<^esub> T

goal (58 subgoals):
 1. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 3. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 4. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 6. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 8. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
A total of 58 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (58 subgoals):
 1. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 3. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 4. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 6. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 8. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
A total of 58 subgoals...
[PROOF STEP]
case RedStaticCastNull
[PROOF STATE]
proof (state)
this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> \<lparr>C_\<rparr>null : T

goal (58 subgoals):
 1. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> \<lparr>C\<rparr>null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 3. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 4. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 6. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 8. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
A total of 58 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> \<lparr>C_\<rparr>null : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> null :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (auto elim:WTrt.cases)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> null :\<^bsub>NT\<^esub> T

goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
case (RedStaticUpCast Cs C Cs' Ds E a h l)
[PROOF STATE]
proof (state)
this:
P \<turnstile> Path last Cs to C via Cs'
Ds = Cs @\<^sub>p Cs'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T

goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
have wt:"P,E,h \<turnstile> \<lparr>C\<rparr>ref (a,Cs) : T"
    and path_via:"P \<turnstile> Path last Cs to C via Cs'"
    and Ds:"Ds = Cs @\<^sub>p Cs'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T &&& P \<turnstile> Path last Cs to C via Cs'  &&& Ds = Cs @\<^sub>p Cs'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T
P \<turnstile> Path last Cs to C via Cs'
Ds = Cs @\<^sub>p Cs'

goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T
[PROOF STEP]
have typeof:"P \<turnstile> typeof\<^bsub>h\<^esub> (Ref(a,Cs)) = Some(Class(last Cs))"
    and "class": "is_class P C" and T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T

goal (1 subgoal):
 1. P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor> &&& is_class P C &&& T = Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>
is_class P C
T = Class C

goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
from typeof
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>
[PROOF STEP]
obtain D S where h:"h a = Some(D,S)" and subo:"Subobjs P D Cs"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>

goal (1 subgoal):
 1. (\<And>D S. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; Subobjs P D Cs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto dest:typeof_Class_Subo split:if_split_asm)
[PROOF STATE]
proof (state)
this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Cs

goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
from path_via subo wf Ds
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> Path last Cs to C via Cs'
Subobjs P D Cs
wf_C_prog P
Ds = Cs @\<^sub>p Cs'
[PROOF STEP]
have "Subobjs P D Ds" and last:"last Ds = C"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> Path last Cs to C via Cs'
Subobjs P D Cs
wf_C_prog P
Ds = Cs @\<^sub>p Cs'

goal (1 subgoal):
 1. Subobjs P D Ds &&& last Ds = C
[PROOF STEP]
by(auto intro!:Subobjs_appendPath appendPath_last[THEN sym] Subobjs_nonempty
            simp:path_via_def)
[PROOF STATE]
proof (state)
this:
Subobjs P D Ds
last Ds = C

goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
with h
[PROOF STATE]
proof (chain)
picking this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Ds
last Ds = C
[PROOF STEP]
have "P,E,h \<turnstile> ref (a,Ds) : Class C"
[PROOF STATE]
proof (prove)
using this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Ds
last Ds = C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Ds) : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Ds) : Class C

goal (57 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 5. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 7. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 57 subgoals...
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h \<turnstile> ref (a, Ds) : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h \<turnstile> ref (a, Ds) : Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T

goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
case (RedStaticDownCast E C a Cs Cs' h l)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T

goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
have "P,E,h \<turnstile> \<lparr>C\<rparr>ref (a,Cs@[C]@Cs') : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T

goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
hence typeof:"P \<turnstile> typeof\<^bsub>h\<^esub> (Ref(a,Cs@[C]@Cs')) = Some(Class(last(Cs@[C]@Cs')))"
    and "class": "is_class P C" and T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T

goal (1 subgoal):
 1. P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor> &&& is_class P C &&& T = Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor>
is_class P C
T = Class C

goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
from typeof
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor>
[PROOF STEP]
obtain D S where h:"h a = Some(D,S)"
    and subo:"Subobjs P D (Cs@[C]@Cs')"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor>

goal (1 subgoal):
 1. (\<And>D S. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; Subobjs P D (Cs @ [C] @ Cs')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto dest:typeof_Class_Subo split:if_split_asm)
[PROOF STATE]
proof (state)
this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D (Cs @ [C] @ Cs')

goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
from subo
[PROOF STATE]
proof (chain)
picking this:
Subobjs P D (Cs @ [C] @ Cs')
[PROOF STEP]
have "Subobjs P D (Cs@[C])"
[PROOF STATE]
proof (prove)
using this:
Subobjs P D (Cs @ [C] @ Cs')

goal (1 subgoal):
 1. Subobjs P D (Cs @ [C])
[PROOF STEP]
by(fastforce intro:appendSubobj)
[PROOF STATE]
proof (state)
this:
Subobjs P D (Cs @ [C])

goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
with h
[PROOF STATE]
proof (chain)
picking this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D (Cs @ [C])
[PROOF STEP]
have "P,E,h \<turnstile> ref (a,Cs@[C]) : Class C"
[PROOF STATE]
proof (prove)
using this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D (Cs @ [C])

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C

goal (56 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs @ [C] @ Cs') : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 4. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 6. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
A total of 56 subgoals...
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T

goal (55 subgoals):
 1. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 10. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 55 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (55 subgoals):
 1. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 10. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 55 subgoals...
[PROOF STEP]
case (RedStaticCastFail C Cs E a h l)
[PROOF STATE]
proof (state)
this:
C \<notin> set Cs
(last Cs, C) \<notin> (subcls1 P)\<^sup>*
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T

goal (55 subgoals):
 1. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 10. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 55 subgoals...
[PROOF STEP]
have sconf:"P,E \<turnstile> (h, l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>

goal (55 subgoals):
 1. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 10. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 55 subgoals...
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
[PROOF STEP]
have "is_class P ClassCast"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P

goal (1 subgoal):
 1. is_class P ClassCast
[PROOF STEP]
by (fastforce intro:is_class_xcpt wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
is_class P ClassCast

goal (55 subgoals):
 1. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 10. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 55 subgoals...
[PROOF STEP]
hence "preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt ClassCast,[ClassCast])) = Some(Class ClassCast)"
[PROOF STATE]
proof (prove)
using this:
is_class P ClassCast

goal (1 subgoal):
 1. preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt ClassCast, [ClassCast])) = \<lfloor>Class ClassCast\<rfloor>
[PROOF STEP]
by (auto elim: preallocatedE dest!:preallocatedD Subobjs_Base)
[PROOF STATE]
proof (state)
this:
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt ClassCast, [ClassCast])) = \<lfloor>Class ClassCast\<rfloor>

goal (55 subgoals):
 1. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 10. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 55 subgoals...
[PROOF STEP]
with sconf
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt ClassCast, [ClassCast])) = \<lfloor>Class ClassCast\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> THROW ClassCast : T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt ClassCast, [ClassCast])) = \<lfloor>Class ClassCast\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) : T
[PROOF STEP]
by(auto simp:sconf_def hconf_def)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) : T

goal (55 subgoals):
 1. \<And>C Cs E a aa b T. \<lbrakk>C \<notin> set Cs; (last Cs, C) \<notin> (subcls1 P)\<^sup>*; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>ref (a, Cs) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 3. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 5. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 10. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 55 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) : T

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt ClassCast, [ClassCast]) :\<^bsub>NT\<^esub> T

goal (54 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 9. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 54 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (54 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 9. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 54 subgoals...
[PROOF STEP]
case (DynCastRed E e h l e' h' l' C)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Cast C e : T

goal (54 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 9. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 54 subgoals...
[PROOF STEP]
have wt:"P,E,h \<turnstile> Cast C e : T"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
            \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h,l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> Cast C e : T &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Cast C e : T
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>

goal (54 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 9. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 54 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Cast C e : T
[PROOF STEP]
obtain T' where wte:"P,E,h \<turnstile> e : T'" and isref:"is_refT T'"
    and "class": "is_class P C" and T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Cast C e : T

goal (1 subgoal):
 1. (\<And>T'. \<lbrakk>P,E,h \<turnstile> e : T'; is_refT T'; is_class P C; T = Class C\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : T'
is_refT T'
is_class P C
T = Class C

goal (54 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 9. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 54 subgoals...
[PROOF STEP]
from isref
[PROOF STATE]
proof (chain)
picking this:
is_refT T'
[PROOF STEP]
have "P,E,h' \<turnstile> Cast C e' : Class C"
[PROOF STATE]
proof (prove)
using this:
is_refT T'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
proof(rule refTE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. T' = NT \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
 2. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
assume "T' = NT"
[PROOF STATE]
proof (state)
this:
T' = NT

goal (2 subgoals):
 1. T' = NT \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
 2. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
with IH[OF sconf wte] isref "class"
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Cast C e' : Class C

goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
fix D
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
assume "T' = Class D"
[PROOF STATE]
proof (state)
this:
T' = Class D

goal (1 subgoal):
 1. \<And>Ca. T' = Class Ca \<Longrightarrow> P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
with IH[OF sconf wte] isref "class"
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = Class D
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_refT T'
is_class P C
T' = Class D

goal (1 subgoal):
 1. P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Cast C e' : Class C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Cast C e' : Class C

goal (54 subgoals):
 1. \<And>E e a b e' aa ba C T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
 2. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 4. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 9. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 54 subgoals...
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h' \<turnstile> Cast C e' : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h' \<turnstile> Cast C e' : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Cast C e' :\<^bsub>NT\<^esub> T

goal (53 subgoals):
 1. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 3. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 8. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
A total of 53 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (53 subgoals):
 1. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 3. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 8. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
A total of 53 subgoals...
[PROOF STEP]
case RedDynCastNull
[PROOF STATE]
proof (state)
this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> Cast C_ null : T

goal (53 subgoals):
 1. \<And>E C a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 3. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 8. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
A total of 53 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> Cast C_ null : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> null :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (auto elim:WTrt.cases)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> null :\<^bsub>NT\<^esub> T

goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
case (RedDynCast h l a D S C Cs' E Cs)
[PROOF STATE]
proof (state)
this:
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
P \<turnstile> Path D to C via Cs'
P \<turnstile> Path D to C unique
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T

goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
have wt:"P,E,h \<turnstile> Cast C (ref (a,Cs)) : T"
    and path_via:"P \<turnstile> Path D to C via Cs'"
    and hp:"hp (h,l) a = Some(D,S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> Cast C (ref (a, Cs)) : T &&& P \<turnstile> Path D to C via Cs'  &&& hp (h, l) a = \<lfloor>(D, S)\<rfloor>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T
P \<turnstile> Path D to C via Cs'
hp (h, l) a = \<lfloor>(D, S)\<rfloor>

goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T
[PROOF STEP]
have typeof:"P \<turnstile> typeof\<^bsub>h\<^esub> (Ref(a,Cs)) = Some(Class(last Cs))"
    and "class": "is_class P C" and T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T

goal (1 subgoal):
 1. P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor> &&& is_class P C &&& T = Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>
is_class P C
T = Class C

goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
from typeof hp
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
[PROOF STEP]
have subo:"Subobjs P D Cs"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>
hp (h, l) a = \<lfloor>(D, S)\<rfloor>

goal (1 subgoal):
 1. Subobjs P D Cs
[PROOF STEP]
by (auto dest:typeof_Class_Subo split:if_split_asm)
[PROOF STATE]
proof (state)
this:
Subobjs P D Cs

goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
from path_via subo
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> Path D to C via Cs'
Subobjs P D Cs
[PROOF STEP]
have "Subobjs P D Cs'"
    and last:"last Cs' = C"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> Path D to C via Cs'
Subobjs P D Cs

goal (1 subgoal):
 1. Subobjs P D Cs' &&& last Cs' = C
[PROOF STEP]
by (auto simp:path_via_def)
[PROOF STATE]
proof (state)
this:
Subobjs P D Cs'
last Cs' = C

goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
with hp
[PROOF STATE]
proof (chain)
picking this:
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Cs'
last Cs' = C
[PROOF STEP]
have "P,E,h \<turnstile> ref (a,Cs') : Class C"
[PROOF STATE]
proof (prove)
using this:
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Cs'
last Cs' = C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Cs') : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs') : Class C

goal (52 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs' E Cs T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; P \<turnstile> Path D to C via Cs' ; P \<turnstile> Path D to C unique; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> ref (aa, Cs') :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 7. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 10. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 52 subgoals...
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h \<turnstile> ref (a, Cs') : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h \<turnstile> ref (a, Cs') : Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Cs') :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs') :\<^bsub>NT\<^esub> T

goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
case (RedStaticUpDynCast Cs C Cs' Ds E a h l)
[PROOF STATE]
proof (state)
this:
P \<turnstile> Path last Cs to C unique
P \<turnstile> Path last Cs to C via Cs'
Ds = Cs @\<^sub>p Cs'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T

goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
have wt:"P,E,h \<turnstile> Cast C (ref (a,Cs)) : T"
    and path_via:"P \<turnstile> Path last Cs to C via Cs'"
    and Ds:"Ds = Cs @\<^sub>p Cs'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> Cast C (ref (a, Cs)) : T &&& P \<turnstile> Path last Cs to C via Cs'  &&& Ds = Cs @\<^sub>p Cs'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T
P \<turnstile> Path last Cs to C via Cs'
Ds = Cs @\<^sub>p Cs'

goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T
[PROOF STEP]
have typeof:"P \<turnstile> typeof\<^bsub>h\<^esub> (Ref(a,Cs)) = Some(Class(last Cs))"
    and "class": "is_class P C" and T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Cast C (ref (a, Cs)) : T

goal (1 subgoal):
 1. P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor> &&& is_class P C &&& T = Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>
is_class P C
T = Class C

goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
from typeof
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>
[PROOF STEP]
obtain D S where h:"h a = Some(D,S)" and subo:"Subobjs P D Cs"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs)) = \<lfloor>Class (last Cs)\<rfloor>

goal (1 subgoal):
 1. (\<And>D S. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; Subobjs P D Cs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto dest:typeof_Class_Subo split:if_split_asm)
[PROOF STATE]
proof (state)
this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Cs

goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
from path_via subo wf Ds
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> Path last Cs to C via Cs'
Subobjs P D Cs
wf_C_prog P
Ds = Cs @\<^sub>p Cs'
[PROOF STEP]
have "Subobjs P D Ds" and last:"last Ds = C"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> Path last Cs to C via Cs'
Subobjs P D Cs
wf_C_prog P
Ds = Cs @\<^sub>p Cs'

goal (1 subgoal):
 1. Subobjs P D Ds &&& last Ds = C
[PROOF STEP]
by(auto intro!:Subobjs_appendPath appendPath_last[THEN sym] Subobjs_nonempty
            simp:path_via_def)
[PROOF STATE]
proof (state)
this:
Subobjs P D Ds
last Ds = C

goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
with h
[PROOF STATE]
proof (chain)
picking this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Ds
last Ds = C
[PROOF STEP]
have "P,E,h \<turnstile> ref (a,Ds) : Class C"
[PROOF STATE]
proof (prove)
using this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Ds
last Ds = C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Ds) : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Ds) : Class C

goal (51 subgoals):
 1. \<And>Cs C Cs' Ds E a aa b T. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs' ; Ds = Cs @\<^sub>p Cs'; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
 2. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 6. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 9. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
A total of 51 subgoals...
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h \<turnstile> ref (a, Ds) : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h \<turnstile> ref (a, Ds) : Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Ds) :\<^bsub>NT\<^esub> T

goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
case (RedStaticDownDynCast E C a Cs Cs' h l)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T

goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
have "P,E,h \<turnstile> Cast C (ref (a,Cs@[C]@Cs')) : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T

goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
hence typeof:"P \<turnstile> typeof\<^bsub>h\<^esub> (Ref(a,Cs@[C]@Cs')) = Some(Class(last(Cs@[C]@Cs')))"
    and "class": "is_class P C" and T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T

goal (1 subgoal):
 1. P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor> &&& is_class P C &&& T = Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor>
is_class P C
T = Class C

goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
from typeof
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor>
[PROOF STEP]
obtain D S where h:"h a = Some(D,S)"
    and subo:"Subobjs P D (Cs@[C]@Cs')"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs @ [C] @ Cs')) = \<lfloor>Class (last (Cs @ [C] @ Cs'))\<rfloor>

goal (1 subgoal):
 1. (\<And>D S. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; Subobjs P D (Cs @ [C] @ Cs')\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto dest:typeof_Class_Subo split:if_split_asm)
[PROOF STATE]
proof (state)
this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D (Cs @ [C] @ Cs')

goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
from subo
[PROOF STATE]
proof (chain)
picking this:
Subobjs P D (Cs @ [C] @ Cs')
[PROOF STEP]
have "Subobjs P D (Cs@[C])"
[PROOF STATE]
proof (prove)
using this:
Subobjs P D (Cs @ [C] @ Cs')

goal (1 subgoal):
 1. Subobjs P D (Cs @ [C])
[PROOF STEP]
by(fastforce intro:appendSubobj)
[PROOF STATE]
proof (state)
this:
Subobjs P D (Cs @ [C])

goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
with h
[PROOF STATE]
proof (chain)
picking this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D (Cs @ [C])
[PROOF STEP]
have "P,E,h \<turnstile> ref (a,Cs@[C]) : Class C"
[PROOF STATE]
proof (prove)
using this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D (Cs @ [C])

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C

goal (50 subgoals):
 1. \<And>E C a Cs Cs' aa b T. \<lbrakk>P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Cast C (ref (a, Cs @ [C] @ Cs')) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 5. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 8. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 10. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
A total of 50 subgoals...
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E,h \<turnstile> ref (a, Cs @ [C]) : Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs @ [C]) :\<^bsub>NT\<^esub> T

goal (49 subgoals):
 1. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 4. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 7. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 49 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (49 subgoals):
 1. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 4. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 7. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 49 subgoals...
[PROOF STEP]
case RedDynCastFail
[PROOF STATE]
proof (state)
this:
hp (a___, b_) a_ = \<lfloor>(D_, S_)\<rfloor>
\<not> P \<turnstile> Path D_ to C_ unique
\<not> P \<turnstile> Path last Cs_ to C_ unique
C_ \<notin> set Cs_
P,E_ \<turnstile> (a___, b_) \<surd>
P,E_,a___ \<turnstile> Cast C_ (ref (a_, Cs_)) : T

goal (49 subgoals):
 1. \<And>a b aa D S C Cs E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; \<not> P \<turnstile> Path D to C unique; \<not> P \<turnstile> Path last Cs to C unique; C \<notin> set Cs; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Cast C (ref (aa, Cs)) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> null :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 4. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 7. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 9. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 10. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 49 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
hp (a___, b_) a_ = \<lfloor>(D_, S_)\<rfloor>
\<not> P \<turnstile> Path D_ to C_ unique
\<not> P \<turnstile> Path last Cs_ to C_ unique
C_ \<notin> set Cs_
P,E_ \<turnstile> (a___, b_) \<surd>
P,E_,a___ \<turnstile> Cast C_ (ref (a_, Cs_)) : T

goal (1 subgoal):
 1. P,E_,a___ \<turnstile> null :\<^bsub>NT\<^esub> T
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
P,E_,a___ \<turnstile> null :\<^bsub>NT\<^esub> T

goal (48 subgoals):
 1. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 3. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 6. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 48 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (48 subgoals):
 1. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 3. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 6. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 48 subgoals...
[PROOF STEP]
case (BinOpRed1 E e h l e' h' l' bop e\<^sub>2)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T

goal (48 subgoals):
 1. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 3. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 6. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 48 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>"
    and wt:"P,E,h \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
            \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h,l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& P,E,h \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T) &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
P,E,h \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>

goal (48 subgoals):
 1. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 3. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 6. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 48 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
obtain T\<^sub>1 T\<^sub>2 where wte:"P,E,h \<turnstile> e : T\<^sub>1" and wte2:"P,E,h \<turnstile> e\<^sub>2 : T\<^sub>2"
    and binop:"case bop of Eq \<Rightarrow> T = Boolean
                        | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T

goal (1 subgoal):
 1. (\<And>T\<^sub>1 T\<^sub>2. \<lbrakk>P,E,h \<turnstile> e : T\<^sub>1; P,E,h \<turnstile> e\<^sub>2 : T\<^sub>2; case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : T\<^sub>1
P,E,h \<turnstile> e\<^sub>2 : T\<^sub>2
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer

goal (48 subgoals):
 1. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 3. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 6. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 48 subgoals...
[PROOF STEP]
from WTrt_hext_mono[OF wte2 red_hext_incr[OF red]]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2
[PROOF STEP]
have wte2':"P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2

goal (1 subgoal):
 1. P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2

goal (48 subgoals):
 1. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 3. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 6. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 48 subgoals...
[PROOF STEP]
have "P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
proof (cases bop)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. bop = Eq \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
 2. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
assume Eq:"bop = Eq"
[PROOF STATE]
proof (state)
this:
bop = Eq

goal (2 subgoals):
 1. bop = Eq \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
 2. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>1
[PROOF STEP]
obtain T' where "P,E,h' \<turnstile> e' : T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>1

goal (1 subgoal):
 1. (\<And>T'. P,E,h' \<turnstile> e' : T' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases "T\<^sub>1") auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : T'

goal (2 subgoals):
 1. bop = Eq \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
 2. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
with wte2' binop Eq
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Eq
P,E,h' \<turnstile> e' : T'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Eq
P,E,h' \<turnstile> e' : T'

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
by(cases bop) auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
assume Add:"bop = Add"
[PROOF STATE]
proof (state)
this:
bop = Add

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
with binop
[PROOF STATE]
proof (chain)
picking this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add
[PROOF STEP]
have Intg:"T\<^sub>1 = Integer"
[PROOF STATE]
proof (prove)
using this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add

goal (1 subgoal):
 1. T\<^sub>1 = Integer
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
T\<^sub>1 = Integer

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
with IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>1
T\<^sub>1 = Integer
[PROOF STEP]
have "P,E,h' \<turnstile> e' : Integer"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>1
T\<^sub>1 = Integer

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Integer
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Integer

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
with wte2' binop Add
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add
P,E,h' \<turnstile> e' : Integer
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e\<^sub>2 : T\<^sub>2
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add
P,E,h' \<turnstile> e' : Integer

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
by(cases bop) auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T

goal (48 subgoals):
 1. \<And>E e a b e' aa ba bop e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 3. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 6. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 8. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 9. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 48 subgoals...
[PROOF STEP]
with binop
[PROOF STATE]
proof (chain)
picking this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(cases bop) simp_all
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' \<guillemotleft>bop\<guillemotright> e\<^sub>2 :\<^bsub>NT\<^esub> T

goal (47 subgoals):
 1. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 2. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 5. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
A total of 47 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (47 subgoals):
 1. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 2. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 5. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
A total of 47 subgoals...
[PROOF STEP]
case (BinOpRed2 E e h l e' h' l' v\<^sub>1 bop)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T

goal (47 subgoals):
 1. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 2. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 5. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
A total of 47 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h,l)\<rangle> \<rightarrow> \<langle>e',(h',l')\<rangle>"
    and wt:"P,E,h \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
            \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h,l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& P,E,h \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T) &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
P,E,h \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>

goal (47 subgoals):
 1. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 2. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 5. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
A total of 47 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T
[PROOF STEP]
obtain T\<^sub>1 T\<^sub>2 where wtval:"P,E,h \<turnstile> Val v\<^sub>1 : T\<^sub>1" and wte:"P,E,h \<turnstile> e : T\<^sub>2"
    and binop:"case bop of Eq \<Rightarrow> T = Boolean
                        | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T

goal (1 subgoal):
 1. (\<And>T\<^sub>1 T\<^sub>2. \<lbrakk>P,E,h \<turnstile> Val v\<^sub>1 : T\<^sub>1; P,E,h \<turnstile> e : T\<^sub>2; case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v\<^sub>1 : T\<^sub>1
P,E,h \<turnstile> e : T\<^sub>2
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer

goal (47 subgoals):
 1. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 2. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 5. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
A total of 47 subgoals...
[PROOF STEP]
from WTrt_hext_mono[OF wtval red_hext_incr[OF red]]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1
[PROOF STEP]
have wtval':"P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1

goal (47 subgoals):
 1. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 2. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 5. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
A total of 47 subgoals...
[PROOF STEP]
have "P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
proof (cases bop)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. bop = Eq \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
 2. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
assume Eq:"bop = Eq"
[PROOF STATE]
proof (state)
this:
bop = Eq

goal (2 subgoals):
 1. bop = Eq \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
 2. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>2
[PROOF STEP]
obtain T' where "P,E,h' \<turnstile> e' : T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>2

goal (1 subgoal):
 1. (\<And>T'. P,E,h' \<turnstile> e' : T' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases "T\<^sub>2") auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : T'

goal (2 subgoals):
 1. bop = Eq \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
 2. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
with wtval' binop Eq
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Eq
P,E,h' \<turnstile> e' : T'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Eq
P,E,h' \<turnstile> e' : T'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
by(cases bop) auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
assume Add:"bop = Add"
[PROOF STATE]
proof (state)
this:
bop = Add

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
with binop
[PROOF STATE]
proof (chain)
picking this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add
[PROOF STEP]
have Intg:"T\<^sub>2 = Integer"
[PROOF STATE]
proof (prove)
using this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add

goal (1 subgoal):
 1. T\<^sub>2 = Integer
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
T\<^sub>2 = Integer

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
with IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>2
T\<^sub>2 = Integer
[PROOF STEP]
have "P,E,h' \<turnstile> e' : Integer"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T\<^sub>2
T\<^sub>2 = Integer

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Integer
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Integer

goal (1 subgoal):
 1. bop = Add \<Longrightarrow> P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
with wtval' binop Add
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add
P,E,h' \<turnstile> e' : Integer
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v\<^sub>1 : T\<^sub>1
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
bop = Add
P,E,h' \<turnstile> e' : Integer

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
by(cases bop) auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T

goal (47 subgoals):
 1. \<And>E e a b e' aa ba v\<^sub>1 bop T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
 2. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 5. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 7. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 8. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
A total of 47 subgoals...
[PROOF STEP]
with binop
[PROOF STATE]
proof (chain)
picking this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
case bop of Eq \<Rightarrow> T = Boolean | Add \<Rightarrow> T\<^sub>1 = Integer \<and> T\<^sub>2 = Integer \<and> T = Integer
P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(cases bop) simp_all
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> e' :\<^bsub>NT\<^esub> T

goal (46 subgoals):
 1. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 4. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 10. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 46 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (46 subgoals):
 1. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 4. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 10. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 46 subgoals...
[PROOF STEP]
case (RedBinOp bop v\<^sub>1 v\<^sub>2 v E a b)
[PROOF STATE]
proof (state)
this:
binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>
P,E \<turnstile> (a, b) \<surd>
P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T

goal (46 subgoals):
 1. \<And>bop v\<^sub>1 v\<^sub>2 v E a b T. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 4. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 6. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 7. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 10. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
A total of 46 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>
P,E \<turnstile> (a, b) \<surd>
P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T

goal (1 subgoal):
 1. P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
proof (cases bop)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T; bop = Eq\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T; bop = Add\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
case Eq
[PROOF STATE]
proof (state)
this:
bop = Eq

goal (2 subgoals):
 1. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T; bop = Eq\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T; bop = Add\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
bop = Eq

goal (1 subgoal):
 1. P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
using RedBinOp
[PROOF STATE]
proof (prove)
using this:
bop = Eq
binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>
P,E \<turnstile> (a, b) \<surd>
P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T

goal (1 subgoal):
 1. P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T

goal (1 subgoal):
 1. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T; bop = Add\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T; bop = Add\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
case Add
[PROOF STATE]
proof (state)
this:
bop = Add

goal (1 subgoal):
 1. \<lbrakk>binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T; bop = Add\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
bop = Add

goal (1 subgoal):
 1. P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
using RedBinOp
[PROOF STATE]
proof (prove)
using this:
bop = Add
binop (bop, v\<^sub>1, v\<^sub>2) = \<lfloor>v\<rfloor>
P,E \<turnstile> (a, b) \<surd>
P,E,a \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Val v\<^sub>2 : T

goal (1 subgoal):
 1. P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T

goal (45 subgoals):
 1. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 9. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 45 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (45 subgoals):
 1. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 9. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 45 subgoals...
[PROOF STEP]
case (RedVar h l V v E)
[PROOF STATE]
proof (state)
this:
lcl (h, l) V = \<lfloor>v\<rfloor>
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Var V : T

goal (45 subgoals):
 1. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 9. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 45 subgoals...
[PROOF STEP]
have l:"lcl (h, l) V = Some v" and sconf:"P,E \<turnstile> (h, l) \<surd>"
    and wt:"P,E,h \<turnstile> Var V : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lcl (h, l) V = \<lfloor>v\<rfloor> &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> Var V : T
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
lcl (h, l) V = \<lfloor>v\<rfloor>
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Var V : T

goal (45 subgoals):
 1. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 9. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 45 subgoals...
[PROOF STEP]
hence conf:"P,h \<turnstile> v :\<le> T"
[PROOF STATE]
proof (prove)
using this:
lcl (h, l) V = \<lfloor>v\<rfloor>
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Var V : T

goal (1 subgoal):
 1. P,h \<turnstile> v :\<le> T
[PROOF STEP]
by(force simp:sconf_def lconf_def)
[PROOF STATE]
proof (state)
this:
P,h \<turnstile> v :\<le> T

goal (45 subgoals):
 1. \<And>a b V v E T. \<lbrakk>lcl (a, b) V = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Var V : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 5. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 6. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 9. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 10. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 45 subgoals...
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
proof(cases "\<forall>C. T \<noteq> Class C")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>C. T \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>C. T \<noteq> Class C

goal (2 subgoals):
 1. \<forall>C. T \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
with conf
[PROOF STATE]
proof (chain)
picking this:
P,h \<turnstile> v :\<le> T
\<forall>C. T \<noteq> Class C
[PROOF STEP]
have "P \<turnstile> typeof\<^bsub>h\<^esub> v = Some T"
[PROOF STATE]
proof (prove)
using this:
P,h \<turnstile> v :\<le> T
\<forall>C. T \<noteq> Class C

goal (1 subgoal):
 1. P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>T\<rfloor>
[PROOF STEP]
by(cases T) auto
[PROOF STATE]
proof (state)
this:
P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>T\<rfloor>

goal (2 subgoals):
 1. \<forall>C. T \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
hence "P,E,h \<turnstile> Val v : T"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>T\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Val v : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : T

goal (2 subgoals):
 1. \<forall>C. T \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Val v : T

goal (1 subgoal):
 1. P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T

goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>C. T \<noteq> Class C)

goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>C. T \<noteq> Class C)
[PROOF STEP]
obtain C where T:"T = Class C"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>C. T \<noteq> Class C)

goal (1 subgoal):
 1. (\<And>C. T = Class C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
T = Class C

goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
with conf
[PROOF STATE]
proof (chain)
picking this:
P,h \<turnstile> v :\<le> T
T = Class C
[PROOF STEP]
have "P \<turnstile> typeof\<^bsub>h\<^esub> v = Some(Class C) \<or> P \<turnstile> typeof\<^bsub>h\<^esub> v = Some NT"
[PROOF STATE]
proof (prove)
using this:
P,h \<turnstile> v :\<le> T
T = Class C

goal (1 subgoal):
 1. P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>Class C\<rfloor> \<or> P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>NT\<rfloor>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>Class C\<rfloor> \<or> P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>NT\<rfloor>

goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>Class C\<rfloor> \<or> P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>NT\<rfloor>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
T = Class C
P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>Class C\<rfloor> \<or> P \<turnstile> typeof\<^bsub>h\<^esub> v = \<lfloor>NT\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T

goal (44 subgoals):
 1. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 8. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
A total of 44 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (44 subgoals):
 1. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 8. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
A total of 44 subgoals...
[PROOF STEP]
case (LAssRed E e h l e' h' l' V)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> V:=e : T

goal (44 subgoals):
 1. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 8. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
A total of 44 subgoals...
[PROOF STEP]
have wt:"P,E,h \<turnstile> V:=e : T" and sconf:"P,E \<turnstile> (h, l) \<surd>"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> V:=e : T &&& P,E \<turnstile> (h, l) \<surd> &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T')
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> V:=e : T
P,E \<turnstile> (h, l) \<surd>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'

goal (44 subgoals):
 1. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 8. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
A total of 44 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> V:=e : T
[PROOF STEP]
obtain T' where wte:"P,E,h \<turnstile> e : T'" and env:"E V = Some T"
    and sub:"P \<turnstile> T' \<le> T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> V:=e : T

goal (1 subgoal):
 1. (\<And>T'. \<lbrakk>P,E,h \<turnstile> e : T'; E V = \<lfloor>T\<rfloor>; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : T'
E V = \<lfloor>T\<rfloor>
P \<turnstile> T' \<le> T

goal (44 subgoals):
 1. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 8. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
A total of 44 subgoals...
[PROOF STEP]
from sconf env
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
E V = \<lfloor>T\<rfloor>
[PROOF STEP]
have "is_type P T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
E V = \<lfloor>T\<rfloor>

goal (1 subgoal):
 1. is_type P T
[PROOF STEP]
by(auto simp:sconf_def envconf_def)
[PROOF STATE]
proof (state)
this:
is_type P T

goal (44 subgoals):
 1. \<And>E e a b e' aa ba V T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> V:=e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 4. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 5. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 8. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 9. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
A total of 44 subgoals...
[PROOF STEP]
from sub this wf
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> T' \<le> T
is_type P T
wf_C_prog P
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T' \<le> T
is_type P T
wf_C_prog P

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
proof(rule subE)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<lbrakk>T' = T; \<forall>C. T' \<noteq> Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
assume eq:"T' = T" and notclass:"\<forall>C. T' \<noteq> Class C"
[PROOF STATE]
proof (state)
this:
T' = T
\<forall>C. T' \<noteq> Class C

goal (3 subgoals):
 1. \<lbrakk>T' = T; \<forall>C. T' \<noteq> Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
with IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = T
\<forall>C. T' \<noteq> Class C
[PROOF STEP]
have "P,E,h' \<turnstile> e' : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = T
\<forall>C. T' \<noteq> Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : T
[PROOF STEP]
by(cases T) auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : T

goal (3 subgoals):
 1. \<lbrakk>T' = T; \<forall>C. T' \<noteq> Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
with eq env
[PROOF STATE]
proof (chain)
picking this:
T' = T
E V = \<lfloor>T\<rfloor>
P,E,h' \<turnstile> e' : T
[PROOF STEP]
have "P,E,h' \<turnstile> V:=e' : T"
[PROOF STATE]
proof (prove)
using this:
T' = T
E V = \<lfloor>T\<rfloor>
P,E,h' \<turnstile> e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' : T

goal (3 subgoals):
 1. \<lbrakk>T' = T; \<forall>C. T' \<noteq> Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 3. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
with eq
[PROOF STATE]
proof (chain)
picking this:
T' = T
P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
T' = T
P,E,h' \<turnstile> V:=e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(cases T) auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T

goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
fix C D
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
assume T':"T' = Class C" and T:"T = Class D"
      and path_unique:"P \<turnstile> Path C to D unique"
[PROOF STATE]
proof (state)
this:
T' = Class C
T = Class D
P \<turnstile> Path C to D unique

goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
with IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = Class C
T = Class D
P \<turnstile> Path C to D unique
[PROOF STEP]
have "P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = Class C
T = Class D
P \<turnstile> Path C to D unique

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT

goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
hence "P,E,h' \<turnstile> V:=e' : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
proof(rule disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> V:=e' : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
assume "P,E,h' \<turnstile> e' : Class C"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> V:=e' : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
with env T' sub
[PROOF STATE]
proof (chain)
picking this:
E V = \<lfloor>T\<rfloor>
T' = Class C
P \<turnstile> T' \<le> T
P,E,h' \<turnstile> e' : Class C
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
E V = \<lfloor>T\<rfloor>
T' = Class C
P \<turnstile> T' \<le> T
P,E,h' \<turnstile> e' : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
by (fastforce intro:WTrtLAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
assume "P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
with env T
[PROOF STATE]
proof (chain)
picking this:
E V = \<lfloor>T\<rfloor>
T = Class D
P,E,h' \<turnstile> e' : NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
E V = \<lfloor>T\<rfloor>
T = Class D
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
by (fastforce intro:WTrtLAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' : T

goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
with T
[PROOF STATE]
proof (chain)
picking this:
T = Class D
P,E,h' \<turnstile> V:=e' : T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
T = Class D
P,E,h' \<turnstile> V:=e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(cases T) auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T

goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
fix C
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
assume T':"T' = NT" and T:"T = Class C"
[PROOF STATE]
proof (state)
this:
T' = NT
T = Class C

goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
with IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = NT
T = Class C
[PROOF STEP]
have "P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = NT
T = Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
with env T
[PROOF STATE]
proof (chain)
picking this:
E V = \<lfloor>T\<rfloor>
T = Class C
P,E,h' \<turnstile> e' : NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
E V = \<lfloor>T\<rfloor>
T = Class C
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:WTrtLAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> V:=e' :\<^bsub>NT\<^esub> T

goal (43 subgoals):
 1. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 7. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 8. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 10. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
A total of 43 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (43 subgoals):
 1. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 7. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 8. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 10. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
A total of 43 subgoals...
[PROOF STEP]
case (RedLAss E V T v v' h l T')
[PROOF STATE]
proof (state)
this:
E V = \<lfloor>T\<rfloor>
P \<turnstile> T casts v to v'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> V:=Val v : T'

goal (43 subgoals):
 1. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 7. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 8. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 10. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
A total of 43 subgoals...
[PROOF STEP]
have env:"E V = Some T" and casts:"P \<turnstile> T casts v to v'"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> V:=Val v : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (E V = \<lfloor>T\<rfloor> &&& P \<turnstile> T casts v to v' ) &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> V:=Val v : T'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
E V = \<lfloor>T\<rfloor>
P \<turnstile> T casts v to v'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> V:=Val v : T'

goal (43 subgoals):
 1. \<And>E V T v v' h l Ta. \<lbrakk>E V = \<lfloor>T\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> V:=Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 3. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 4. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 7. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 8. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 10. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
A total of 43 subgoals...
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
proof(cases "\<forall>C. T \<noteq> Class C")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>C. T \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
 2. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>C. T \<noteq> Class C

goal (2 subgoals):
 1. \<forall>C. T \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
 2. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with casts wt env
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> T casts v to v'
P,E,h \<turnstile> V:=Val v : T'
E V = \<lfloor>T\<rfloor>
\<forall>C. T \<noteq> Class C
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T casts v to v'
P,E,h \<turnstile> V:=Val v : T'
E V = \<lfloor>T\<rfloor>
\<forall>C. T \<noteq> Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by(cases T',auto elim!:casts_to.cases)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'

goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>C. T \<noteq> Class C)

goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>C. T \<noteq> Class C)
[PROOF STEP]
obtain C where "T = Class C"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>C. T \<noteq> Class C)

goal (1 subgoal):
 1. (\<And>C. T = Class C \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
T = Class C

goal (1 subgoal):
 1. \<not> (\<forall>C. T \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with casts wt env wf
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> T casts v to v'
P,E,h \<turnstile> V:=Val v : T'
E V = \<lfloor>T\<rfloor>
wf_C_prog P
T = Class C
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T casts v to v'
P,E,h \<turnstile> V:=Val v : T'
E V = \<lfloor>T\<rfloor>
wf_C_prog P
T = Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by(auto elim!:casts_to.cases,
         auto intro!:sym[OF appendPath_last] Subobjs_nonempty split:if_split_asm
              simp:path_via_def,drule_tac Cs="Cs" in Subobjs_appendPath,auto)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v' :\<^bsub>NT\<^esub> T'

goal (42 subgoals):
 1. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 6. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 9. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 10. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
A total of 42 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (42 subgoals):
 1. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 6. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 9. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 10. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
A total of 42 subgoals...
[PROOF STEP]
case (FAccRed E e h l e' h' l' F Cs)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> e\<bullet>F{Cs} : T

goal (42 subgoals):
 1. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 6. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 9. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 10. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
A total of 42 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h,l)\<rangle> \<rightarrow> \<langle>e',(h',l')\<rangle>"
    and wt:"P,E,h \<turnstile> e\<bullet>F{Cs} : T"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
            \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h,l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& P,E,h \<turnstile> e\<bullet>F{Cs} : T) &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
P,E,h \<turnstile> e\<bullet>F{Cs} : T
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>

goal (42 subgoals):
 1. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 6. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 9. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 10. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
A total of 42 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e\<bullet>F{Cs} : T
[PROOF STEP]
have "P,E,h' \<turnstile> e'\<bullet>F{Cs} : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e\<bullet>F{Cs} : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
proof(rule WTrt_elim_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
 2. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
fix C
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
 2. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
assume wte: "P,E,h \<turnstile> e : Class C"
      and field:"P \<turnstile> C has least F:T via Cs"
      and notemptyCs:"Cs \<noteq> []"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : Class C
P \<turnstile> C has least F:T via Cs
Cs \<noteq> []

goal (2 subgoals):
 1. \<And>C. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
 2. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
from field
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> C has least F:T via Cs
[PROOF STEP]
have "class": "is_class P C"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> C has least F:T via Cs

goal (1 subgoal):
 1. is_class P C
[PROOF STEP]
by (fastforce intro:Subobjs_isClass simp add:LeastFieldDecl_def FieldDecls_def)
[PROOF STATE]
proof (state)
this:
is_class P C

goal (2 subgoals):
 1. \<And>C. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
 2. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C
[PROOF STEP]
have "P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C

goal (2 subgoals):
 1. \<And>C. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
 2. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
proof(rule disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
 2. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
assume "P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
 2. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
by (fastforce intro!:WTrtFAccNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : Class C"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
from wte' notemptyCs field
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
by(rule WTrtFAcc)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} : T

goal (1 subgoal):
 1. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
assume wte: "P,E,h \<turnstile> e : NT"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : NT

goal (1 subgoal):
 1. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT
[PROOF STEP]
have "P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h \<turnstile> e : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} : T
[PROOF STEP]
by (rule WTrtFAccNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} : T

goal (42 subgoals):
 1. \<And>E e a b e' aa ba F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
 2. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 3. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 6. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 7. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 9. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 10. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
A total of 42 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} :\<^bsub>NT\<^esub> T

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
case (RedFAcc h l a D S Ds Cs' Cs fs' F v E)
[PROOF STATE]
proof (state)
this:
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
Ds = Cs' @\<^sub>p Cs
(Ds, fs') \<in> S
fs' F = \<lfloor>v\<rfloor>
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} : T

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
have h:"hp (h,l) a = Some(D,S)"
    and Ds:"Ds = Cs'@\<^sub>pCs" and S:"(Ds,fs') \<in> S"
    and fs':"fs' F = Some v" and sconf:"P,E \<turnstile> (h,l) \<surd>"
    and wte:"P,E,h \<turnstile> ref (a,Cs')\<bullet>F{Cs} : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (hp (h, l) a = \<lfloor>(D, S)\<rfloor> &&& Ds = Cs' @\<^sub>p Cs &&& (Ds, fs') \<in> S) &&& fs' F = \<lfloor>v\<rfloor> &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} : T
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
Ds = Cs' @\<^sub>p Cs
(Ds, fs') \<in> S
fs' F = \<lfloor>v\<rfloor>
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} : T

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
from wte
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} : T
[PROOF STEP]
have field:"P \<turnstile> last Cs' has least F:T via Cs"
    and notemptyCs:"Cs \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} : T

goal (1 subgoal):
 1. P \<turnstile> last Cs' has least F:T via Cs &&& Cs \<noteq> []
[PROOF STEP]
by (auto split:if_split_asm)
[PROOF STATE]
proof (state)
this:
P \<turnstile> last Cs' has least F:T via Cs
Cs \<noteq> []

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
from h S sconf
[PROOF STATE]
proof (chain)
picking this:
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
(Ds, fs') \<in> S
P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
obtain Bs fs ms where classDs:"class P (last Ds) = Some (Bs,fs,ms)"
    and fconf:"P,h \<turnstile> fs' (:\<le>) map_of fs"
[PROOF STATE]
proof (prove)
using this:
hp (h, l) a = \<lfloor>(D, S)\<rfloor>
(Ds, fs') \<in> S
P,E \<turnstile> (h, l) \<surd>

goal (1 subgoal):
 1. (\<And>Bs fs ms. \<lbrakk>class P (last Ds) = \<lfloor>(Bs, fs, ms)\<rfloor>; P,h \<turnstile> fs' (:\<le>) map_of fs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (simp add:sconf_def hconf_def oconf_def) blast
[PROOF STATE]
proof (state)
this:
class P (last Ds) = \<lfloor>(Bs, fs, ms)\<rfloor>
P,h \<turnstile> fs' (:\<le>) map_of fs

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
from field Ds
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> last Cs' has least F:T via Cs
Ds = Cs' @\<^sub>p Cs
[PROOF STEP]
have "last Cs = last Ds"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> last Cs' has least F:T via Cs
Ds = Cs' @\<^sub>p Cs

goal (1 subgoal):
 1. last Cs = last Ds
[PROOF STEP]
by (fastforce intro!:appendPath_last Subobjs_nonempty
                   simp:LeastFieldDecl_def FieldDecls_def)
[PROOF STATE]
proof (state)
this:
last Cs = last Ds

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
with field classDs
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> last Cs' has least F:T via Cs
class P (last Ds) = \<lfloor>(Bs, fs, ms)\<rfloor>
last Cs = last Ds
[PROOF STEP]
have map:"map_of fs F =  Some T"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> last Cs' has least F:T via Cs
class P (last Ds) = \<lfloor>(Bs, fs, ms)\<rfloor>
last Cs = last Ds

goal (1 subgoal):
 1. map_of fs F = \<lfloor>T\<rfloor>
[PROOF STEP]
by (simp add:LeastFieldDecl_def FieldDecls_def)
[PROOF STATE]
proof (state)
this:
map_of fs F = \<lfloor>T\<rfloor>

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
with fconf fs'
[PROOF STATE]
proof (chain)
picking this:
P,h \<turnstile> fs' (:\<le>) map_of fs
fs' F = \<lfloor>v\<rfloor>
map_of fs F = \<lfloor>T\<rfloor>
[PROOF STEP]
have conf:"P,h \<turnstile> v :\<le> T"
[PROOF STATE]
proof (prove)
using this:
P,h \<turnstile> fs' (:\<le>) map_of fs
fs' F = \<lfloor>v\<rfloor>
map_of fs F = \<lfloor>T\<rfloor>

goal (1 subgoal):
 1. P,h \<turnstile> v :\<le> T
[PROOF STEP]
by (simp add:fconf_def,erule_tac x="F" in allE,fastforce)
[PROOF STATE]
proof (state)
this:
P,h \<turnstile> v :\<le> T

goal (41 subgoals):
 1. \<And>a b aa D S Ds Cs' Cs fs F v E T. \<lbrakk>hp (a, b) aa = \<lfloor>(D, S)\<rfloor>; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; fs F = \<lfloor>v\<rfloor>; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> ref (aa, Cs')\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val v :\<^bsub>NT\<^esub> T
 2. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 5. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 6. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 8. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 9. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 10. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
A total of 41 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,h \<turnstile> v :\<le> T

goal (1 subgoal):
 1. P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (cases T) auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v :\<^bsub>NT\<^esub> T

goal (40 subgoals):
 1. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 4. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 7. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 8. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 9. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 10. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 40 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (40 subgoals):
 1. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 4. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 7. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 8. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 9. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 10. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 40 subgoals...
[PROOF STEP]
case (RedFAccNull E F Cs h l)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> null\<bullet>F{Cs} : T

goal (40 subgoals):
 1. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 4. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 7. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 8. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 9. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 10. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 40 subgoals...
[PROOF STEP]
have sconf:"P,E \<turnstile> (h, l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>

goal (40 subgoals):
 1. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 4. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 7. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 8. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 9. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 10. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 40 subgoals...
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
[PROOF STEP]
have "is_class P NullPointer"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P

goal (1 subgoal):
 1. is_class P NullPointer
[PROOF STEP]
by (fastforce intro:is_class_xcpt wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
is_class P NullPointer

goal (40 subgoals):
 1. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 4. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 7. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 8. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 9. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 10. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 40 subgoals...
[PROOF STEP]
hence "preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer,[NullPointer])) = Some(Class NullPointer)"
[PROOF STATE]
proof (prove)
using this:
is_class P NullPointer

goal (1 subgoal):
 1. preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
by (auto elim: preallocatedE dest!:preallocatedD Subobjs_Base)
[PROOF STATE]
proof (state)
this:
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (40 subgoals):
 1. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 4. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 7. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 8. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 9. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 10. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 40 subgoals...
[PROOF STEP]
with sconf
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> THROW NullPointer : T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T
[PROOF STEP]
by(auto simp:sconf_def hconf_def)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (40 subgoals):
 1. \<And>E F Cs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 4. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 5. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 7. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 8. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 9. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 10. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 40 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T

goal (39 subgoals):
 1. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 3. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 6. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 7. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 8. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 9. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
A total of 39 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (39 subgoals):
 1. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 3. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 6. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 7. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 8. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 9. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
A total of 39 subgoals...
[PROOF STEP]
case (FAssRed1 E e h l e' h' l' F Cs e\<^sub>2)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T

goal (39 subgoals):
 1. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 3. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 6. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 7. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 8. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 9. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
A total of 39 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h,l)\<rangle> \<rightarrow> \<langle>e',(h',l')\<rangle>"
    and wt:"P,E,h \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
            \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h,l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& P,E,h \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T) &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
P,E,h \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>

goal (39 subgoals):
 1. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 3. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 6. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 7. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 8. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 9. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
A total of 39 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
have "P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
proof (rule WTrt_elim_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
fix C T'
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
assume wte: "P,E,h \<turnstile> e : Class C"
      and field:"P \<turnstile> C has least F:T via Cs"
      and notemptyCs:"Cs \<noteq> []"
      and wte2:"P,E,h \<turnstile> e\<^sub>2 : T'" and sub:"P \<turnstile> T' \<le> T"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : Class C
P \<turnstile> C has least F:T via Cs
Cs \<noteq> []
P,E,h \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T

goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
have wte2': "P,E,h' \<turnstile> e\<^sub>2 : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e\<^sub>2 : T'
[PROOF STEP]
by(rule WTrt_hext_mono[OF wte2 red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e\<^sub>2 : T'

goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C
[PROOF STEP]
have "P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT

goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> e : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
proof(rule disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : Class C"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
from wte' notemptyCs field wte2' sub
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
by (rule WTrtFAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
from wte' wte2' sub
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
by (rule WTrtFAssNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
fix T'
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> e : NT"
      and wte2:"P,E,h \<turnstile> e\<^sub>2 : T'" and sub:"P \<turnstile> T' \<le> T"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : NT
P,E,h \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
have wte2': "P,E,h' \<turnstile> e\<^sub>2 : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e\<^sub>2 : T'
[PROOF STEP]
by(rule WTrt_hext_mono[OF wte2 red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e\<^sub>2 : T'

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT
[PROOF STEP]
have wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> e\<^sub>2 : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
from wte' wte2' sub
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> e\<^sub>2 : T'
P \<turnstile> T' \<le> T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T
[PROOF STEP]
by (rule WTrtFAssNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T

goal (39 subgoals):
 1. \<And>E e a b e' aa ba F Cs e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 3. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 4. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 6. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 7. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 8. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 9. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
A total of 39 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e'\<bullet>F{Cs} := e\<^sub>2 :\<^bsub>NT\<^esub> T

goal (38 subgoals):
 1. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 2. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 5. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 6. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 7. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 8. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
A total of 38 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (38 subgoals):
 1. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 2. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 5. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 6. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 7. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 8. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
A total of 38 subgoals...
[PROOF STEP]
case (FAssRed2 E e h l e' h' l' v F Cs)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Val v\<bullet>F{Cs} := e : T

goal (38 subgoals):
 1. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 2. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 5. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 6. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 7. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 8. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
A total of 38 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h,l)\<rangle> \<rightarrow> \<langle>e',(h',l')\<rangle>"
    and wt:"P,E,h \<turnstile> Val v\<bullet>F{Cs} := e : T"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
            \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h,l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& P,E,h \<turnstile> Val v\<bullet>F{Cs} := e : T) &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
P,E,h \<turnstile> Val v\<bullet>F{Cs} := e : T
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>

goal (38 subgoals):
 1. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 2. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 5. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 6. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 7. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 8. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
A total of 38 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Val v\<bullet>F{Cs} := e : T
[PROOF STEP]
have "P,E,h' \<turnstile> Val v\<bullet>F{Cs}:=e' : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Val v\<bullet>F{Cs} := e : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
proof (rule WTrt_elim_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
fix C T'
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
assume wtval:"P,E,h \<turnstile> Val v : Class C"
      and field:"P \<turnstile> C has least F:T via Cs"
      and notemptyCs:"Cs \<noteq> []"
      and wte:"P,E,h \<turnstile> e : T'"
      and sub:"P \<turnstile> T' \<le> T"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : Class C
P \<turnstile> C has least F:T via Cs
Cs \<noteq> []
P,E,h \<turnstile> e : T'
P \<turnstile> T' \<le> T

goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
have wtval':"P,E,h' \<turnstile> Val v : Class C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v : Class C
[PROOF STEP]
by(rule WTrt_hext_mono[OF wtval red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v : Class C

goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from field wf
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> C has least F:T via Cs
wf_C_prog P
[PROOF STEP]
have type:"is_type P T"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> C has least F:T via Cs
wf_C_prog P

goal (1 subgoal):
 1. is_type P T
[PROOF STEP]
by(rule least_field_is_type)
[PROOF STATE]
proof (state)
this:
is_type P T

goal (2 subgoals):
 1. \<And>C T'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; Cs \<noteq> []; P \<turnstile> C has least F:T via Cs; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from sub type wf
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> T' \<le> T
is_type P T
wf_C_prog P
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T' \<le> T
is_type P T
wf_C_prog P

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
proof(rule subE)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<lbrakk>T' = T; \<forall>C. T' \<noteq> Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 3. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
assume "T' = T" and notclass:"\<forall>C. T' \<noteq> Class C"
[PROOF STATE]
proof (state)
this:
T' = T
\<forall>C. T' \<noteq> Class C

goal (3 subgoals):
 1. \<lbrakk>T' = T; \<forall>C. T' \<noteq> Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 3. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from IH[OF sconf wte] notclass
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
\<forall>C. T' \<noteq> Class C
[PROOF STEP]
have wte':"P,E,h' \<turnstile> e' : T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
\<forall>C. T' \<noteq> Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : T'
[PROOF STEP]
by(cases T') auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : T'

goal (3 subgoals):
 1. \<lbrakk>T' = T; \<forall>C. T' \<noteq> Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 3. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from wtval' notemptyCs field wte' sub
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : T'
P \<turnstile> T' \<le> T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : T'
P \<turnstile> T' \<le> T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
by(rule WTrtFAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
fix C' D
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
assume T':"T' = Class C'" and T:"T = Class D"
        and path_unique:"P \<turnstile> Path C' to D unique"
[PROOF STATE]
proof (state)
this:
T' = Class C'
T = Class D
P \<turnstile> Path C' to D unique

goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from IH[OF sconf wte] T'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = Class C'
[PROOF STEP]
have "P,E,h' \<turnstile> e' : Class C' \<or> P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = Class C'

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C' \<or> P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C' \<or> P,E,h' \<turnstile> e' : NT

goal (2 subgoals):
 1. \<And>C D. \<lbrakk>T' = Class C; T = Class D; P \<turnstile> Path C to D unique\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C' \<or> P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
proof(rule disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : Class C'"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C'

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from wtval' notemptyCs field wte' sub T'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : Class C'
P \<turnstile> T' \<le> T
T' = Class C'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : Class C'
P \<turnstile> T' \<le> T
T' = Class C'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
by (fastforce intro: WTrtFAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from wtval' notemptyCs field wte' sub T
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : NT
P \<turnstile> T' \<le> T
T = Class D
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : NT
P \<turnstile> T' \<le> T
T = Class D

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
by (fastforce intro: WTrtFAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
fix C'
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
assume T':"T' = NT" and T:"T = Class C'"
[PROOF STATE]
proof (state)
this:
T' = NT
T = Class C'

goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from IH[OF sconf wte] T'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = NT
[PROOF STEP]
have wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
T' = NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. \<And>C. \<lbrakk>T' = NT; T = Class C\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from wtval' notemptyCs field wte' sub T
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : NT
P \<turnstile> T' \<le> T
T = Class C'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : Class C
Cs \<noteq> []
P \<turnstile> C has least F:T via Cs
P,E,h' \<turnstile> e' : NT
P \<turnstile> T' \<le> T
T = Class C'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
by (fastforce intro: WTrtFAss)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
fix T'
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
assume wtval:"P,E,h \<turnstile> Val v : NT"
      and wte:"P,E,h \<turnstile> e : T'"
      and sub:"P \<turnstile> T' \<le> T"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : NT
P,E,h \<turnstile> e : T'
P \<turnstile> T' \<le> T

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
have wtval':"P,E,h' \<turnstile> Val v : NT"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v : NT
[PROOF STEP]
by(rule WTrt_hext_mono[OF wtval red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v : NT

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from IH[OF sconf wte] sub
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
P \<turnstile> T' \<le> T
[PROOF STEP]
obtain T'' where wte':"P,E,h' \<turnstile> e' : T''"
      and sub':"P \<turnstile> T'' \<le> T"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
P \<turnstile> T' \<le> T

goal (1 subgoal):
 1. (\<And>T''. \<lbrakk>P,E,h' \<turnstile> e' : T''; P \<turnstile> T'' \<le> T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (cases T',auto,cases T,auto)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : T''
P \<turnstile> T'' \<le> T

goal (1 subgoal):
 1. \<And>T'. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> e : T'; P \<turnstile> T' \<le> T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
from wtval' wte' sub'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : NT
P,E,h' \<turnstile> e' : T''
P \<turnstile> T'' \<le> T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : NT
P,E,h' \<turnstile> e' : T''
P \<turnstile> T'' \<le> T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T
[PROOF STEP]
by(rule WTrtFAssNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal (38 subgoals):
 1. \<And>E e a b e' aa ba v F Cs T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v\<bullet>F{Cs} := e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
 2. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 3. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 5. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 6. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 7. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 8. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
A total of 38 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v\<bullet>F{Cs} := e' :\<^bsub>NT\<^esub> T

goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
case (RedFAss h a D S Cs' F T Cs v v' Ds fs E l T')
[PROOF STATE]
proof (state)
this:
h a = \<lfloor>(D, S)\<rfloor>
P \<turnstile> last Cs' has least F:T via Cs
P \<turnstile> T casts v to v'
Ds = Cs' @\<^sub>p Cs
(Ds, fs) \<in> S
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : T'

goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
let ?fs' = "fs(F \<mapsto> v')"
[PROOF STATE]
proof (state)
goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
let ?S' = "insert (Ds, ?fs') (S - {(Ds, fs)})"
[PROOF STATE]
proof (state)
goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
let ?h' = "h(a \<mapsto> (D,?S'))"
[PROOF STATE]
proof (state)
goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
have h:"h a = Some(D,S)" and casts:"P \<turnstile> T casts v to v'"
    and field:"P \<turnstile> last Cs' has least F:T via Cs"
    and wt:"P,E,h \<turnstile> ref (a,Cs')\<bullet>F{Cs} := Val v : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (h a = \<lfloor>(D, S)\<rfloor> &&& P \<turnstile> T casts v to v' ) &&& P \<turnstile> last Cs' has least F:T via Cs &&& P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : T'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
h a = \<lfloor>(D, S)\<rfloor>
P \<turnstile> T casts v to v'
P \<turnstile> last Cs' has least F:T via Cs
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : T'

goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
from wt wf
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : T'
wf_C_prog P
[PROOF STEP]
have type:"is_type P T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : T'
wf_C_prog P

goal (1 subgoal):
 1. is_type P T'
[PROOF STEP]
by (auto dest:least_field_is_type split:if_split_asm)
[PROOF STATE]
proof (state)
this:
is_type P T'

goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
from wt field
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : T'
P \<turnstile> last Cs' has least F:T via Cs
[PROOF STEP]
obtain T'' where wtval:"P,E,h \<turnstile> Val v : T''" and eq:"T = T'"
    and leq:"P \<turnstile> T'' \<le> T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : T'
P \<turnstile> last Cs' has least F:T via Cs

goal (1 subgoal):
 1. (\<And>T''. \<lbrakk>P,E,h \<turnstile> Val v : T''; T = T'; P \<turnstile> T'' \<le> T'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto dest:sees_field_fun split:if_split_asm)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : T''
T = T'
P \<turnstile> T'' \<le> T'

goal (37 subgoals):
 1. \<And>h a D S Cs' F T Cs v v' Ds fs E l Ta. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; P \<turnstile> last Cs' has least F:T via Cs; P \<turnstile> T casts v to v' ; Ds = Cs' @\<^sub>p Cs; (Ds, fs) \<in> S; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> ref (a, Cs')\<bullet>F{Cs} := Val v : Ta\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> Ta
 2. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 4. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 5. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 6. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 7. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
A total of 37 subgoals...
[PROOF STEP]
from casts eq wtval
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> T casts v to v'
T = T'
P,E,h \<turnstile> Val v : T''
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T casts v to v'
T = T'
P,E,h \<turnstile> Val v : T''

goal (1 subgoal):
 1. P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
proof(induct rule:casts_to.induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>T v. \<lbrakk>\<forall>C. T \<noteq> Class C; T = T'; P,E,h \<turnstile> Val v : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v)) (S - {(Ds, fs)}))) \<turnstile> Val v :\<^bsub>NT\<^esub> T'
 2. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 3. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
case (casts_prim T\<^sub>0 w)
[PROOF STATE]
proof (state)
this:
\<forall>C. T\<^sub>0 \<noteq> Class C
T\<^sub>0 = T'
P,E,h \<turnstile> Val w : T''

goal (3 subgoals):
 1. \<And>T v. \<lbrakk>\<forall>C. T \<noteq> Class C; T = T'; P,E,h \<turnstile> Val v : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v)) (S - {(Ds, fs)}))) \<turnstile> Val v :\<^bsub>NT\<^esub> T'
 2. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 3. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
have "T\<^sub>0 = T'" and "\<forall>C. T\<^sub>0 \<noteq> Class C" and wtval':"P,E,h \<turnstile> Val w : T''"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T\<^sub>0 = T' &&& \<forall>C. T\<^sub>0 \<noteq> Class C &&& P,E,h \<turnstile> Val w : T''
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
T\<^sub>0 = T'
\<forall>C. T\<^sub>0 \<noteq> Class C
P,E,h \<turnstile> Val w : T''

goal (3 subgoals):
 1. \<And>T v. \<lbrakk>\<forall>C. T \<noteq> Class C; T = T'; P,E,h \<turnstile> Val v : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v)) (S - {(Ds, fs)}))) \<turnstile> Val v :\<^bsub>NT\<^esub> T'
 2. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 3. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with leq
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> T'' \<le> T'
T\<^sub>0 = T'
\<forall>C. T\<^sub>0 \<noteq> Class C
P,E,h \<turnstile> Val w : T''
[PROOF STEP]
have "T' = T''"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T'' \<le> T'
T\<^sub>0 = T'
\<forall>C. T\<^sub>0 \<noteq> Class C
P,E,h \<turnstile> Val w : T''

goal (1 subgoal):
 1. T' = T''
[PROOF STEP]
by(cases T',auto)
[PROOF STATE]
proof (state)
this:
T' = T''

goal (3 subgoals):
 1. \<And>T v. \<lbrakk>\<forall>C. T \<noteq> Class C; T = T'; P,E,h \<turnstile> Val v : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v)) (S - {(Ds, fs)}))) \<turnstile> Val v :\<^bsub>NT\<^esub> T'
 2. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 3. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with wtval'
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Val w : T''
T' = T''
[PROOF STEP]
have "P,E,h \<turnstile> Val w : T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Val w : T''
T' = T''

goal (1 subgoal):
 1. P,E,h \<turnstile> Val w : T'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val w : T'

goal (3 subgoals):
 1. \<And>T v. \<lbrakk>\<forall>C. T \<noteq> Class C; T = T'; P,E,h \<turnstile> Val v : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v)) (S - {(Ds, fs)}))) \<turnstile> Val v :\<^bsub>NT\<^esub> T'
 2. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 3. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with h
[PROOF STATE]
proof (chain)
picking this:
h a = \<lfloor>(D, S)\<rfloor>
P,E,h \<turnstile> Val w : T'
[PROOF STEP]
have "P,E,(h(a\<mapsto>(D,insert(Ds,fs(F \<mapsto> w))(S-{(Ds,fs)})))) \<turnstile> Val w : T'"
[PROOF STATE]
proof (prove)
using this:
h a = \<lfloor>(D, S)\<rfloor>
P,E,h \<turnstile> Val w : T'

goal (1 subgoal):
 1. P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> w)) (S - {(Ds, fs)}))) \<turnstile> Val w : T'
[PROOF STEP]
by(cases w,auto split:if_split_asm)
[PROOF STATE]
proof (state)
this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> w)) (S - {(Ds, fs)}))) \<turnstile> Val w : T'

goal (3 subgoals):
 1. \<And>T v. \<lbrakk>\<forall>C. T \<noteq> Class C; T = T'; P,E,h \<turnstile> Val v : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v)) (S - {(Ds, fs)}))) \<turnstile> Val v :\<^bsub>NT\<^esub> T'
 2. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 3. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
thus "P,E,(h(a\<mapsto>(D,insert(Ds,fs(F \<mapsto> w))(S-{(Ds,fs)})))) \<turnstile> (Val w) :\<^bsub>NT\<^esub> T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> w)) (S - {(Ds, fs)}))) \<turnstile> Val w : T'

goal (1 subgoal):
 1. P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> w)) (S - {(Ds, fs)}))) \<turnstile> Val w :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> w)) (S - {(Ds, fs)}))) \<turnstile> Val w :\<^bsub>NT\<^esub> T'

goal (2 subgoals):
 1. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 2. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 2. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
case (casts_null C'')
[PROOF STATE]
proof (state)
this:
Class C'' = T'
P,E,h \<turnstile> null : T''

goal (2 subgoals):
 1. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 2. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
have T':"Class C'' = T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Class C'' = T'
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
Class C'' = T'

goal (2 subgoals):
 1. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 2. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
have "P,E,(h(a\<mapsto>(D,insert(Ds,fs(F \<mapsto> Null))(S-{(Ds,fs)})))) \<turnstile> null : NT"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null : NT

goal (2 subgoals):
 1. \<And>C. \<lbrakk>Class C = T'; P,E,h \<turnstile> null : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
 2. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with sym[OF T']
[PROOF STATE]
proof (chain)
picking this:
T' = Class C''
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null : NT
[PROOF STEP]
show "P,E,(h(a\<mapsto>(D,insert(Ds,fs(F \<mapsto> Null))(S-{(Ds,fs)})))) \<turnstile> null :\<^bsub>NT\<^esub> T'"
[PROOF STATE]
proof (prove)
using this:
T' = Class C''
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null : NT

goal (1 subgoal):
 1. P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Null)) (S - {(Ds, fs)}))) \<turnstile> null :\<^bsub>NT\<^esub> T'

goal (1 subgoal):
 1. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
case (casts_ref Xs C'' Xs' Ds'' a')
[PROOF STATE]
proof (state)
this:
P \<turnstile> Path last Xs to C'' via Xs'
Ds'' = Xs @\<^sub>p Xs'
Class C'' = T'
P,E,h \<turnstile> ref (a', Xs) : T''

goal (1 subgoal):
 1. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
have "Class C'' = T'" and "Ds'' = Xs @\<^sub>p Xs'"
      and "P \<turnstile> Path last Xs to C'' via Xs'"
      and "P,E,h \<turnstile> ref (a', Xs) : T''"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Class C'' = T' &&& Ds'' = Xs @\<^sub>p Xs') &&& P \<turnstile> Path last Xs to C'' via Xs'  &&& P,E,h \<turnstile> ref (a', Xs) : T''
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
Class C'' = T'
Ds'' = Xs @\<^sub>p Xs'
P \<turnstile> Path last Xs to C'' via Xs'
P,E,h \<turnstile> ref (a', Xs) : T''

goal (1 subgoal):
 1. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with wf
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
Class C'' = T'
Ds'' = Xs @\<^sub>p Xs'
P \<turnstile> Path last Xs to C'' via Xs'
P,E,h \<turnstile> ref (a', Xs) : T''
[PROOF STEP]
have "P,E,h \<turnstile> ref (a',Ds'') : T'"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P
Class C'' = T'
Ds'' = Xs @\<^sub>p Xs'
P \<turnstile> Path last Xs to C'' via Xs'
P,E,h \<turnstile> ref (a', Xs) : T''

goal (1 subgoal):
 1. P,E,h \<turnstile> ref (a', Ds'') : T'
[PROOF STEP]
by (auto intro!:appendPath_last[THEN sym] Subobjs_nonempty
        split:if_split_asm simp:path_via_def,
        drule_tac Cs="Xs" in Subobjs_appendPath,auto)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a', Ds'') : T'

goal (1 subgoal):
 1. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
with h
[PROOF STATE]
proof (chain)
picking this:
h a = \<lfloor>(D, S)\<rfloor>
P,E,h \<turnstile> ref (a', Ds'') : T'
[PROOF STEP]
have "P,E,(h(a\<mapsto>(D,insert(Ds,fs(F \<mapsto> Ref(a',Ds'')))(S-{(Ds,fs)})))) \<turnstile>
      ref (a',Ds'') : T'"
[PROOF STATE]
proof (prove)
using this:
h a = \<lfloor>(D, S)\<rfloor>
P,E,h \<turnstile> ref (a', Ds'') : T'

goal (1 subgoal):
 1. P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (a', Ds''))) (S - {(Ds, fs)}))) \<turnstile> ref (a', Ds'') : T'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (a', Ds''))) (S - {(Ds, fs)}))) \<turnstile> ref (a', Ds'') : T'

goal (1 subgoal):
 1. \<And>Cs C Cs' Dsa aa. \<lbrakk>P \<turnstile> Path last Cs to C via Cs' ; Dsa = Cs @\<^sub>p Cs'; Class C = T'; P,E,h \<turnstile> ref (aa, Cs) : T''\<rbrakk> \<Longrightarrow> P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (aa, Dsa))) (S - {(Ds, fs)}))) \<turnstile> ref (aa, Dsa) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
thus "P,E,(h(a\<mapsto>(D,insert(Ds,fs(F \<mapsto> Ref(a',Ds'')))(S-{(Ds,fs)})))) \<turnstile>
      ref (a',Ds'') :\<^bsub>NT\<^esub> T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (a', Ds''))) (S - {(Ds, fs)}))) \<turnstile> ref (a', Ds'') : T'

goal (1 subgoal):
 1. P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (a', Ds''))) (S - {(Ds, fs)}))) \<turnstile> ref (a', Ds'') :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> Ref (a', Ds''))) (S - {(Ds, fs)}))) \<turnstile> ref (a', Ds'') :\<^bsub>NT\<^esub> T'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h(a \<mapsto> (D, insert (Ds, fs(F \<mapsto> v')) (S - {(Ds, fs)}))) \<turnstile> Val v' :\<^bsub>NT\<^esub> T'

goal (36 subgoals):
 1. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 3. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 4. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 5. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 6. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 36 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (36 subgoals):
 1. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 3. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 4. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 5. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 6. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 36 subgoals...
[PROOF STEP]
case (RedFAssNull E F Cs v h l)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> null\<bullet>F{Cs} := Val v : T

goal (36 subgoals):
 1. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 3. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 4. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 5. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 6. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 36 subgoals...
[PROOF STEP]
have sconf:"P,E \<turnstile> (h, l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>

goal (36 subgoals):
 1. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 3. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 4. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 5. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 6. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 36 subgoals...
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
[PROOF STEP]
have "is_class P NullPointer"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P

goal (1 subgoal):
 1. is_class P NullPointer
[PROOF STEP]
by (fastforce intro:is_class_xcpt wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
is_class P NullPointer

goal (36 subgoals):
 1. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 3. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 4. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 5. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 6. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 36 subgoals...
[PROOF STEP]
hence "preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer,[NullPointer])) = Some(Class NullPointer)"
[PROOF STATE]
proof (prove)
using this:
is_class P NullPointer

goal (1 subgoal):
 1. preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
by (auto elim: preallocatedE dest!:preallocatedD Subobjs_Base)
[PROOF STATE]
proof (state)
this:
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (36 subgoals):
 1. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 3. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 4. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 5. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 6. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 36 subgoals...
[PROOF STEP]
with sconf
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> THROW NullPointer : T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T
[PROOF STEP]
by(auto simp:sconf_def hconf_def)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (36 subgoals):
 1. \<And>E F Cs v a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> null\<bullet>F{Cs} := Val v : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 3. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 4. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 5. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 6. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 10. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 36 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T

goal (35 subgoals):
 1. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 2. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 3. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 4. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 5. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 35 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (35 subgoals):
 1. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 2. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 3. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 4. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 5. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 35 subgoals...
[PROOF STEP]
case (CallObj E e h l e' h' l' Copt M es)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Call e Copt M es : T

goal (35 subgoals):
 1. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 2. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 3. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 4. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 5. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 35 subgoals...
[PROOF STEP]
have red: "P,E \<turnstile> \<langle>e,(h,l)\<rangle> \<rightarrow> \<langle>e',(h',l')\<rangle>"
   and IH: "\<And>T'. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk>
                 \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
   and sconf: "P,E \<turnstile> (h,l) \<surd>" and wt: "P,E,h \<turnstile> Call e Copt M es : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T')) &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> Call e Copt M es : T
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Call e Copt M es : T

goal (35 subgoals):
 1. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 2. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 3. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 4. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 5. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 35 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call e Copt M es : T
[PROOF STEP]
have "P,E,h' \<turnstile> Call e' Copt M es : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call e Copt M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
proof(cases Copt)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
case None
[PROOF STATE]
proof (state)
this:
Copt = None

goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
with wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call e Copt M es : T
Copt = None
[PROOF STEP]
have "P,E,h \<turnstile> e\<bullet>M(es) : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call e Copt M es : T
Copt = None

goal (1 subgoal):
 1. P,E,h \<turnstile> Call e None M es : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Call e None M es : T

goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
hence "P,E,h' \<turnstile> e'\<bullet>M(es) : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call e None M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
proof(rule WTrt_elim_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
fix C Cs Ts Ts' m
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> e : Class C"
        and "method":"P \<turnstile> C has least M = (Ts, T, m) via Cs"
        and wtes:"P,E,h \<turnstile> es [:] Ts'" and subs: "P \<turnstile> Ts' [\<le>] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : Class C
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C
[PROOF STEP]
have "P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C

goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
proof(rule disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
 2. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
 2. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
have "P,E,h' \<turnstile> es [:] Ts'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:] Ts'
[PROOF STEP]
by(rule WTrts_hext_mono[OF wtes red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:] Ts'

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
 2. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
with wte'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
by(rule WTrtCallNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' None M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : Class C"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
have wtes':"P,E,h' \<turnstile> es [:] Ts'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:] Ts'
[PROOF STEP]
by(rule WTrts_hext_mono[OF wtes red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:] Ts'

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
from wte' "method" wtes' subs
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : Class C
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
by(rule WTrtCall)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' None M es : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' None M es : T

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
fix Ts
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> e : NT" and wtes:"P,E,h \<turnstile> es [:] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : NT
P,E,h \<turnstile> es [:] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT
[PROOF STEP]
have wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
have "P,E,h' \<turnstile> es [:] Ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:] Ts
[PROOF STEP]
by(rule WTrts_hext_mono[OF wtes red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
with wte'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
by(rule WTrtCallNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' None M es : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' None M es : T

goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
with None
[PROOF STATE]
proof (chain)
picking this:
Copt = None
P,E,h' \<turnstile> Call e' None M es : T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Copt = None
P,E,h' \<turnstile> Call e' None M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' Copt M es : T

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
case (Some C)
[PROOF STATE]
proof (state)
this:
Copt = \<lfloor>C\<rfloor>

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
with wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call e Copt M es : T
Copt = \<lfloor>C\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> e\<bullet>(C::)M(es) : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call e Copt M es : T
Copt = \<lfloor>C\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Call e \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Call e \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
hence "P,E,h' \<turnstile> e'\<bullet>(C::)M(es) : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call e \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
proof(rule WTrt_elim_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
fix C' Cs Ts Ts' m
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> e : Class C'" and path_unique:"P \<turnstile> Path C' to C unique"
        and "method":"P \<turnstile> C has least M = (Ts, T, m) via Cs"
        and wtes:"P,E,h \<turnstile> es [:] Ts'" and subs: "P \<turnstile> Ts' [\<le>] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : Class C'
P \<turnstile> Path C' to C unique
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C'
[PROOF STEP]
have "P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C'"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C'

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C'

goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> e : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT \<or> P,E,h' \<turnstile> e' : Class C'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
proof(rule disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
 2. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
 2. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
have "P,E,h' \<turnstile> es [:] Ts'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:] Ts'
[PROOF STEP]
by(rule WTrts_hext_mono[OF wtes red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:] Ts'

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
 2. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
with wte'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
by(rule WTrtCallNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : Class C'"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C'

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
have wtes':"P,E,h' \<turnstile> es [:] Ts'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:] Ts'
[PROOF STEP]
by(rule WTrts_hext_mono[OF wtes red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:] Ts'

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C' \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
from wte' path_unique "method" wtes' subs
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : Class C'
P \<turnstile> Path C' to C unique
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C'
P \<turnstile> Path C' to C unique
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
by(rule WTrtStaticCall)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
fix Ts
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> e : NT" and wtes:"P,E,h \<turnstile> es [:] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : NT
P,E,h \<turnstile> es [:] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT
[PROOF STEP]
have wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
have "P,E,h' \<turnstile> es [:] Ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:] Ts
[PROOF STEP]
by(rule WTrts_hext_mono[OF wtes red_hext_incr[OF red]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> e : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
with wte'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT
P,E,h' \<turnstile> es [:] Ts

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
by(rule WTrtCallNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call e Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
with Some
[PROOF STATE]
proof (chain)
picking this:
Copt = \<lfloor>C\<rfloor>
P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Copt = \<lfloor>C\<rfloor>
P,E,h' \<turnstile> Call e' \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' Copt M es : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' Copt M es : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' Copt M es : T

goal (35 subgoals):
 1. \<And>E e a b e' aa ba Copt M es T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call e Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
 2. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 3. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 4. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 5. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 9. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
A total of 35 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Call e' Copt M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call e' Copt M es :\<^bsub>NT\<^esub> T

goal (34 subgoals):
 1. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 2. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 3. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 4. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 34 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (34 subgoals):
 1. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 2. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 3. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 4. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 34 subgoals...
[PROOF STEP]
case (CallParams E es h l es' h' l' v Copt M)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] ?Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> ?Ts
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Call (Val v) Copt M es : T

goal (34 subgoals):
 1. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 2. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 3. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 4. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 34 subgoals...
[PROOF STEP]
have reds: "P,E \<turnstile> \<langle>es,(h,l)\<rangle> [\<rightarrow>] \<langle>es',(h',l')\<rangle>"
   and IH: "\<And>Ts. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> es [:] Ts\<rbrakk>
                 \<Longrightarrow> types_conf P E h' es' Ts"
   and sconf: "P,E \<turnstile> (h,l) \<surd>" and wt: "P,E,h \<turnstile> Call (Val v) Copt M es : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle> &&& (\<And>Ts. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts)) &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> Call (Val v) Copt M es : T
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] ?Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> ?Ts
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Call (Val v) Copt M es : T

goal (34 subgoals):
 1. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 2. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 3. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 4. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 34 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call (Val v) Copt M es : T
[PROOF STEP]
have "P,E,h' \<turnstile> Call (Val v) Copt M es' : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call (Val v) Copt M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
proof(cases Copt)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
case None
[PROOF STATE]
proof (state)
this:
Copt = None

goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
with wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call (Val v) Copt M es : T
Copt = None
[PROOF STEP]
have "P,E,h \<turnstile> (Val v)\<bullet>M(es) : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call (Val v) Copt M es : T
Copt = None

goal (1 subgoal):
 1. P,E,h \<turnstile> Call (Val v) None M es : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Call (Val v) None M es : T

goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
hence "P,E,h' \<turnstile> Val v\<bullet>M(es') : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call (Val v) None M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
proof (rule WTrt_elim_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
fix C Cs Ts Ts' m
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
assume wte: "P,E,h \<turnstile> Val v : Class C"
        and "method":"P \<turnstile> C has least M = (Ts,T,m) via Cs"
        and wtes: "P,E,h \<turnstile> es [:] Ts'" and subs:"P \<turnstile> Ts' [\<le>] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : Class C
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
from wtes
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> es [:] Ts'
[PROOF STEP]
have "length es = length Ts'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> es [:] Ts'

goal (1 subgoal):
 1. length es = length Ts'
[PROOF STEP]
by(rule WTrts_same_length)
[PROOF STATE]
proof (state)
this:
length es = length Ts'

goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
with reds
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts'
[PROOF STEP]
have "length es' = length Ts'"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts'

goal (1 subgoal):
 1. length es' = length Ts'
[PROOF STEP]
by -(drule reds_length,simp)
[PROOF STATE]
proof (state)
this:
length es' = length Ts'

goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
with IH[OF sconf wtes] subs
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts'
P \<turnstile> Ts' [\<le>] Ts
length es' = length Ts'
[PROOF STEP]
obtain Ts'' where wtes':"P,E,h' \<turnstile> es' [:] Ts''"
        and subs':"P \<turnstile> Ts'' [\<le>] Ts"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts'
P \<turnstile> Ts' [\<le>] Ts
length es' = length Ts'

goal (1 subgoal):
 1. (\<And>Ts''. \<lbrakk>P,E,h' \<turnstile> es' [:] Ts''; P \<turnstile> Ts'' [\<le>] Ts\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(auto dest:types_conf_smaller_types)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es' [:] Ts''
P \<turnstile> Ts'' [\<le>] Ts

goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
have wte':"P,E,h' \<turnstile> Val v : Class C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v : Class C
[PROOF STEP]
by(rule WTrt_hext_mono[OF wte reds_hext_incr[OF reds]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v : Class C

goal (2 subgoals):
 1. \<And>C Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
from wte' "method" wtes' subs'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : Class C
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es' [:] Ts''
P \<turnstile> Ts'' [\<le>] Ts
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : Class C
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es' [:] Ts''
P \<turnstile> Ts'' [\<le>] Ts

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
by(rule WTrtCall)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) None M es' : T

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
fix Ts
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> Val v : NT"
        and wtes:"P,E,h \<turnstile> es [:] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : NT
P,E,h \<turnstile> es [:] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
from wtes
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> es [:] Ts
[PROOF STEP]
have "length es = length Ts"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> es [:] Ts

goal (1 subgoal):
 1. length es = length Ts
[PROOF STEP]
by(rule WTrts_same_length)
[PROOF STATE]
proof (state)
this:
length es = length Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
with reds
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts
[PROOF STEP]
have "length es' = length Ts"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts

goal (1 subgoal):
 1. length es' = length Ts
[PROOF STEP]
by -(drule reds_length,simp)
[PROOF STATE]
proof (state)
this:
length es' = length Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
with IH[OF sconf wtes]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts
length es' = length Ts
[PROOF STEP]
obtain Ts' where wtes':"P,E,h' \<turnstile> es' [:] Ts'"
        and "P \<turnstile> Ts' [\<le>] Ts"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts
length es' = length Ts

goal (1 subgoal):
 1. (\<And>Ts'. \<lbrakk>P,E,h' \<turnstile> es' [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(auto dest:types_conf_smaller_types)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es' [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
have wte':"P,E,h' \<turnstile> Val v : NT"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v : NT
[PROOF STEP]
by(rule WTrt_hext_mono[OF wte reds_hext_incr[OF reds]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v : NT

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
from wte' wtes'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : NT
P,E,h' \<turnstile> es' [:] Ts'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : NT
P,E,h' \<turnstile> es' [:] Ts'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
by(rule WTrtCallNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) None M es' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) None M es' : T

goal (2 subgoals):
 1. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = None\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
 2. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
with None
[PROOF STATE]
proof (chain)
picking this:
Copt = None
P,E,h' \<turnstile> Call (Val v) None M es' : T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Copt = None
P,E,h' \<turnstile> Call (Val v) None M es' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) Copt M es' : T

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
case (Some C)
[PROOF STATE]
proof (state)
this:
Copt = \<lfloor>C\<rfloor>

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
with wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call (Val v) Copt M es : T
Copt = \<lfloor>C\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> (Val v)\<bullet>(C::)M(es) : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call (Val v) Copt M es : T
Copt = \<lfloor>C\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
hence "P,E,h' \<turnstile> (Val v)\<bullet>(C::)M(es') : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
proof(rule WTrt_elim_cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
fix C' Cs Ts Ts' m
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> Val v : Class C'" and path_unique:"P \<turnstile> Path C' to C unique"
        and "method":"P \<turnstile> C has least M = (Ts,T,m) via Cs"
        and wtes:"P,E,h \<turnstile> es [:] Ts'" and subs: "P \<turnstile> Ts' [\<le>] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : Class C'
P \<turnstile> Path C' to C unique
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h \<turnstile> es [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
from wtes
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> es [:] Ts'
[PROOF STEP]
have "length es = length Ts'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> es [:] Ts'

goal (1 subgoal):
 1. length es = length Ts'
[PROOF STEP]
by(rule WTrts_same_length)
[PROOF STATE]
proof (state)
this:
length es = length Ts'

goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
with reds
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts'
[PROOF STEP]
have "length es' = length Ts'"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts'

goal (1 subgoal):
 1. length es' = length Ts'
[PROOF STEP]
by -(drule reds_length,simp)
[PROOF STATE]
proof (state)
this:
length es' = length Ts'

goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
with IH[OF sconf wtes] subs
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts'
P \<turnstile> Ts' [\<le>] Ts
length es' = length Ts'
[PROOF STEP]
obtain Ts'' where wtes':"P,E,h' \<turnstile> es' [:] Ts''"
        and subs':"P \<turnstile> Ts'' [\<le>] Ts"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts'
P \<turnstile> Ts' [\<le>] Ts
length es' = length Ts'

goal (1 subgoal):
 1. (\<And>Ts''. \<lbrakk>P,E,h' \<turnstile> es' [:] Ts''; P \<turnstile> Ts'' [\<le>] Ts\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(auto dest:types_conf_smaller_types)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es' [:] Ts''
P \<turnstile> Ts'' [\<le>] Ts

goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
have wte':"P,E,h' \<turnstile> Val v : Class C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v : Class C'
[PROOF STEP]
by(rule WTrt_hext_mono[OF wte reds_hext_incr[OF reds]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v : Class C'

goal (2 subgoals):
 1. \<And>C' Ts m Cs Ts'. \<lbrakk>P,E,h \<turnstile> Val v : Class C'; P \<turnstile> Path C' to C unique; P \<turnstile> C has least M = (Ts, T, m) via Cs; P,E,h \<turnstile> es [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
 2. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
from wte' path_unique "method" wtes' subs'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : Class C'
P \<turnstile> Path C' to C unique
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es' [:] Ts''
P \<turnstile> Ts'' [\<le>] Ts
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : Class C'
P \<turnstile> Path C' to C unique
P \<turnstile> C has least M = (Ts, T, m) via Cs
P,E,h' \<turnstile> es' [:] Ts''
P \<turnstile> Ts'' [\<le>] Ts

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
by(rule WTrtStaticCall)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
fix Ts
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
assume wte:"P,E,h \<turnstile> Val v : NT"
        and wtes:"P,E,h \<turnstile> es [:] Ts"
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : NT
P,E,h \<turnstile> es [:] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
from wtes
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> es [:] Ts
[PROOF STEP]
have "length es = length Ts"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> es [:] Ts

goal (1 subgoal):
 1. length es = length Ts
[PROOF STEP]
by(rule WTrts_same_length)
[PROOF STATE]
proof (state)
this:
length es = length Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
with reds
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts
[PROOF STEP]
have "length es' = length Ts"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
length es = length Ts

goal (1 subgoal):
 1. length es' = length Ts
[PROOF STEP]
by -(drule reds_length,simp)
[PROOF STATE]
proof (state)
this:
length es' = length Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
with IH[OF sconf wtes]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts
length es' = length Ts
[PROOF STEP]
obtain Ts' where wtes':"P,E,h' \<turnstile> es' [:] Ts'"
        and "P \<turnstile> Ts' [\<le>] Ts"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts
length es' = length Ts

goal (1 subgoal):
 1. (\<And>Ts'. \<lbrakk>P,E,h' \<turnstile> es' [:] Ts'; P \<turnstile> Ts' [\<le>] Ts\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(auto dest:types_conf_smaller_types)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es' [:] Ts'
P \<turnstile> Ts' [\<le>] Ts

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
have wte':"P,E,h' \<turnstile> Val v : NT"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v : NT
[PROOF STEP]
by(rule WTrt_hext_mono[OF wte reds_hext_incr[OF reds]])
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v : NT

goal (1 subgoal):
 1. \<And>Ts. \<lbrakk>P,E,h \<turnstile> Val v : NT; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
from wte' wtes'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : NT
P,E,h' \<turnstile> es' [:] Ts'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : NT
P,E,h' \<turnstile> es' [:] Ts'

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
by(rule WTrtCallNT)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T

goal (1 subgoal):
 1. \<And>a. \<lbrakk>P,E,h \<turnstile> Call (Val v) Copt M es : T; Copt = \<lfloor>a\<rfloor>\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
with Some
[PROOF STATE]
proof (chain)
picking this:
Copt = \<lfloor>C\<rfloor>
P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Copt = \<lfloor>C\<rfloor>
P,E,h' \<turnstile> Call (Val v) \<lfloor>C\<rfloor> M es' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) Copt M es' : T
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) Copt M es' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) Copt M es' : T

goal (34 subgoals):
 1. \<And>E es a b es' aa ba v Copt M T. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
 2. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 3. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 4. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 8. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 10. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 34 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Call (Val v) Copt M es' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Call (Val v) Copt M es' :\<^bsub>NT\<^esub> T

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
case (RedCall h l a C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs'
                vs bs new_body E T'')
[PROOF STATE]
proof (state)
this:
hp (h, l) a = \<lfloor>(C, S)\<rfloor>
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'
length vs = length pns
length Ts = length pns
bs = blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body)
new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs)
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Call (ref (a, Cs)) None M (map Val vs) : T''

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
have hp:"hp (h,l) a = Some(C,S)"
    and "method":"P \<turnstile> last Cs has least M = (Ts',T',pns',body') via Ds"
    and select:"P \<turnstile> (C,Cs@\<^sub>pDs) selects M = (Ts,T,pns,body) via Cs'"
    and length1:"length vs = length pns" and length2:"length Ts = length pns"
    and bs:"bs = blocks(this#pns,Class(last Cs')#Ts,Ref(a,Cs')#vs,body)"
    and body_case:"new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs)"
    and wt:"P,E,h \<turnstile> ref (a,Cs)\<bullet>M(map Val vs) : T''"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((hp (h, l) a = \<lfloor>(C, S)\<rfloor> &&& P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds) &&& P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs' &&& length vs = length pns) &&& (length Ts = length pns &&& bs = blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body)) &&& new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs) &&& P,E,h \<turnstile> Call (ref (a, Cs)) None M (map Val vs) : T''
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
hp (h, l) a = \<lfloor>(C, S)\<rfloor>
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'
length vs = length pns
length Ts = length pns
bs = blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body)
new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs)
P,E,h \<turnstile> Call (ref (a, Cs)) None M (map Val vs) : T''

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
from wt hp "method" wf
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call (ref (a, Cs)) None M (map Val vs) : T''
hp (h, l) a = \<lfloor>(C, S)\<rfloor>
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
wf_C_prog P
[PROOF STEP]
obtain Ts''
    where wtref:"P,E,h \<turnstile> ref (a,Cs) : Class (last Cs)" and eq:"T'' = T'"
    and wtes:"P,E,h \<turnstile> map Val vs [:] Ts''" and subs: "P \<turnstile> Ts'' [\<le>] Ts'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call (ref (a, Cs)) None M (map Val vs) : T''
hp (h, l) a = \<lfloor>(C, S)\<rfloor>
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
wf_C_prog P

goal (1 subgoal):
 1. (\<And>Ts''. \<lbrakk>P,E,h \<turnstile> ref (a, Cs) : Class (last Cs); T'' = T'; P,E,h \<turnstile> map Val vs [:] Ts''; P \<turnstile> Ts'' [\<le>] Ts'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(auto dest:wf_sees_method_fun split:if_split_asm)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs) : Class (last Cs)
T'' = T'
P,E,h \<turnstile> map Val vs [:] Ts''
P \<turnstile> Ts'' [\<le>] Ts'

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
from select wf
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'
wf_C_prog P
[PROOF STEP]
have "is_class P (last Cs')"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'
wf_C_prog P

goal (1 subgoal):
 1. is_class P (last Cs')
[PROOF STEP]
by(induct rule:SelectMethodDef.induct,
       auto intro:Subobj_last_isClass simp:FinalOverriderMethodDef_def
      OverriderMethodDefs_def MinimalMethodDefs_def LeastMethodDef_def MethodDefs_def)
[PROOF STATE]
proof (state)
this:
is_class P (last Cs')

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
with select_method_wf_mdecl[OF wf select]
[PROOF STATE]
proof (chain)
picking this:
wf_mdecl wf_C_mdecl P (last Cs') (M, Ts, T, pns, body)
is_class P (last Cs')
[PROOF STEP]
have length_pns:"length (this#pns) = length (Class(last Cs')#Ts)"
    and notNT:"T \<noteq> NT" and type:"\<forall>T\<in>set (Class(last Cs')#Ts). is_type P T"
    and wtabody:"P,[this\<mapsto>Class(last Cs'),pns[\<mapsto>]Ts] \<turnstile> body :: T"
[PROOF STATE]
proof (prove)
using this:
wf_mdecl wf_C_mdecl P (last Cs') (M, Ts, T, pns, body)
is_class P (last Cs')

goal (1 subgoal):
 1. (length (this # pns) = length (Class (last Cs') # Ts) &&& T \<noteq> NT) &&& \<forall>T\<in>set (Class (last Cs') # Ts). is_type P T &&& P,[this \<mapsto> Class (last Cs'), pns [\<mapsto>] Ts] \<turnstile> body :: T
[PROOF STEP]
by(auto simp:wf_mdecl_def)
[PROOF STATE]
proof (state)
this:
length (this # pns) = length (Class (last Cs') # Ts)
T \<noteq> NT
\<forall>T\<in>set (Class (last Cs') # Ts). is_type P T
P,[this \<mapsto> Class (last Cs'), pns [\<mapsto>] Ts] \<turnstile> body :: T

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
from wtes hp select
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> map Val vs [:] Ts''
hp (h, l) a = \<lfloor>(C, S)\<rfloor>
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'
[PROOF STEP]
have map:"map (P \<turnstile> typeof\<^bsub>h\<^esub>) (Ref(a,Cs')#vs) = map Some (Class(last Cs')#Ts'')"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> map Val vs [:] Ts''
hp (h, l) a = \<lfloor>(C, S)\<rfloor>
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'

goal (1 subgoal):
 1. map P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs') # vs) = map Some (Class (last Cs') # Ts'')
[PROOF STEP]
by(auto elim:SelectMethodDef.cases split:if_split_asm
            simp:FinalOverriderMethodDef_def OverriderMethodDefs_def
                 MinimalMethodDefs_def LeastMethodDef_def MethodDefs_def)
[PROOF STATE]
proof (state)
this:
map P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs') # vs) = map Some (Class (last Cs') # Ts'')

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
from wtref hp
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> ref (a, Cs) : Class (last Cs)
hp (h, l) a = \<lfloor>(C, S)\<rfloor>
[PROOF STEP]
have "P \<turnstile> Path C to (last Cs) via Cs"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> ref (a, Cs) : Class (last Cs)
hp (h, l) a = \<lfloor>(C, S)\<rfloor>

goal (1 subgoal):
 1. P \<turnstile> Path C to last Cs via Cs
[PROOF STEP]
by (auto simp:path_via_def split:if_split_asm)
[PROOF STATE]
proof (state)
this:
P \<turnstile> Path C to last Cs via Cs

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
with select "method" wf
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
wf_C_prog P
P \<turnstile> Path C to last Cs via Cs
[PROOF STEP]
have "Ts' = Ts \<and> P \<turnstile> T \<le> T'"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
wf_C_prog P
P \<turnstile> Path C to last Cs via Cs

goal (1 subgoal):
 1. Ts' = Ts \<and> P \<turnstile> T \<le> T'
[PROOF STEP]
by -(rule select_least_methods_subtypes,simp_all)
[PROOF STATE]
proof (state)
this:
Ts' = Ts \<and> P \<turnstile> T \<le> T'

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
hence eqs:"Ts' = Ts" and sub:"P \<turnstile> T \<le> T'"
[PROOF STATE]
proof (prove)
using this:
Ts' = Ts \<and> P \<turnstile> T \<le> T'

goal (1 subgoal):
 1. Ts' = Ts &&& P \<turnstile> T \<le> T'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Ts' = Ts
P \<turnstile> T \<le> T'

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
from wf wtabody
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
P,[this \<mapsto> Class (last Cs'), pns [\<mapsto>] Ts] \<turnstile> body :: T
[PROOF STEP]
have "P,Map.empty(this\<mapsto>Class(last Cs'),pns[\<mapsto>]Ts),h \<turnstile> body : T"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P
P,[this \<mapsto> Class (last Cs'), pns [\<mapsto>] Ts] \<turnstile> body :: T

goal (1 subgoal):
 1. P,[this \<mapsto> Class (last Cs'), pns [\<mapsto>] Ts],h \<turnstile> body : T
[PROOF STEP]
by -(rule WT_implies_WTrt,simp_all)
[PROOF STATE]
proof (state)
this:
P,[this \<mapsto> Class (last Cs'), pns [\<mapsto>] Ts],h \<turnstile> body : T

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
hence wtbody:"P,E(this#pns [\<mapsto>] Class (last Cs')#Ts),h \<turnstile> body : T"
[PROOF STATE]
proof (prove)
using this:
P,[this \<mapsto> Class (last Cs'), pns [\<mapsto>] Ts],h \<turnstile> body : T

goal (1 subgoal):
 1. P,E(this # pns [\<mapsto>] Class (last Cs') # Ts),h \<turnstile> body : T
[PROOF STEP]
by(rule WTrt_env_mono) simp
[PROOF STATE]
proof (state)
this:
P,E(this # pns [\<mapsto>] Class (last Cs') # Ts),h \<turnstile> body : T

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
from wtes
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> map Val vs [:] Ts''
[PROOF STEP]
have "length vs = length Ts''"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> map Val vs [:] Ts''

goal (1 subgoal):
 1. length vs = length Ts''
[PROOF STEP]
by (fastforce dest:WTrts_same_length)
[PROOF STATE]
proof (state)
this:
length vs = length Ts''

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
with eqs subs
[PROOF STATE]
proof (chain)
picking this:
Ts' = Ts
P \<turnstile> Ts'' [\<le>] Ts'
length vs = length Ts''
[PROOF STEP]
have length_vs:"length (Ref(a,Cs')#vs) = length (Class(last Cs')#Ts)"
[PROOF STATE]
proof (prove)
using this:
Ts' = Ts
P \<turnstile> Ts'' [\<le>] Ts'
length vs = length Ts''

goal (1 subgoal):
 1. length (Ref (a, Cs') # vs) = length (Class (last Cs') # Ts)
[PROOF STEP]
by (simp add:list_all2_iff)
[PROOF STATE]
proof (state)
this:
length (Ref (a, Cs') # vs) = length (Class (last Cs') # Ts)

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
from subs eqs
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> Ts'' [\<le>] Ts'
Ts' = Ts
[PROOF STEP]
have "P \<turnstile> (Class(last Cs')#Ts'') [\<le>] (Class(last Cs')#Ts)"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> Ts'' [\<le>] Ts'
Ts' = Ts

goal (1 subgoal):
 1. P \<turnstile> (Class (last Cs') # Ts'') [\<le>] (Class (last Cs') # Ts)
[PROOF STEP]
by (simp add:fun_of_def)
[PROOF STATE]
proof (state)
this:
P \<turnstile> (Class (last Cs') # Ts'') [\<le>] (Class (last Cs') # Ts)

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
with wt_blocks[OF length_pns length_vs type] wtbody map eq
[PROOF STATE]
proof (chain)
picking this:
(P,?E,?h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, ?e) : ?T) = (P,?E(this # pns [\<mapsto>] Class (last Cs') # Ts),?h \<turnstile> ?e : ?T \<and> (\<exists>Ts'. map P \<turnstile> typeof\<^bsub>?h\<^esub> (Ref (a, Cs') # vs) = map Some Ts' \<and> P \<turnstile> Ts' [\<le>] (Class (last Cs') # Ts)))
P,E(this # pns [\<mapsto>] Class (last Cs') # Ts),h \<turnstile> body : T
map P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs') # vs) = map Some (Class (last Cs') # Ts'')
T'' = T'
P \<turnstile> (Class (last Cs') # Ts'') [\<le>] (Class (last Cs') # Ts)
[PROOF STEP]
have blocks:"P,E,h \<turnstile> blocks(this#pns,Class(last Cs')#Ts,Ref(a,Cs')#vs,body) : T"
[PROOF STATE]
proof (prove)
using this:
(P,?E,?h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, ?e) : ?T) = (P,?E(this # pns [\<mapsto>] Class (last Cs') # Ts),?h \<turnstile> ?e : ?T \<and> (\<exists>Ts'. map P \<turnstile> typeof\<^bsub>?h\<^esub> (Ref (a, Cs') # vs) = map Some Ts' \<and> P \<turnstile> Ts' [\<le>] (Class (last Cs') # Ts)))
P,E(this # pns [\<mapsto>] Class (last Cs') # Ts),h \<turnstile> body : T
map P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (a, Cs') # vs) = map Some (Class (last Cs') # Ts'')
T'' = T'
P \<turnstile> (Class (last Cs') # Ts'') [\<le>] (Class (last Cs') # Ts)

goal (1 subgoal):
 1. P,E,h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body) : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body) : T

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
have "P,E,h \<turnstile> new_body : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E,h \<turnstile> new_body : T'
[PROOF STEP]
proof(cases "\<forall>C. T' \<noteq> Class C")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>C. T' \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> new_body : T'
 2. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>C. T' \<noteq> Class C

goal (2 subgoals):
 1. \<forall>C. T' \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> new_body : T'
 2. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
with sub notNT
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> T \<le> T'
T \<noteq> NT
\<forall>C. T' \<noteq> Class C
[PROOF STEP]
have "T = T'"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T \<le> T'
T \<noteq> NT
\<forall>C. T' \<noteq> Class C

goal (1 subgoal):
 1. T = T'
[PROOF STEP]
by (cases T') auto
[PROOF STATE]
proof (state)
this:
T = T'

goal (2 subgoals):
 1. \<forall>C. T' \<noteq> Class C \<Longrightarrow> P,E,h \<turnstile> new_body : T'
 2. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
with blocks True body_case bs
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body) : T
\<forall>C. T' \<noteq> Class C
new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs)
bs = blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body)
T = T'
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body) : T
\<forall>C. T' \<noteq> Class C
new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs)
bs = blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body)
T = T'

goal (1 subgoal):
 1. P,E,h \<turnstile> new_body : T'
[PROOF STEP]
by(cases T') auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> new_body : T'

goal (1 subgoal):
 1. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>C. T' \<noteq> Class C)

goal (1 subgoal):
 1. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>C. T' \<noteq> Class C)
[PROOF STEP]
obtain D where T':"T' = Class D"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>C. T' \<noteq> Class C)

goal (1 subgoal):
 1. (\<And>D. T' = Class D \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
T' = Class D

goal (1 subgoal):
 1. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
with "method" sub wf
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
P \<turnstile> T \<le> T'
wf_C_prog P
T' = Class D
[PROOF STEP]
have "class": "is_class P D"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds
P \<turnstile> T \<le> T'
wf_C_prog P
T' = Class D

goal (1 subgoal):
 1. is_class P D
[PROOF STEP]
by (auto elim!:widen.cases dest:least_method_is_type
               intro:Subobj_last_isClass simp:path_unique_def)
[PROOF STATE]
proof (state)
this:
is_class P D

goal (1 subgoal):
 1. \<not> (\<forall>C. T' \<noteq> Class C) \<Longrightarrow> P,E,h \<turnstile> new_body : T'
[PROOF STEP]
with blocks T' body_case bs "class" sub
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body) : T
T' = Class D
new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs)
bs = blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body)
is_class P D
P \<turnstile> T \<le> T'
is_class P D
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body) : T
T' = Class D
new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs)
bs = blocks (this # pns, Class (last Cs') # Ts, Ref (a, Cs') # vs, body)
is_class P D
P \<turnstile> T \<le> T'
is_class P D

goal (1 subgoal):
 1. P,E,h \<turnstile> new_body : T'
[PROOF STEP]
by(cases T',auto,cases T,auto)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> new_body : T'

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> new_body : T'

goal (33 subgoals):
 1. \<And>a b aa C S Cs M Ts' T' pns' body' Ds Ts T pns body Cs' vs bs new_body E Ta. \<lbrakk>hp (a, b) aa = \<lfloor>(C, S)\<rfloor>; P \<turnstile> last Cs has least M = (Ts', T', pns', body') via Ds; P \<turnstile> (C,Cs @\<^sub>p Ds) selects M = (Ts, T, pns, body) via Cs'; length vs = length pns; length Ts = length pns; bs = blocks (this # pns, Class (last Cs') # Ts, Ref (aa, Cs') # vs, body); new_body = (case T' of Class D \<Rightarrow> \<lparr>D\<rparr>bs | _ \<Rightarrow> bs); P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call (ref (aa, Cs)) None M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> new_body :\<^bsub>NT\<^esub> Ta
 2. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 3. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 7. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 9. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 33 subgoals...
[PROOF STEP]
with eq
[PROOF STATE]
proof (chain)
picking this:
T'' = T'
P,E,h \<turnstile> new_body : T'
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T'' = T'
P,E,h \<turnstile> new_body : T'

goal (1 subgoal):
 1. P,E,h \<turnstile> new_body :\<^bsub>NT\<^esub> T''
[PROOF STEP]
by(fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> new_body :\<^bsub>NT\<^esub> T''

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
case (RedStaticCall Cs C Cs'' M Ts T pns body Cs' Ds vs E a h l T')
[PROOF STATE]
proof (state)
this:
P \<turnstile> Path last Cs to C unique
P \<turnstile> Path last Cs to C via Cs''
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'
length vs = length pns
length Ts = length pns
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : T'

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
have "method":"P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'"
    and length1:"length vs = length pns"
    and length2:"length Ts = length pns"
    and path_unique:"P \<turnstile> Path last Cs to C unique"
    and path_via:"P \<turnstile> Path last Cs to C via Cs''"
    and Ds:"Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'"
    and wt:"P,E,h \<turnstile> ref (a,Cs)\<bullet>(C::)M(map Val vs) : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P \<turnstile> C has least M = (Ts, T, pns, body) via Cs' &&& length vs = length pns &&& length Ts = length pns) &&& (P \<turnstile> Path last Cs to C unique &&& P \<turnstile> Path last Cs to C via Cs'' ) &&& Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs' &&& P,E,h \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : T'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
length vs = length pns
length Ts = length pns
P \<turnstile> Path last Cs to C unique
P \<turnstile> Path last Cs to C via Cs''
Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'
P,E,h \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : T'

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from wt "method" wf
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : T'
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
wf_C_prog P
[PROOF STEP]
obtain Ts'
    where wtref:"P,E,h \<turnstile> ref (a,Cs) : Class (last Cs)"
    and wtes:"P,E,h \<turnstile> map Val vs [:] Ts'" and subs:"P \<turnstile> Ts' [\<le>] Ts"
    and TeqT':"T = T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : T'
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
wf_C_prog P

goal (1 subgoal):
 1. (\<And>Ts'. \<lbrakk>P,E,h \<turnstile> ref (a, Cs) : Class (last Cs); P,E,h \<turnstile> map Val vs [:] Ts'; P \<turnstile> Ts' [\<le>] Ts; T = T'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(auto dest:wf_sees_method_fun split:if_split_asm)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> ref (a, Cs) : Class (last Cs)
P,E,h \<turnstile> map Val vs [:] Ts'
P \<turnstile> Ts' [\<le>] Ts
T = T'

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from wtref
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> ref (a, Cs) : Class (last Cs)
[PROOF STEP]
obtain D S where hp:"h a = Some(D,S)" and subo:"Subobjs P D Cs"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> ref (a, Cs) : Class (last Cs)

goal (1 subgoal):
 1. (\<And>D S. \<lbrakk>h a = \<lfloor>(D, S)\<rfloor>; Subobjs P D Cs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto split:if_split_asm)
[PROOF STATE]
proof (state)
this:
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Cs

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from length1 length2
[PROOF STATE]
proof (chain)
picking this:
length vs = length pns
length Ts = length pns
[PROOF STEP]
have length_vs: "length (Ref(a,Ds)#vs) = length (Class (last Ds)#Ts)"
[PROOF STATE]
proof (prove)
using this:
length vs = length pns
length Ts = length pns

goal (1 subgoal):
 1. length (Ref (a, Ds) # vs) = length (Class (last Ds) # Ts)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (Ref (a, Ds) # vs) = length (Class (last Ds) # Ts)

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from length2
[PROOF STATE]
proof (chain)
picking this:
length Ts = length pns
[PROOF STEP]
have length_pns:"length (this#pns) = length (Class (last Ds)#Ts)"
[PROOF STATE]
proof (prove)
using this:
length Ts = length pns

goal (1 subgoal):
 1. length (this # pns) = length (Class (last Ds) # Ts)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (this # pns) = length (Class (last Ds) # Ts)

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from "method"
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
[PROOF STEP]
have "Cs' \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'

goal (1 subgoal):
 1. Cs' \<noteq> []
[PROOF STEP]
by (fastforce intro!:Subobjs_nonempty simp add:LeastMethodDef_def MethodDefs_def)
[PROOF STATE]
proof (state)
this:
Cs' \<noteq> []

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
with Ds
[PROOF STATE]
proof (chain)
picking this:
Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'
Cs' \<noteq> []
[PROOF STEP]
have last:"last Cs' = last Ds"
[PROOF STATE]
proof (prove)
using this:
Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'
Cs' \<noteq> []

goal (1 subgoal):
 1. last Cs' = last Ds
[PROOF STEP]
by (fastforce dest:appendPath_last)
[PROOF STATE]
proof (state)
this:
last Cs' = last Ds

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
with "method"
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
last Cs' = last Ds
[PROOF STEP]
have "is_class P (last Ds)"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
last Cs' = last Ds

goal (1 subgoal):
 1. is_class P (last Ds)
[PROOF STEP]
by(auto simp:LeastMethodDef_def MethodDefs_def is_class_def)
[PROOF STATE]
proof (state)
this:
is_class P (last Ds)

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
with last has_least_wf_mdecl[OF wf "method"]
[PROOF STATE]
proof (chain)
picking this:
last Cs' = last Ds
wf_mdecl wf_C_mdecl P (last Cs') (M, Ts, T, pns, body)
is_class P (last Ds)
[PROOF STEP]
have wtabody: "P,[this#pns [\<mapsto>] Class (last Ds)#Ts] \<turnstile> body :: T"
    and type:"\<forall>T\<in>set (Class(last Ds)#Ts). is_type P T"
[PROOF STATE]
proof (prove)
using this:
last Cs' = last Ds
wf_mdecl wf_C_mdecl P (last Cs') (M, Ts, T, pns, body)
is_class P (last Ds)

goal (1 subgoal):
 1. P,[this # pns [\<mapsto>] Class (last Ds) # Ts] \<turnstile> body :: T &&& \<forall>T\<in>set (Class (last Ds) # Ts). is_type P T
[PROOF STEP]
by(auto simp:wf_mdecl_def)
[PROOF STATE]
proof (state)
this:
P,[this # pns [\<mapsto>] Class (last Ds) # Ts] \<turnstile> body :: T
\<forall>T\<in>set (Class (last Ds) # Ts). is_type P T

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from path_via
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> Path last Cs to C via Cs''
[PROOF STEP]
have suboCs'':"Subobjs P (last Cs) Cs''"
    and lastCs'':"last Cs'' = C"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> Path last Cs to C via Cs''

goal (1 subgoal):
 1. Subobjs P (last Cs) Cs'' &&& last Cs'' = C
[PROOF STEP]
by (auto simp add:path_via_def)
[PROOF STATE]
proof (state)
this:
Subobjs P (last Cs) Cs''
last Cs'' = C

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
with subo wf
[PROOF STATE]
proof (chain)
picking this:
Subobjs P D Cs
wf_C_prog P
Subobjs P (last Cs) Cs''
last Cs'' = C
[PROOF STEP]
have subo':"Subobjs P D (Cs@\<^sub>pCs'')"
[PROOF STATE]
proof (prove)
using this:
Subobjs P D Cs
wf_C_prog P
Subobjs P (last Cs) Cs''
last Cs'' = C

goal (1 subgoal):
 1. Subobjs P D (Cs @\<^sub>p Cs'')
[PROOF STEP]
by(fastforce intro: Subobjs_appendPath)
[PROOF STATE]
proof (state)
this:
Subobjs P D (Cs @\<^sub>p Cs'')

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from lastCs'' suboCs''
[PROOF STATE]
proof (chain)
picking this:
last Cs'' = C
Subobjs P (last Cs) Cs''
[PROOF STEP]
have lastC:"C = last(Cs@\<^sub>pCs'')"
[PROOF STATE]
proof (prove)
using this:
last Cs'' = C
Subobjs P (last Cs) Cs''

goal (1 subgoal):
 1. C = last (Cs @\<^sub>p Cs'')
[PROOF STEP]
by (fastforce dest:Subobjs_nonempty intro:appendPath_last)
[PROOF STATE]
proof (state)
this:
C = last (Cs @\<^sub>p Cs'')

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from "method"
[PROOF STATE]
proof (chain)
picking this:
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'
[PROOF STEP]
have "Subobjs P C Cs'"
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'

goal (1 subgoal):
 1. Subobjs P C Cs'
[PROOF STEP]
by (auto simp:LeastMethodDef_def MethodDefs_def)
[PROOF STATE]
proof (state)
this:
Subobjs P C Cs'

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
with subo' wf lastC
[PROOF STATE]
proof (chain)
picking this:
Subobjs P D (Cs @\<^sub>p Cs'')
wf_C_prog P
C = last (Cs @\<^sub>p Cs'')
Subobjs P C Cs'
[PROOF STEP]
have "Subobjs P D ((Cs @\<^sub>p Cs'') @\<^sub>p Cs')"
[PROOF STATE]
proof (prove)
using this:
Subobjs P D (Cs @\<^sub>p Cs'')
wf_C_prog P
C = last (Cs @\<^sub>p Cs'')
Subobjs P C Cs'

goal (1 subgoal):
 1. Subobjs P D ((Cs @\<^sub>p Cs'') @\<^sub>p Cs')
[PROOF STEP]
by (fastforce intro:Subobjs_appendPath)
[PROOF STATE]
proof (state)
this:
Subobjs P D ((Cs @\<^sub>p Cs'') @\<^sub>p Cs')

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
with Ds
[PROOF STATE]
proof (chain)
picking this:
Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'
Subobjs P D ((Cs @\<^sub>p Cs'') @\<^sub>p Cs')
[PROOF STEP]
have suboDs:"Subobjs P D Ds"
[PROOF STATE]
proof (prove)
using this:
Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'
Subobjs P D ((Cs @\<^sub>p Cs'') @\<^sub>p Cs')

goal (1 subgoal):
 1. Subobjs P D Ds
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Subobjs P D Ds

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
from wtabody
[PROOF STATE]
proof (chain)
picking this:
P,[this # pns [\<mapsto>] Class (last Ds) # Ts] \<turnstile> body :: T
[PROOF STEP]
have "P,Map.empty(this#pns [\<mapsto>] Class (last Ds)#Ts),h \<turnstile> body : T"
[PROOF STATE]
proof (prove)
using this:
P,[this # pns [\<mapsto>] Class (last Ds) # Ts] \<turnstile> body :: T

goal (1 subgoal):
 1. P,[this # pns [\<mapsto>] Class (last Ds) # Ts],h \<turnstile> body : T
[PROOF STEP]
by(rule WT_implies_WTrt)
[PROOF STATE]
proof (state)
this:
P,[this # pns [\<mapsto>] Class (last Ds) # Ts],h \<turnstile> body : T

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
hence "P,E(this#pns [\<mapsto>] Class (last Ds)#Ts),h \<turnstile> body : T"
[PROOF STATE]
proof (prove)
using this:
P,[this # pns [\<mapsto>] Class (last Ds) # Ts],h \<turnstile> body : T

goal (1 subgoal):
 1. P,E(this # pns [\<mapsto>] Class (last Ds) # Ts),h \<turnstile> body : T
[PROOF STEP]
by(rule WTrt_env_mono) simp
[PROOF STATE]
proof (state)
this:
P,E(this # pns [\<mapsto>] Class (last Ds) # Ts),h \<turnstile> body : T

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
hence "P,E,h \<turnstile> blocks(this#pns, Class (last Ds)#Ts, Ref(a,Ds)#vs, body) : T"
[PROOF STATE]
proof (prove)
using this:
P,E(this # pns [\<mapsto>] Class (last Ds) # Ts),h \<turnstile> body : T

goal (1 subgoal):
 1. P,E,h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) : T
[PROOF STEP]
using wtes subs wt_blocks[OF length_pns length_vs type] hp suboDs
[PROOF STATE]
proof (prove)
using this:
P,E(this # pns [\<mapsto>] Class (last Ds) # Ts),h \<turnstile> body : T
P,E,h \<turnstile> map Val vs [:] Ts'
P \<turnstile> Ts' [\<le>] Ts
(P,?E,?h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, ?e) : ?T) = (P,?E(this # pns [\<mapsto>] Class (last Ds) # Ts),?h \<turnstile> ?e : ?T \<and> (\<exists>Ts'. map P \<turnstile> typeof\<^bsub>?h\<^esub> (Ref (a, Ds) # vs) = map Some Ts' \<and> P \<turnstile> Ts' [\<le>] (Class (last Ds) # Ts)))
h a = \<lfloor>(D, S)\<rfloor>
Subobjs P D Ds

goal (1 subgoal):
 1. P,E,h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) : T
[PROOF STEP]
by(auto simp add:rel_list_all2_Cons2)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) : T

goal (32 subgoals):
 1. \<And>Cs C Cs'' M Ts T pns body Cs' Ds vs E a aa b Ta. \<lbrakk>P \<turnstile> Path last Cs to C unique; P \<turnstile> Path last Cs to C via Cs'' ; P \<turnstile> C has least M = (Ts, T, pns, body) via Cs'; Ds = (Cs @\<^sub>p Cs'') @\<^sub>p Cs'; length vs = length pns; length Ts = length pns; P,E \<turnstile> (aa, b) \<surd>; P,E,aa \<turnstile> Call (ref (a, Cs)) \<lfloor>C\<rfloor> M (map Val vs) : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> Ta
 2. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 6. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 8. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 32 subgoals...
[PROOF STEP]
with TeqT'
[PROOF STATE]
proof (chain)
picking this:
T = T'
P,E,h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) : T
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
T = T'
P,E,h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) : T

goal (1 subgoal):
 1. P,E,h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by(fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> blocks (this # pns, Class (last Ds) # Ts, Ref (a, Ds) # vs, body) :\<^bsub>NT\<^esub> T'

goal (31 subgoals):
 1. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
A total of 31 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (31 subgoals):
 1. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
A total of 31 subgoals...
[PROOF STEP]
case (RedCallNull E Copt M vs h l)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Call null Copt M (map Val vs) : T

goal (31 subgoals):
 1. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
A total of 31 subgoals...
[PROOF STEP]
have sconf:"P,E \<turnstile> (h, l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>

goal (31 subgoals):
 1. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
A total of 31 subgoals...
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
[PROOF STEP]
have "is_class P NullPointer"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P

goal (1 subgoal):
 1. is_class P NullPointer
[PROOF STEP]
by (fastforce intro:is_class_xcpt wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
is_class P NullPointer

goal (31 subgoals):
 1. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
A total of 31 subgoals...
[PROOF STEP]
hence "preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer,[NullPointer])) = Some(Class NullPointer)"
[PROOF STATE]
proof (prove)
using this:
is_class P NullPointer

goal (1 subgoal):
 1. preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
by (auto elim: preallocatedE dest!:preallocatedD Subobjs_Base)
[PROOF STATE]
proof (state)
this:
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (31 subgoals):
 1. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
A total of 31 subgoals...
[PROOF STEP]
with sconf
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> THROW NullPointer : T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T
[PROOF STEP]
by(auto simp:sconf_def hconf_def)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (31 subgoals):
 1. \<And>E Copt M vs a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Call null Copt M (map Val vs) : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 5. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 7. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
A total of 31 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T

goal (30 subgoals):
 1. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 30 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (30 subgoals):
 1. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 30 subgoals...
[PROOF STEP]
case (BlockRedNone E V T e h l e' h' l' T')
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
l' V = None
\<not> assigned V e
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> {V:T; e} : T'

goal (30 subgoals):
 1. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 30 subgoals...
[PROOF STEP]
have IH:"\<And>T'. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : T'\<rbrakk>
                 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> {V:T; e} : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>T'. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> {V:T; e} : T'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> {V:T; e} : T'

goal (30 subgoals):
 1. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 30 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> {V:T; e} : T'
[PROOF STEP]
have type:"is_type P T" and wte:"P,E(V\<mapsto>T),h \<turnstile> e : T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> {V:T; e} : T'

goal (1 subgoal):
 1. is_type P T &&& P,E(V \<mapsto> T),h \<turnstile> e : T'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_type P T
P,E(V \<mapsto> T),h \<turnstile> e : T'

goal (30 subgoals):
 1. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 30 subgoals...
[PROOF STEP]
from sconf type
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
is_type P T
[PROOF STEP]
have "P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
is_type P T

goal (1 subgoal):
 1. P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>
[PROOF STEP]
by (auto simp:sconf_def lconf_def envconf_def)
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>

goal (30 subgoals):
 1. \<And>E V T e h l e' h' l' Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = None; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 4. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 6. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 10. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
A total of 30 subgoals...
[PROOF STEP]
from IH[OF this wte] type
[PROOF STATE]
proof (chain)
picking this:
P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_type P T
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
is_type P T

goal (1 subgoal):
 1. P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by (cases T') auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> {V:T; e'} :\<^bsub>NT\<^esub> T'

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
case (BlockRedSome E V T e h l e' h' l' v T')
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
l' V = \<lfloor>v\<rfloor>
\<not> assigned V e
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> {V:T; e} : T'

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
have red:"P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>"
    and IH:"\<And>T'. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : T'\<rbrakk>
                  \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and Some:"l' V = Some v"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> {V:T; e} : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& (\<And>T'. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T')) &&& l' V = \<lfloor>v\<rfloor> &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> {V:T; e} : T'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
l' V = \<lfloor>v\<rfloor>
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> {V:T; e} : T'

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> {V:T; e} : T'
[PROOF STEP]
have wte:"P,E(V\<mapsto>T),h \<turnstile> e : T'"  and type:"is_type P T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> {V:T; e} : T'

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h \<turnstile> e : T' &&& is_type P T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h \<turnstile> e : T'
is_type P T

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
with sconf wf red type
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
wf_C_prog P
P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
is_type P T
P,E(V \<mapsto> T),h \<turnstile> e : T'
is_type P T
[PROOF STEP]
have "P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
wf_C_prog P
P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
is_type P T
P,E(V \<mapsto> T),h \<turnstile> e : T'
is_type P T

goal (1 subgoal):
 1. P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)
[PROOF STEP]
by -(auto simp:sconf_def,rule red_preserves_lconf,
         auto intro:wf_prog_wwf_prog simp:envconf_def lconf_def)
[PROOF STATE]
proof (state)
this:
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
hence conf:"P,h' \<turnstile> v :\<le> T"
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)

goal (1 subgoal):
 1. P,h' \<turnstile> v :\<le> T
[PROOF STEP]
using Some
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)
l' V = \<lfloor>v\<rfloor>

goal (1 subgoal):
 1. P,h' \<turnstile> v :\<le> T
[PROOF STEP]
by(auto simp:lconf_def,erule_tac x="V" in allE,clarsimp)
[PROOF STATE]
proof (state)
this:
P,h' \<turnstile> v :\<le> T

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
have wtval:"P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
proof(cases T)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. T = Void \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = Boolean \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 4. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 5. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
case Void
[PROOF STATE]
proof (state)
this:
T = Void

goal (5 subgoals):
 1. T = Void \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = Boolean \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 4. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 5. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
with conf
[PROOF STATE]
proof (chain)
picking this:
P,h' \<turnstile> v :\<le> T
T = Void
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> v :\<le> T
T = Void

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T

goal (4 subgoals):
 1. T = Boolean \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 4. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. T = Boolean \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 4. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
case Boolean
[PROOF STATE]
proof (state)
this:
T = Boolean

goal (4 subgoals):
 1. T = Boolean \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 4. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
with conf
[PROOF STATE]
proof (chain)
picking this:
P,h' \<turnstile> v :\<le> T
T = Boolean
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> v :\<le> T
T = Boolean

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T

goal (3 subgoals):
 1. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
case Integer
[PROOF STATE]
proof (state)
this:
T = Integer

goal (3 subgoals):
 1. T = Integer \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 3. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
with conf
[PROOF STATE]
proof (chain)
picking this:
P,h' \<turnstile> v :\<le> T
T = Integer
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> v :\<le> T
T = Integer

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T

goal (2 subgoals):
 1. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
case NT
[PROOF STATE]
proof (state)
this:
T = NT

goal (2 subgoals):
 1. T = NT \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
 2. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
with conf
[PROOF STATE]
proof (chain)
picking this:
P,h' \<turnstile> v :\<le> T
T = NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> v :\<le> T
T = NT

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T

goal (1 subgoal):
 1. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
case (Class C)
[PROOF STATE]
proof (state)
this:
T = Class C

goal (1 subgoal):
 1. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
with conf
[PROOF STATE]
proof (chain)
picking this:
P,h' \<turnstile> v :\<le> T
T = Class C
[PROOF STEP]
have "P,E(V \<mapsto> T),h' \<turnstile> Val v : T \<or> P,E(V \<mapsto> T),h' \<turnstile> Val v : NT"
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> v :\<le> T
T = Class C

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> Val v : T \<or> P,E(V \<mapsto> T),h' \<turnstile> Val v : NT
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> Val v : T \<or> P,E(V \<mapsto> T),h' \<turnstile> Val v : NT

goal (1 subgoal):
 1. \<And>x5. T = Class x5 \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
with Class
[PROOF STATE]
proof (chain)
picking this:
T = Class C
P,E(V \<mapsto> T),h' \<turnstile> Val v : T \<or> P,E(V \<mapsto> T),h' \<turnstile> Val v : NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
T = Class C
P,E(V \<mapsto> T),h' \<turnstile> Val v : T \<or> P,E(V \<mapsto> T),h' \<turnstile> Val v : NT

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
from sconf type
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
is_type P T
[PROOF STEP]
have "P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
is_type P T

goal (1 subgoal):
 1. P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>
[PROOF STEP]
by (auto simp:sconf_def lconf_def envconf_def)
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>

goal (29 subgoals):
 1. \<And>E V T e h l e' h' l' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V := None))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V := None)) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v\<rfloor>; \<not> assigned V e; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 3. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 5. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 9. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 10. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
A total of 29 subgoals...
[PROOF STEP]
from IH[OF this wte] wtval type
[PROOF STATE]
proof (chain)
picking this:
P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
is_type P T
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v : T
is_type P T

goal (1 subgoal):
 1. P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by(cases T') auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> {V:T; V:=Val v;; e'} :\<^bsub>NT\<^esub> T'

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
case (InitBlockRed E V T e h l v' e' h' l' v'' v T')
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
l' V = \<lfloor>v''\<rfloor>
P \<turnstile> T casts v to v'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> {V:T; V:=Val v;; e} : T'

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
have red:"P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>"
    and IH:"\<And>T'. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : T'\<rbrakk>
              \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and Some:"l' V = Some v''" and casts:"P \<turnstile> T casts v to v'"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> {V:T := Val v; e} : T'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& (\<And>T'. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T') &&& l' V = \<lfloor>v''\<rfloor>) &&& P \<turnstile> T casts v to v'  &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> {V:T; V:=Val v;; e} : T'
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
l' V = \<lfloor>v''\<rfloor>
P \<turnstile> T casts v to v'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> {V:T; V:=Val v;; e} : T'

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> {V:T; V:=Val v;; e} : T'
[PROOF STEP]
have wte:"P,E(V \<mapsto> T),h \<turnstile> e : T'" and wtval:"P,E(V \<mapsto> T),h \<turnstile> V:=Val v : T"
    and type:"is_type P T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> {V:T; V:=Val v;; e} : T'

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h \<turnstile> e : T' &&& P,E(V \<mapsto> T),h \<turnstile> V:=Val v : T &&& is_type P T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h \<turnstile> e : T'
P,E(V \<mapsto> T),h \<turnstile> V:=Val v : T
is_type P T

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
from wf casts wtval
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
P \<turnstile> T casts v to v'
P,E(V \<mapsto> T),h \<turnstile> V:=Val v : T
[PROOF STEP]
have "P,h \<turnstile> v' :\<le> T"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P
P \<turnstile> T casts v to v'
P,E(V \<mapsto> T),h \<turnstile> V:=Val v : T

goal (1 subgoal):
 1. P,h \<turnstile> v' :\<le> T
[PROOF STEP]
by(fastforce intro!:casts_conf wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
P,h \<turnstile> v' :\<le> T

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
with sconf
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
P,h \<turnstile> v' :\<le> T
[PROOF STEP]
have lconf:"P,h \<turnstile> l(V \<mapsto> v') (:\<le>)\<^sub>w E(V \<mapsto> T)"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
P,h \<turnstile> v' :\<le> T

goal (1 subgoal):
 1. P,h \<turnstile> l(V \<mapsto> v') (:\<le>)\<^sub>w E(V \<mapsto> T)
[PROOF STEP]
by (fastforce intro!:lconf_upd2 simp:sconf_def)
[PROOF STATE]
proof (state)
this:
P,h \<turnstile> l(V \<mapsto> v') (:\<le>)\<^sub>w E(V \<mapsto> T)

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
from sconf type
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
is_type P T
[PROOF STEP]
have "envconf P (E(V \<mapsto> T))"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
is_type P T

goal (1 subgoal):
 1. P \<turnstile> E(V \<mapsto> T) \<surd>
[PROOF STEP]
by(simp add:sconf_def envconf_def)
[PROOF STATE]
proof (state)
this:
P \<turnstile> E(V \<mapsto> T) \<surd>

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
from red_preserves_lconf[OF wf_prog_wwf_prog[OF wf] red wte lconf this]
[PROOF STATE]
proof (chain)
picking this:
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)
[PROOF STEP]
have "P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)"
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)

goal (1 subgoal):
 1. P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
with Some
[PROOF STATE]
proof (chain)
picking this:
l' V = \<lfloor>v''\<rfloor>
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)
[PROOF STEP]
have "P,h' \<turnstile> v'' :\<le> T"
[PROOF STATE]
proof (prove)
using this:
l' V = \<lfloor>v''\<rfloor>
P,h' \<turnstile> l' (:\<le>)\<^sub>w E(V \<mapsto> T)

goal (1 subgoal):
 1. P,h' \<turnstile> v'' :\<le> T
[PROOF STEP]
by(simp add:lconf_def,erule_tac x="V" in allE,auto)
[PROOF STATE]
proof (state)
this:
P,h' \<turnstile> v'' :\<le> T

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
hence wtval':"P,E(V \<mapsto> T),h' \<turnstile> V:=Val v'' : T"
[PROOF STATE]
proof (prove)
using this:
P,h' \<turnstile> v'' :\<le> T

goal (1 subgoal):
 1. P,E(V \<mapsto> T),h' \<turnstile> V:=Val v'' : T
[PROOF STEP]
by(cases T) auto
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v'' : T

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
from lconf sconf type
[PROOF STATE]
proof (chain)
picking this:
P,h \<turnstile> l(V \<mapsto> v') (:\<le>)\<^sub>w E(V \<mapsto> T)
P,E \<turnstile> (h, l) \<surd>
is_type P T
[PROOF STEP]
have "P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>"
[PROOF STATE]
proof (prove)
using this:
P,h \<turnstile> l(V \<mapsto> v') (:\<le>)\<^sub>w E(V \<mapsto> T)
P,E \<turnstile> (h, l) \<surd>
is_type P T

goal (1 subgoal):
 1. P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>
[PROOF STEP]
by(auto simp:sconf_def envconf_def)
[PROOF STATE]
proof (state)
this:
P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>

goal (28 subgoals):
 1. \<And>E V T e h l v' e' h' l' v'' v Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> \<langle>e,(h, l(V \<mapsto> v'))\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>; \<And>Ta. \<lbrakk>P,E(V \<mapsto> T) \<turnstile> (h, l(V \<mapsto> v')) \<surd>; P,E(V \<mapsto> T),h \<turnstile> e : Ta\<rbrakk> \<Longrightarrow> P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> Ta; l' V = \<lfloor>v''\<rfloor>; P \<turnstile> T casts v to v' ; P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> {V:T; V:=Val v;; e} : Ta\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> Ta
 2. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 4. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 8. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 9. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
A total of 28 subgoals...
[PROOF STEP]
from IH[OF this wte] wtval' type
[PROOF STATE]
proof (chain)
picking this:
P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v'' : T
is_type P T
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P,E(V \<mapsto> T),h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
P,E(V \<mapsto> T),h' \<turnstile> V:=Val v'' : T
is_type P T

goal (1 subgoal):
 1. P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> T'
[PROOF STEP]
by(cases T') auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> {V:T; V:=Val v'';; e'} :\<^bsub>NT\<^esub> T'

goal (27 subgoals):
 1. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 2. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 10. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 27 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (27 subgoals):
 1. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 2. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 10. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 27 subgoals...
[PROOF STEP]
case RedBlock
[PROOF STATE]
proof (state)
this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> {V_:T_; Val u_} : T

goal (27 subgoals):
 1. \<And>E V T u a b Ta. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 2. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 3. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 7. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 8. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 10. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
A total of 27 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> {V_:T_; Val u_} : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> Val u_ :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> Val u_ :\<^bsub>NT\<^esub> T

goal (26 subgoals):
 1. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 2. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 6. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 9. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
A total of 26 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (26 subgoals):
 1. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 2. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 6. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 9. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
A total of 26 subgoals...
[PROOF STEP]
case RedInitBlock
[PROOF STATE]
proof (state)
this:
P \<turnstile> T_ casts v_ to v'_
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> {V_:T_; V_:=Val v_;; Val u_} : T

goal (26 subgoals):
 1. \<And>T v v' E V u a b Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> {V:T; V:=Val v;; Val u} : Ta\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Val u :\<^bsub>NT\<^esub> Ta
 2. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 6. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 7. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 9. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 10. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
A total of 26 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P \<turnstile> T_ casts v_ to v'_
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> {V_:T_; V_:=Val v_;; Val u_} : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> Val u_ :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> Val u_ :\<^bsub>NT\<^esub> T

goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
case (SeqRed E e h l e' h' l' e\<^sub>2 T)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> e;; e\<^sub>2 : T

goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>"
    and IH:"\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> e;; e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& (\<And>T'. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T')) &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> e;; e\<^sub>2 : T
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T'\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T'
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> e;; e\<^sub>2 : T

goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e;; e\<^sub>2 : T
[PROOF STEP]
obtain T' where wte:"P,E,h \<turnstile> e : T'" and wte2:"P,E,h \<turnstile> e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e;; e\<^sub>2 : T

goal (1 subgoal):
 1. (\<And>T'. \<lbrakk>P,E,h \<turnstile> e : T'; P,E,h \<turnstile> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : T'
P,E,h \<turnstile> e\<^sub>2 : T

goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
from WTrt_hext_mono[OF wte2 red_hext_incr[OF red]]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e\<^sub>2 : T
[PROOF STEP]
have wte2':"P,E,h' \<turnstile> e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e\<^sub>2 : T
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e\<^sub>2 : T

goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'
[PROOF STEP]
obtain T'' where "P,E,h' \<turnstile> e' : T''"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T'

goal (1 subgoal):
 1. (\<And>T''. P,E,h' \<turnstile> e' : T'' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(cases T') auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : T''

goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
with wte2'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e\<^sub>2 : T
P,E,h' \<turnstile> e' : T''
[PROOF STEP]
have "P,E,h' \<turnstile> e';; e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e\<^sub>2 : T
P,E,h' \<turnstile> e' : T''

goal (1 subgoal):
 1. P,E,h' \<turnstile> e';; e\<^sub>2 : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e';; e\<^sub>2 : T

goal (25 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 5. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 6. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 8. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 9. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
A total of 25 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e';; e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e';; e\<^sub>2 :\<^bsub>NT\<^esub> T

goal (24 subgoals):
 1. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 7. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 24 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (24 subgoals):
 1. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 7. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 24 subgoals...
[PROOF STEP]
case RedSeq
[PROOF STATE]
proof (state)
this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> Val v_;; e\<^sub>2_ : T

goal (24 subgoals):
 1. \<And>E v e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v;; e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 4. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 5. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 7. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 8. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 24 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> Val v_;; e\<^sub>2_ : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> e\<^sub>2_ :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> e\<^sub>2_ :\<^bsub>NT\<^esub> T

goal (23 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 6. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 23 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (23 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 6. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 23 subgoals...
[PROOF STEP]
case (CondRed E e h l e' h' l' e\<^sub>1 e\<^sub>2)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T

goal (23 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 6. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 23 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>"
    and IH: "\<And>T. \<lbrakk>P,E \<turnstile> (h,l) \<surd>; P,E,h \<turnstile> e : T\<rbrakk>
                     \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T"
    and wt:"P,E,h \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T"
    and sconf:"P,E \<turnstile> (h,l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& (\<And>T. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T)) &&& P,E,h \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T &&& P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E,h \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T
P,E \<turnstile> (h, l) \<surd>

goal (23 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 6. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 23 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T
[PROOF STEP]
have wte:"P,E,h \<turnstile> e : Boolean"
      and wte1:"P,E,h \<turnstile> e\<^sub>1 : T" and wte2:"P,E,h \<turnstile> e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h \<turnstile> e : Boolean &&& P,E,h \<turnstile> e\<^sub>1 : T &&& P,E,h \<turnstile> e\<^sub>2 : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : Boolean
P,E,h \<turnstile> e\<^sub>1 : T
P,E,h \<turnstile> e\<^sub>2 : T

goal (23 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 6. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 23 subgoals...
[PROOF STEP]
from IH[OF sconf wte]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Boolean
[PROOF STEP]
have wte':"P,E,h' \<turnstile> e' : Boolean"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Boolean

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Boolean
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Boolean

goal (23 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 6. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 23 subgoals...
[PROOF STEP]
from wte' WTrt_hext_mono[OF wte1 red_hext_incr[OF red]]
    WTrt_hext_mono[OF wte2 red_hext_incr[OF red]]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : Boolean
P,E,h' \<turnstile> e\<^sub>1 : T
P,E,h' \<turnstile> e\<^sub>2 : T
[PROOF STEP]
have "P,E,h' \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 : T"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Boolean
P,E,h' \<turnstile> e\<^sub>1 : T
P,E,h' \<turnstile> e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 : T
[PROOF STEP]
by (rule WTrtCond)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 : T

goal (23 subgoals):
 1. \<And>E e a b e' aa ba e\<^sub>1 e\<^sub>2 T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (e) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 3. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 4. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 6. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 7. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 23 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> if (e') e\<^sub>1 else e\<^sub>2 :\<^bsub>NT\<^esub> T

goal (22 subgoals):
 1. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 5. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 7. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 22 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (22 subgoals):
 1. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 5. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 7. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 22 subgoals...
[PROOF STEP]
case RedCondT
[PROOF STATE]
proof (state)
this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> if (true) e\<^sub>1_ else e\<^sub>2_ : T

goal (22 subgoals):
 1. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (true) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>1 :\<^bsub>NT\<^esub> T
 2. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 3. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 5. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 6. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 7. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 8. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 22 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> if (true) e\<^sub>1_ else e\<^sub>2_ : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> e\<^sub>1_ :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro: wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> e\<^sub>1_ :\<^bsub>NT\<^esub> T

goal (21 subgoals):
 1. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 4. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 6. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 7. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 21 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (21 subgoals):
 1. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 4. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 6. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 7. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 21 subgoals...
[PROOF STEP]
case RedCondF
[PROOF STATE]
proof (state)
this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> if (false) e\<^sub>1_ else e\<^sub>2_ : T

goal (21 subgoals):
 1. \<And>E e\<^sub>1 e\<^sub>2 a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> if (false) e\<^sub>1 else e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> e\<^sub>2 :\<^bsub>NT\<^esub> T
 2. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 4. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 5. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 6. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 7. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 21 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> if (false) e\<^sub>1_ else e\<^sub>2_ : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> e\<^sub>2_ :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro: wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> e\<^sub>2_ :\<^bsub>NT\<^esub> T

goal (20 subgoals):
 1. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 3. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 20 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (20 subgoals):
 1. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 3. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 20 subgoals...
[PROOF STEP]
case RedWhile
[PROOF STATE]
proof (state)
this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> while (b___) c_ : T

goal (20 subgoals):
 1. \<And>E b c a ba T. \<lbrakk>P,E \<turnstile> (a, ba) \<surd>; P,E,a \<turnstile> while (b) c : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> if (b) (c;; while (b) c) else unit :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 3. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 4. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 20 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E_ \<turnstile> (a_, b_) \<surd>
P,E_,a_ \<turnstile> while (b___) c_ : T

goal (1 subgoal):
 1. P,E_,a_ \<turnstile> if (b___) (c_;; while (b___) c_) else unit :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro: wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E_,a_ \<turnstile> if (b___) (c_;; while (b___) c_) else unit :\<^bsub>NT\<^esub> T

goal (19 subgoals):
 1. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 2. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 19 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (19 subgoals):
 1. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 2. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 19 subgoals...
[PROOF STEP]
case (ThrowRed E e h l e' h' l' T)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> throw e : T

goal (19 subgoals):
 1. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 2. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 19 subgoals...
[PROOF STEP]
have IH:"\<And>T. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> throw e : T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>T. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T) &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> throw e : T
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> throw e : T

goal (19 subgoals):
 1. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 2. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 19 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> throw e : T
[PROOF STEP]
obtain T' where wte:"P,E,h \<turnstile> e : T'" and ref:"is_refT T'"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> throw e : T

goal (1 subgoal):
 1. (\<And>T'. \<lbrakk>P,E,h \<turnstile> e : T'; is_refT T'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : T'
is_refT T'

goal (19 subgoals):
 1. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 2. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 19 subgoals...
[PROOF STEP]
from ref
[PROOF STATE]
proof (chain)
picking this:
is_refT T'
[PROOF STEP]
have "P,E,h' \<turnstile> throw e' : T"
[PROOF STATE]
proof (prove)
using this:
is_refT T'

goal (1 subgoal):
 1. P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
proof(rule refTE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. T' = NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
 2. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
assume T':"T' = NT"
[PROOF STATE]
proof (state)
this:
T' = NT

goal (2 subgoals):
 1. T' = NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
 2. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
with wte
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e : T'
T' = NT
[PROOF STEP]
have "P,E,h \<turnstile> e : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e : T'
T' = NT

goal (1 subgoal):
 1. P,E,h \<turnstile> e : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : NT

goal (2 subgoals):
 1. T' = NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
 2. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
from IH[OF sconf this] ref T'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT
is_refT T'
T' = NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> NT
is_refT T'
T' = NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> throw e' : T

goal (1 subgoal):
 1. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
fix C
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
assume T':"T' = Class C"
[PROOF STATE]
proof (state)
this:
T' = Class C

goal (1 subgoal):
 1. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
with wte
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e : T'
T' = Class C
[PROOF STEP]
have "P,E,h \<turnstile> e : Class C"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e : T'
T' = Class C

goal (1 subgoal):
 1. P,E,h \<turnstile> e : Class C
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : Class C

goal (1 subgoal):
 1. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
from IH[OF sconf this]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C
[PROOF STEP]
have "P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> Class C

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. \<And>C. T' = Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C \<or> P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
proof(rule disjE)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : Class C"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : Class C

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
have "is_refT (Class C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_refT (Class C)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
is_refT (Class C)

goal (2 subgoals):
 1. P,E,h' \<turnstile> e' : Class C \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
 2. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
with wte'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : Class C
is_refT (Class C)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : Class C
is_refT (Class C)

goal (1 subgoal):
 1. P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> throw e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
assume wte':"P,E,h' \<turnstile> e' : NT"
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' : NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
have "is_refT NT"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_refT NT
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
is_refT NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' : NT \<Longrightarrow> P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
with wte'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' : NT
is_refT NT
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' : NT
is_refT NT

goal (1 subgoal):
 1. P,E,h' \<turnstile> throw e' : T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> throw e' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> throw e' : T

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> throw e' : T

goal (19 subgoals):
 1. \<And>E e a b e' aa ba T. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> throw e' :\<^bsub>NT\<^esub> T
 2. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 3. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 19 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> throw e' : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> throw e' :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> throw e' :\<^bsub>NT\<^esub> T

goal (18 subgoals):
 1. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 18 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (18 subgoals):
 1. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 18 subgoals...
[PROOF STEP]
case (RedThrowNull E h l)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> throw null : T

goal (18 subgoals):
 1. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 18 subgoals...
[PROOF STEP]
have sconf:"P,E \<turnstile> (h, l) \<surd>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P,E \<turnstile> (h, l) \<surd>
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h, l) \<surd>

goal (18 subgoals):
 1. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 18 subgoals...
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
wf_C_prog P
[PROOF STEP]
have "is_class P NullPointer"
[PROOF STATE]
proof (prove)
using this:
wf_C_prog P

goal (1 subgoal):
 1. is_class P NullPointer
[PROOF STEP]
by (fastforce intro:is_class_xcpt wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
is_class P NullPointer

goal (18 subgoals):
 1. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 18 subgoals...
[PROOF STEP]
hence "preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer,[NullPointer])) = Some(Class NullPointer)"
[PROOF STATE]
proof (prove)
using this:
is_class P NullPointer

goal (1 subgoal):
 1. preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
by (auto elim: preallocatedE dest!:preallocatedD Subobjs_Base)
[PROOF STATE]
proof (state)
this:
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (18 subgoals):
 1. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 18 subgoals...
[PROOF STEP]
with sconf
[PROOF STATE]
proof (chain)
picking this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>
[PROOF STEP]
have "P,E,h \<turnstile> THROW NullPointer : T"
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h, l) \<surd>
preallocated h \<Longrightarrow> P \<turnstile> typeof\<^bsub>h\<^esub> (Ref (addr_of_sys_xcpt NullPointer, [NullPointer])) = \<lfloor>Class NullPointer\<rfloor>

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T
[PROOF STEP]
by(auto simp:sconf_def hconf_def)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (18 subgoals):
 1. \<And>E a b T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> throw null : T\<rbrakk> \<Longrightarrow> P,E,a \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
 2. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 18 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) : T

goal (1 subgoal):
 1. P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by (fastforce intro:wt_same_type_typeconf wf_prog_wwf_prog)
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Throw (addr_of_sys_xcpt NullPointer, [NullPointer]) :\<^bsub>NT\<^esub> T

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
case (ListRed1 E e h l e' h' l' es Ts)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> e # es [:] Ts

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
have red:"P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>"
    and IH:"\<And>T. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> e # es [:] Ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle> &&& (\<And>T. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> T)) &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> e # es [:] Ts
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>e,(h, l)\<rangle> \<rightarrow> \<langle>e',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> e : ?T\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> ?T
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> e # es [:] Ts

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e # es [:] Ts
[PROOF STEP]
obtain U Us where Ts:"Ts = U#Us"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e # es [:] Ts

goal (1 subgoal):
 1. (\<And>U Us. Ts = U # Us \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(cases Ts) auto
[PROOF STATE]
proof (state)
this:
Ts = U # Us

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
with wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> e # es [:] Ts
Ts = U # Us
[PROOF STEP]
have wte:"P,E,h \<turnstile> e : U" and wtes:"P,E,h \<turnstile> es [:] Us"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> e # es [:] Ts
Ts = U # Us

goal (1 subgoal):
 1. P,E,h \<turnstile> e : U &&& P,E,h \<turnstile> es [:] Us
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> e : U
P,E,h \<turnstile> es [:] Us

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
from WTrts_hext_mono[OF wtes red_hext_incr[OF red]]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> es [:] Us
[PROOF STEP]
have wtes':"P,E,h' \<turnstile> es [:] Us"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es [:] Us

goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:] Us
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:] Us

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
hence "length es = length Us"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es [:] Us

goal (1 subgoal):
 1. length es = length Us
[PROOF STEP]
by (rule WTrts_same_length)
[PROOF STATE]
proof (state)
this:
length es = length Us

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
with wtes'
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> es [:] Us
length es = length Us
[PROOF STEP]
have "types_conf P E h' es Us"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es [:] Us
length es = length Us

goal (1 subgoal):
 1. P,E,h' \<turnstile> es [:]\<^bsub>NT\<^esub> Us
[PROOF STEP]
by (fastforce intro:wts_same_types_typesconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> es [:]\<^bsub>NT\<^esub> Us

goal (17 subgoals):
 1. \<And>E e a b e' aa ba es Ts. \<lbrakk>P,E \<turnstile> \<langle>e,(a, b)\<rangle> \<rightarrow> \<langle>e',(aa, ba)\<rangle>; \<And>T. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' :\<^bsub>NT\<^esub> T; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> e # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 17 subgoals...
[PROOF STEP]
with IH[OF sconf wte] Ts
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> U
Ts = U # Us
P,E,h' \<turnstile> es [:]\<^bsub>NT\<^esub> Us
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> e' :\<^bsub>NT\<^esub> U
Ts = U # Us
P,E,h' \<turnstile> es [:]\<^bsub>NT\<^esub> Us

goal (1 subgoal):
 1. P,E,h' \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> e' # es [:]\<^bsub>NT\<^esub> Ts

goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
case (ListRed2 E es h l es' h' l' v Ts)
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] ?Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> ?Ts
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Val v # es [:] Ts

goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
have reds:"P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>"
    and IH:"\<And>Ts. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> types_conf P E h' es' Ts"
    and sconf:"P,E \<turnstile> (h, l) \<surd>" and wt:"P,E,h \<turnstile> Val v#es [:] Ts"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle> &&& (\<And>Ts. \<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts)) &&& P,E \<turnstile> (h, l) \<surd> &&& P,E,h \<turnstile> Val v # es [:] Ts
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> \<langle>es,(h, l)\<rangle> [\<rightarrow>] \<langle>es',(h', l')\<rangle>
\<lbrakk>P,E \<turnstile> (h, l) \<surd>; P,E,h \<turnstile> es [:] ?Ts\<rbrakk> \<Longrightarrow> P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> ?Ts
P,E \<turnstile> (h, l) \<surd>
P,E,h \<turnstile> Val v # es [:] Ts

goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
from wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Val v # es [:] Ts
[PROOF STEP]
obtain U Us where Ts:"Ts = U#Us"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Val v # es [:] Ts

goal (1 subgoal):
 1. (\<And>U Us. Ts = U # Us \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(cases Ts) auto
[PROOF STATE]
proof (state)
this:
Ts = U # Us

goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
with wt
[PROOF STATE]
proof (chain)
picking this:
P,E,h \<turnstile> Val v # es [:] Ts
Ts = U # Us
[PROOF STEP]
have wtval:"P,E,h \<turnstile> Val v : U" and wtes:"P,E,h \<turnstile> es [:] Us"
[PROOF STATE]
proof (prove)
using this:
P,E,h \<turnstile> Val v # es [:] Ts
Ts = U # Us

goal (1 subgoal):
 1. P,E,h \<turnstile> Val v : U &&& P,E,h \<turnstile> es [:] Us
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
P,E,h \<turnstile> Val v : U
P,E,h \<turnstile> es [:] Us

goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
from WTrt_hext_mono[OF wtval reds_hext_incr[OF reds]]
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> Val v : U
[PROOF STEP]
have "P,E,h' \<turnstile> Val v : U"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : U

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v : U
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v : U

goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
hence "P,E,h' \<turnstile> (Val v) :\<^bsub>NT\<^esub> U"
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> Val v : U

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v :\<^bsub>NT\<^esub> U
[PROOF STEP]
by(rule wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v :\<^bsub>NT\<^esub> U

goal (16 subgoals):
 1. \<And>E es a b es' aa ba v Ts. \<lbrakk>P,E \<turnstile> \<langle>es,(a, b)\<rangle> [\<rightarrow>] \<langle>es',(aa, ba)\<rangle>; \<And>Ts. \<lbrakk>P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> es' [:]\<^bsub>NT\<^esub> Ts; P,E \<turnstile> (a, b) \<surd>; P,E,a \<turnstile> Val v # es [:] Ts\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 16 subgoals...
[PROOF STEP]
with IH[OF sconf wtes] Ts
[PROOF STATE]
proof (chain)
picking this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Us
Ts = U # Us
P,E,h' \<turnstile> Val v :\<^bsub>NT\<^esub> U
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
P,E,h' \<turnstile> es' [:]\<^bsub>NT\<^esub> Us
Ts = U # Us
P,E,h' \<turnstile> Val v :\<^bsub>NT\<^esub> U

goal (1 subgoal):
 1. P,E,h' \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Val v # es' [:]\<^bsub>NT\<^esub> Ts

goal (15 subgoals):
 1. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>es vs a b es' E v Copt M aa ba T. \<lbrakk>es = map Val vs @ Throw (a, b) # es'; P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 15 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (15 subgoals):
 1. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>es vs a b es' E v Copt M aa ba T. \<lbrakk>es = map Val vs @ Throw (a, b) # es'; P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 15 subgoals...
[PROOF STEP]
case (CallThrowObj E h l Copt M es h' l')
[PROOF STATE]
proof (state)
this:
P,E \<turnstile> (h', l') \<surd>
P,E,h' \<turnstile> Call (Throw (h, l)) Copt M es : T

goal (15 subgoals):
 1. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E a b Copt M es aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Throw (a, b)) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>es vs a b es' E v Copt M aa ba T. \<lbrakk>es = map Val vs @ Throw (a, b) # es'; P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
A total of 15 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
P,E \<turnstile> (h', l') \<surd>
P,E,h' \<turnstile> Call (Throw (h, l)) Copt M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Throw (h, l) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(cases Copt)(auto intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Throw (h, l) :\<^bsub>NT\<^esub> T

goal (14 subgoals):
 1. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>es vs a b es' E v Copt M aa ba T. \<lbrakk>es = map Val vs @ Throw (a, b) # es'; P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E V T a b aa ba Ta. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> {V:T; Throw (a, b)} : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> Ta
A total of 14 subgoals...
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (14 subgoals):
 1. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>es vs a b es' E v Copt M aa ba T. \<lbrakk>es = map Val vs @ Throw (a, b) # es'; P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E V T a b aa ba Ta. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> {V:T; Throw (a, b)} : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> Ta
A total of 14 subgoals...
[PROOF STEP]
case (CallThrowParams es vs h l es' E v Copt M h' l')
[PROOF STATE]
proof (state)
this:
es = map Val vs @ Throw (h, l) # es'
P,E \<turnstile> (h', l') \<surd>
P,E,h' \<turnstile> Call (Val v) Copt M es : T

goal (14 subgoals):
 1. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>es vs a b es' E v Copt M aa ba T. \<lbrakk>es = map Val vs @ Throw (a, b) # es'; P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Call (Val v) Copt M es : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 10. \<And>E V T a b aa ba Ta. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> {V:T; Throw (a, b)} : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> Ta
A total of 14 subgoals...
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
es = map Val vs @ Throw (h, l) # es'
P,E \<turnstile> (h', l') \<surd>
P,E,h' \<turnstile> Call (Val v) Copt M es : T

goal (1 subgoal):
 1. P,E,h' \<turnstile> Throw (h, l) :\<^bsub>NT\<^esub> T
[PROOF STEP]
by(cases Copt)(auto intro:wt_same_type_typeconf)
[PROOF STATE]
proof (state)
this:
P,E,h' \<turnstile> Throw (h, l) :\<^bsub>NT\<^esub> T

goal (13 subgoals):
 1. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Cast C (Throw (a, b)) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 2. \<And>E C a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> \<lparr>C\<rparr>Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 3. \<And>E a b bop e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b) \<guillemotleft>bop\<guillemotright> e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 4. \<And>E v\<^sub>1 bop a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<^sub>1 \<guillemotleft>bop\<guillemotright> Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 5. \<And>E V a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> V:=Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 6. \<And>E a b F Cs aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 7. \<And>E a b F Cs e\<^sub>2 aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Throw (a, b)\<bullet>F{Cs} := e\<^sub>2 : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 8. \<And>E v F Cs a b aa ba T. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> Val v\<bullet>F{Cs} := Throw (a, b) : T\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> T
 9. \<And>E V T a b aa ba Ta. \<lbrakk>P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> {V:T; Throw (a, b)} : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> Ta
 10. \<And>T v v' E V a b aa ba Ta. \<lbrakk>P \<turnstile> T casts v to v' ; P,E \<turnstile> (aa, ba) \<surd>; P,E,aa \<turnstile> {V:T; V:=Val v;; Throw (a, b)} : Ta\<rbrakk> \<Longrightarrow> P,E,aa \<turnstile> Throw (a, b) :\<^bsub>NT\<^esub> Ta
A total of 13 subgoals...
[PROOF STEP]
qed (fastforce intro:wt_same_type_typeconf)+